emios to trigger the bctu and output pwm in sync

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

emios to trigger the bctu and output pwm in sync

227 Views
Ayaz
Contributor III

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. 

Ayaz_0-1712647706720.png

 

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.

0 Kudos
4 Replies

184 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Ayaz

AN13767:

3-phase Sensorless PMSM Motor Control Kit with S32K344 using RTD Low Level API Application Note

Senlent_0-1713149523534.png

https://www.nxp.com/design/design-center/development-boards-and-designs/automotive-motor-control-sol...

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.

 

0 Kudos

93 Views
Ayaz
Contributor III
I have still not got an answer to my question,
1) do you have an example code for triggering the BCTU using emios_mcl -- emios_pwm --BCTU.
2 ) What is the best way to trigger the BCTU?
0 Kudos

79 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Ayaz

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).

0 Kudos

213 Views
Ayaz
Contributor III
3) what is the effect of enabling the freeze mode on emios_mcl?
0 Kudos