2324400_en-US

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

2324400_en-US

2324400_en-US

Force eFlexPwm output change on input pin edge detection

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


MCXAMCXNRe: Force eFlexPwm output change on input pin edge detection

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

Re: Force eFlexPwm output change on input pin edge detection

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

Re: Force eFlexPwm output change on input pin edge detection

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


标记 (1)
无评分
版本历史
最后更新:
‎03-06-2026 03:26 AM
更新人: