MPC5675K FlexPWM Help

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

MPC5675K FlexPWM Help

848 Views
seandonohue
Contributor II

Hi, I am having difficulty seeing an output from the FlexPWM module. I am trying to set up a simple 1Hz PWM with a 50% duty cycle on FlexPWM0_B1. My MOTC clock source is the 16MHz IROsc divided down by 4 to get a 4MHz clock. In the FlexPWM, the IPBus clock is selected as source and the clock is divided down by 128 for a 31.25KHz PWM clock. INIT is -(31250/2), VAL0 is 0, VAL1 is 31250/2, VAL4 is -(31250/4) and VAL5 is 31250/4. Can someone tell me what is missing from my configuration?

Original Attachment has been moved to: PWM_ADC_Tests.zip

Labels (1)
0 Kudos
1 Reply

584 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

The root cause is the Fault protection. In fact any of 4 FAULT pins can “disable” single PWM output of the submodule. The mapping is done by DISMAP register. You may see chapter “ Fault protection” within device reference manual.

So for example if there is a fault (logic one if FLVL bit is set or logic 0 if FLVL bit cleared) on FAULT0 pin and corresponding DISA0 bit is set the PWMA output of the submodule will be disabled. Similarly for other FAULTx / DISAx pairs.

Each submodule have its DISMAP register so for each PWMX/PWMA/PWMB pin the fault protection may be enabled for certain FAULT pin.

Try to clear the DISMAP register, then you will see the output signal.

Note: internal logic level may prevent PWM output to run, so you should check the FLVLx bits in such case (only if DISx is set, but no external pin is selected for FAULT circuitry, PCR[IBE] cleared).

Best Ragards,

Petr

0 Kudos