Hi
I would like to trigger the BCTU through eMIOS_pwm, by configuring a time base on emios_mcl, then make the configuration through emios_pwm, since the
connection between BCTU and emios_pwm CH is through the CH flag and not through the CH output.
I am not sure what event(Flag, whether on the rising edge or falling edge) to select when BCTU is triggered because I need the PWM output and adc reading to be in sync.
1) Do you have suggestions?
2) is there a better way to trigger the bctu, that trigger must be in sync with two pwm outputs.
AN13767:
3-phase Sensorless PMSM Motor Control Kit with S32K344 using RTD Low Level API Application Note
You can find the usage of ADC synchronization relevant in the link above, that's a way to control PMSM motor.
1.You can ignore LCU0 module which is used for generate complementary PWM,
2.You can find the demo "MCSPTE1AK344" which will help you to know how to configure relevant module.
In fact, in this link, we have provided a routine for EMIOS-triggered BCTU sampling.
This picture explains it very clearly.
Attachment is an EMIOS-triggered BCTU sampling routine I made. The hardware is based on S32K3X4EVB, and the RTD version is 3.0.0
Hope it works to you.
"What is the best way to trigger the BCTU"
It all depends on your application. There are many trigger sources for BCTU, which can be EMIOS or other timer modules(via trgmux).