S32K344 SD32DS3.5 RTD3.00 “EMIOS_PWM_IP_MODE_OPWM” defect

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

S32K344 SD32DS3.5 RTD3.00 “EMIOS_PWM_IP_MODE_OPWM” defect

384 Views
jiafeimao
Contributor III

I found this mode in the code generated by the S32DS: "EMIOS_PWM_IP_MODE_OPWM" see the first picture, but the S32DS does not have the option for this mode, see the second picture, how do I use the "EMIOS_PWM_IP_MODE_OPWM" mode?

jiafeimao_0-1720259749796.pngjiafeimao_1-1720259769230.png

 

0 Kudos
Reply
10 Replies

345 Views
Senlent
NXP TechSupport
NXP TechSupport

HI@jiafeimao

S32K3X4 does not have OPWM mode, but you can use OPWMFMB or OPWMB, which can achieve pulse width modulation too.

Mode supported by eMIOS.

Senlent_0-1720422958659.png

 

0 Kudos
Reply

336 Views
jiafeimao
Contributor III

To explain in detail, because we need to use a dual sampling and dual update control strategy, we need to update the duty cycle value at the time of overflow in the upward and downward counts. However, what I understand is that the signal marked in green in the figure below ("Reload duty") can only automatically take effect at the time of overflow in the downward count (overflow in the downward count is a PWM end), and the software cannot intervene, so I cannot make the duty cycle take effect at the time of overflow in the upward count. This is the problem I am facing.

Looking forward to any suggestions from you.

jiafeimao_0-1720427269285.png

or

jiafeimao_1-1720427472489.png

 

0 Kudos
Reply

330 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@jiafeimao

For the OPWMCB mode, the duty cycle will only be performed on the first clock of the next cycle.

 

You can check whether the OPWMT mode meets your needs.

Senlent_1-1720430877851.png

 

 

0 Kudos
Reply

324 Views
jiafeimao
Contributor III

jiafeimao_0-1720446158738.png

"the BS2→BS1 transfer occurs at every AS1 match"  So it is still not possible to update the duty cycle twice in a PWM waveform (I have also verified that it is indeed not possible because one PWM cycle only matches AS1 once, so only BS2->BS1 once). Do you have any other ideas you can share with me? Double sampling and double updating is a very useful strategy in motor control, or you can push my question to technical support personnel familiar with motor control. Thank you again for your support

0 Kudos
Reply

315 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@jiafeimao

This feature"Double sampling and double updating" is not supported in the eMIOS module of S32K3, and I confirmed it with our AE colleague in the motor field, and he also clearly told me that eMIOS does not support this feature.

I carefully looked at the implementation process of the feature "Double sampling and double updating", which actually allows the duty cycle to be updated within the current PWM cycle.

In fact, if you use a higher PWM frequency (2 times), this should be the same as what you can achieve with "Double sampling and double updating"

 

 

 

0 Kudos
Reply

242 Views
jianqiuhu
NXP Employee
NXP Employee

Hello,

S32K3 eMIOS doesn't support the Double sampling and double updating feature, but I think maybe we can use eMIOS+LCU to achieve that.

I drafted a example timing shown in the attached picture.

The idea is use the LCU combine two channels PWM to one PWM signal. 

S32K3 PWM单周期双更新.png

0 Kudos
Reply

205 Views
jiafeimao
Contributor III

jiafeimao_1-1720755398028.png

I got your inspiration, but I'm not very familiar with the triggering of the LCU, do you look at the picture of the scheme, I use the OPWMB mode, every time I update the A register to determine the duty cycle of the OPWMB, the value of the B register is irrelevant, but can I achieve the odd rising edge of CH1 to determine the high level of the LCU, and the even number of times of CH1 to determine the low level of the LCU?

0 Kudos
Reply

175 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@jiafeimao

No, the LCU module cannot realize your idea in this way.

The LCU needs to cooperate with some other inputs to perform logical operations to realize your idea.

You need to refer to the graphics provided to you in the previous answer.

To put it simply, you need three eMIOS outputs to cooperate, and output one PWM after

passing through the LCU module.

0 Kudos
Reply

146 Views
jiafeimao
Contributor III

Can you give me an example? I tried it and couldn't configure it. Thank you very much.

0 Kudos
Reply

61 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@jiafeimao

I made a demo for your reference. 

And this demo is based on the timing in the previous answer.

Senlent_0-1721037226558.png

In summary:

The eMIOS module cannot implement "Double sampling and double updating" alone, but it can be implemented in combination with the LCU module. That is, you need three PWM outputs and the LCU module to implement "Double sampling and double updating", but this looks more complicated.

0 Kudos
Reply