Part Number: TMS320F28P650DK
Other Parts Discussed in Thread: SYSCONFIG
Hello,
I'm looking to try and understand how the clocks get set and what is bringing about the 1/2 speed i'm seeing from my PWMs. I'm using the TMS320F28P650DK6PZ chip, using the internal oscillator. I'm starting a blank project (empty_driverlib_project from Project Explorer) and I am looking to get some ePWMs out. In my device.h file, I uncommented the #define USE_PLL_SRC_INTOSC which switches in a value of 10000000U (10 MHz) for DEVICE_OSC_SRC_FREQ. The following line sets:
#define DEVICE_SYSCLK_FREQ ((DEVICE_OSCSRC_FREQ * 40) / (1 * 2 * 1))
Which should total 200 MHz.
In my SysConfig, I configured a 50% duty PWM by setting TBP to 100 on up-down count mode with an action qualifier to set it high when TB counter up equals a COMPA of 50 and low when the TB counter down equals COMPA.
My high speed clock divider and TB clock dividers are both set at 1, so I know I'm not getting a division there that would cause this.
On the scope, i see a period of 2us, or a 500kHz signal, 50% duty. This seems off to me, as I would expect a 100 TBP to give me a period of 1 MHz.
From the C2000 Academy videos for the up-down counter,
TBPRD = Tpwm / (2 * Ttbclk)
If TBPRD = 100 and Tpwm = 2e-6, solving for Ttbclk would yield 1e-8, or 10ns. This corresponds to 100MHz clock.
I'm trying to avoid the ClockTree tool and I want to see if there's default code i can change here.
Thanks

