Hello,
I am working with the Concerto F28M35H52C1.
I have a problem with the timer PWM mode in the M3.
For some unknown reason the prescaler doesn't work and has no effect on the output signal at all.
Here is my code:
SysCtlClockConfigSet( SYSCTL_SYSDIV_1 | SYSCTL_M3SSDIV_2 | SYSCTL_USE_PLL | (SYSCTL_SPLLIMULT_M & 0xA));
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);
GPIOPinConfigure(GPIO_PC5_CCP1);
GPIOPinTypeTimer(GPIO_PORTC_BASE, GPIO_PIN_5);
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
TimerDisable(TIMER0_BASE,TIMER_B);
TimerControlLevel(TIMER0_BASE, TIMER_B, true);
TimerLoadSet(TIMER0_BASE, TIMER_B, SysCtlClockGet()/4000);
TimerPrescaleSet(TIMER0_BASE,TIMER_B, 2);
TimerMatchSet(TIMER0_BASE, TIMER_B, SysCtlClockGet()/8000);
TimerPrescaleMatchSet(TIMER0_BASE,TIMER_B, 2);
TimerEnable(TIMER0_BASE, TIMER_B);
The output signal has 4KHz frequency, if I write the prescaler lines or not, they have no effect at all.
Any idea ?