S32K358 FlexIO: clock source selection and PWM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K358 FlexIO: clock source selection and PWM

825 Views
saikiranG
Contributor I

Is it possible to select a different clock source apart from CORE CLK for FlexIO, and are there any peripheral‑level dividers available before the clock reaches the FlexIO module?

I'm using S32K358 FlexIO PWM (flexio_mcl_IP, flexio_pwm) to generate low‑frequency PWM (~100 Hz). I only see the FlexIO internal prescaler options (1/16/256) and timer period (max 512 ticks) configuration, with no further clock division.

At 240meg core clock, I could technically go up to 1.83KHz the least with 256 prescaler.

May I know is there a way to change the clock source option for flexIO so that I drive it at frequencies less than core clock? 

Am I missing any clock dividers, or is this an expected limitation of FlexIO PWM, in which case another peripheral is recommended?
0 Kudos
Reply
1 Reply

794 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @saikiranG,

Is it possible to select a different clock source apart from CORE CLK for FlexIO, and are there any peripheral‑level dividers available before the clock reaches the FlexIO module?

No, FlexIO module works directly with CORE_CLK:

Julin_AragnM_0-1767982541347.png

And for dividers, there are only the prescaler options you mentioned, ÷1, ÷16, ÷256 (configured in FlexIO timers). Before that, there is MC_CGM_MUX_0_DIV0, which is the divider for CORE_CLK.

Unfortunately, this is a limitation of the FlexIO module. You can use eMIOS module instead.

My colleague explains OPWFMB calculation in this other community post: Lower frequency PWM in OPWFMB mode - NXP Community.

Best regards,
Julián

0 Kudos
Reply