This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

求助帖,使5509a的TOUT管脚输出电平



我看了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,请问这个语句应该如何写呢

  • 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.