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.

DK-TM4C129X: Generate output waveform on T3CCP output pin

Part Number: DK-TM4C129X

Is there an example somewhere demonstrating how to use TI-RTOS/TIVAWare to generate a square wave on the timer CCP output?

Certainly seems that it should be capable, but I think I'm not getting the IO pins mapped right, or the right timer configuration.

Thanks-

  • There is a TM4C123G timer PWM example in TivaWare in the directory: C:\ti\TivaWare_C_Series-2.1.4.178\examples\peripherals\timer
    It uses timer 1 and PB5, which you would need to change to timer 3 and PA7, PM1 or PD5 if using T3CCP1 (Timer_B) or PA6, PM2 or PD4 if using T3CCP0 (Timer_A). Of course you can strip out all of the UART stuff in the example. For a square wave, call TimerMatchSet() with a value equal to half of the value in TimerLoadSet(). If the square wave is to run at a constant frequency you can configure the timer before calling BIOS_start. If the frequency needs to change, you do that in an RTOS task.