Hello,
I am developing firmware for the FRDM-MCXA153 development board and I'm experiencing an issue with the FlexPWM interrupt frequency.
The Problem: I configured the FlexPWM using the MCUXpresso Config Tools to operate at 21,600 Hz. However, the Interrupt Service Routine (ISR) is being triggered at approximately 1,464 Hz.
My ISR is implemented as follows:
void FLEXPWM0_SUBMODULE0_IRQHandler(void) {
pwm(); // Custom routine with clear flag inside
}
Steps Taken:
Verified clock source settings in the Clocks Tool.
Tested various prescaler and modulus configurations in the Config Tools, but the output frequency remains incorrect.
What could be causing this discrepancy? Could it be a clock tree misconfiguration or a specific register in the FlexPWM module that I might be overlooking?
I attatched my .mex file. Im using MCUXpresso 25.6.136 and the latest SKD.
Thanks in advance!
Hi @LuisWoll
I think the most probable root cause is that submodule 0 is interrupting from a different eFlexPWM event or clock source than intended.
Can you share your code so that i can test it directly?
BR
Harry