Force eFlexPwm output change on input pin edge detection

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

Force eFlexPwm output change on input pin edge detection

Jump to solution
793 Views
zorrotz
Contributor III

Hi,

Once an eFlexPWM is configured to generate a PWM signal in an output pin (PWM_A) with a defined period and duty, is it possible to force a change in the output when an edge is detected in an input pin (PWM_X for example) by hardware (i mean, without changing the output in an interrupt generated by the input pin)?

Thanks in advance

 

Labels (2)
Tags (1)
0 Kudos
Reply
1 Solution
674 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @zorrotz 

You can consider using the eFlexPWM EXT_FORCE feature to change the PWM output immediately in hardware.

You can route your input edge to EXT_FORCE, then set the PWM submodule’s FORCE_SEL to EXT_FORCE.
Using  DTSRCSEL, the PWM output can be forced to the desired level instantly — without interrupts and without consuming any additional FAULT channel.

 

Thank you. 

 

BR

Alice

 

View solution in original post

0 Kudos
Reply
3 Replies
700 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi @zorrotz 

Yes. The eFlexPWM module can change the PWM_A output in hardware when an edge is detected on an input pin (such as PWM_X), without using an interrupt.

Method:
Route the input pin to one of the eFlexPWM FAULTx inputs.
A fault is generated when any FAULTx pin is at logic 1. The polarity can be changed using FCTRL[FLVL]. Each FAULTx pin can be mapped to any PWM output.

When a fault signal is triggered (by the edge detected on the input pin), the PWM output pins are forced to logic 0, logic 1, or high‑impedance, depending on the settings in OCTRL[PWMxFS].

Thank you.

 

BR

Alice

0 Kudos
Reply
693 Views
zorrotz
Contributor III

Hi @Alice_Yang 

Yes, a FAULTx input could be used, but I am using a FAULTx input to force a logic 0 when a over-voltage is detected in the circuit. So I cannot use another FAULTx to force another pin state.

Maybe I can use the DMA.

Thank you

0 Kudos
Reply
675 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @zorrotz 

You can consider using the eFlexPWM EXT_FORCE feature to change the PWM output immediately in hardware.

You can route your input edge to EXT_FORCE, then set the PWM submodule’s FORCE_SEL to EXT_FORCE.
Using  DTSRCSEL, the PWM output can be forced to the desired level instantly — without interrupts and without consuming any additional FAULT channel.

 

Thank you. 

 

BR

Alice

 

0 Kudos
Reply