Hi,
in the reference guide of the OMAP-L138 it is mentioned that the source for TBCLK is SYSCLKOUT. Since my processor is running @300MHz I thought if the fields HSPCLKDIV and CLKDIV of the TBCTL register are both set to DIVBY1 the frequency of one counter step is 300 MHz.
Now Iam observing the following: If I set the maximum period in TBPRD to 0 I measure a frequency of 75 MHz with the oscilloscope. Can you give me hint why? I expected 300MHz ...
Here is my PWM configuration:
syscfg0_regs->KICK0R = CSL_FMK(SYSCFG_KICK0R_KICK0, 0x83e70b13);
syscfg0_regs->KICK1R = CSL_FMK(SYSCFG_KICK1R_KICK1, 0x95A4F1E0);
syscfg0_regs->CFGCHIP1 = CSL_FMKT(SYSCFG_CFGCHIP1_TBCLKSYNC, STOP);
ehrpwm1_regs->TBCTL = CSL_FMKT(EHRPWM_TBCTL_FREE_SOFT, RUNFREE) |
CSL_FMKT(EHRPWM_TBCTL_HSPCLKDIV, DIVBY1) |
CSL_FMKT(EHRPWM_TBCTL_CLKDIV, DIVBY1);
ehrpwm1_regs->TBPRD = CSL_FMK(EHRPWM_TBPRD_TBPRD, 0U);
ehrpwm1_regs->TBCTL = CSL_FINST(ehrpwm1_regs->TBCTL, EHRPWM_TBCTL_CTRMODE, DOWN);
ehrpwm1_regs->AQCTLA = CSL_FMKT(EHRPWM_AQCTLA_ZRO, EPWMXATOGGLE);
syscfg0_regs->CFGCHIP1 = CSL_FMKT(SYSCFG_CFGCHIP1_TBCLKSYNC, ENABLE);
Any help would be very appreciated. If you need additional information please let me know.
Kind Regards,
Steve