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.

RTOS/LAUNCHXL-CC2650: How to output 8 channels PWM with 3 Timers

Part Number: LAUNCHXL-CC2650
Other Parts Discussed in Thread: CC2650, SYSBIOS

Tool/software: TI-RTOS

I need to output 8 channels PWM(Accuracy  1us) with the CC2650,but the TIMER0 has been used .there is only TIMER1、TIMER2、TIMER3 can be used.

so how to use 3 timer to output 8 channels PWM? the SCS has been used as a UART.

I have tested TOGGLE the IO when TIMER Hardware interrupt ,but the Accuracy  is 3.7us. Is there a better way to do it?

PWM period: 10000us

  • My 1st suggestion is for you to look at the pwmled driver's example. Typically, CC2650_LAUNCHXL.c file will have all the available options filled out for you. The other issue is that if your app is using TI-RTOS timers (e.g. Timer_create/Timer_construct), it will also impact which timers you can use for PWM.

    Tom
  • i have read the pwm driver's example,i know there are 4 timers,and can output 8 pwms,but the TIMER0 has been used to as other function.
    my project is based on TI-RTOS,but the TI-RTOS timers is unable to meet my requirements,i need a hardware timer,not the TI-RTOS timers.
  • TI-RTOS has a timer module in "#include <ti/sysbios/hal/Timer.h>" which I think you are referring to. Then there is also a GPTimerCC26XX timer module in "#include <ti/drivers/timer/GPTimerCC26XX.h> which might fit your needs. The PWM driver really end up using a GPTimerCC26XX timer instance.

    If neither module fits your needs, then you can reference the source code between the GPTimerCC26XX and PWMCC26XX modules and create your own driver implementation.