我看了TI的手册,手册说只要让通用定时器的FUNC为10事,TOUT就可变成输出管脚,于是我按照TI的例程做如下定义
#define TIMER_CTRL TIMER_TCR_RMK(\
TIMER_TCR_IDLEEN_DEFAULT, /* IDLEEN == 0 */
TIMER_TCR_FUNC_OF(10), /* FUNC == 10 */ 这里我已经把FUNC写出10了
TIMER_TCR_TLB_RESET, /* TLB == 1 */
TIMER_TCR_SOFT_BRKPTNOW, /* SOFT == 0 */
TIMER_TCR_FREE_WITHSOFT, /* FREE == 0 */
TIMER_TCR_PWID_OF(0), /* PWID == 0 */
TIMER_TCR_ARB_RESET, /* ARB == 1 */
TIMER_TCR_TSS_START, /* TSS == 0 */
TIMER_TCR_CP_PULSE, /* CP == 0 */
TIMER_TCR_POLAR_LOW, /* POLAR == 0 */
TIMER_TCR_DATOUT_1 /* DATOUT == 1 */
)
想让TOUT输出
然后主函数里语句写GPIO_RSET(TOUT,0xff);,但是CCS不识别TOUT,请问这个语句应该如何写呢
Shine:
GPIO_RSET这个函数针对GPIO module。虽然TOUT可以用作GPO功能,但它还是属于Timer module,要配置DATOUT位来输出高低电平。
The pin reflects the value of the DATOUT bit. To bring the output signal low, write 0 to DATOUT. To bring the output signal high, write 1 to DATOUT.