A strange problem with S32K MCU ADC module

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

A strange problem with S32K MCU ADC module

跳至解决方案
2,730 次查看
liuqimin
Contributor IV

Hello

    This ADC test module is modified from the S32K MDT TOOL sample model "PMSM_OpenLoop_s32k144.slx".
    First, take out the ADC part of the example model separately to test the correctness of the hardware. Some parameters of the model have been modified according to the hardware on hand. This model can run normally on the hardware, and the voltage and current values measured by the ADC are also normal. Observe these values through FREEMASTER, as shown in the figure below.

liuqimin_0-1630143061412.png

    But this ADC module works with the FOC module (like the example model), there is a problem, even if the structure parameters of the ADC module are the same as the separate test model. The error phenomenon is that the voltage value measured by the ADC seriously deviates from the normal value, causing the model to be shut down, but the actual voltage value on the measurement hardware is normal. Use FREEMASTER to observe the ADC measurement data. The ADC measurement hardware system voltage value is less than the minimum voltage we set(15V). After 3 LoopCounters, the system is shut off protectively.

liuqimin_1-1630143219264.png

    When this problem occurs, is there a dependency between the ADC module and the FOC module? Are there any parameters that need to be set?
    The related models are in the attachment.

   BestRegards!

    LiuQimin

 

 

标记 (1)
0 项奖励
回复
1 解答
2,696 次查看
adriantudor
NXP Employee
NXP Employee

Hello @liuqimin

The problem with Vdc readings in your model is due to some initial fault conditions. 

When the model starts to run, it measures Vdc and Idc. Measurements for these two ADC are triggered by PWM thru PDB. As long as PWM is running, all ADC channels, triggered by PWM, are functional. But it is possible that, in the beginning, one of these two params, trigger fault condition. And when a fault event is triggered, the PWM is turned off. If PWM is not working, then ADC channels are not triggered anymore. 

Be sure that the PTC1 pin, used to trigger "IR2136_interrupt" is held high when you don't have any external fault.

 

Best regards,

Adrian

在原帖中查看解决方案

0 项奖励
回复
3 回复数
2,697 次查看
adriantudor
NXP Employee
NXP Employee

Hello @liuqimin

The problem with Vdc readings in your model is due to some initial fault conditions. 

When the model starts to run, it measures Vdc and Idc. Measurements for these two ADC are triggered by PWM thru PDB. As long as PWM is running, all ADC channels, triggered by PWM, are functional. But it is possible that, in the beginning, one of these two params, trigger fault condition. And when a fault event is triggered, the PWM is turned off. If PWM is not working, then ADC channels are not triggered anymore. 

Be sure that the PTC1 pin, used to trigger "IR2136_interrupt" is held high when you don't have any external fault.

 

Best regards,

Adrian

0 项奖励
回复
2,687 次查看
liuqimin
Contributor IV

Hello,  @adriantudor 

    It is indeed this error caused by the fact that the entire system has not stabilized at the initial stage of power-up. It is normal to delay the drive time of over-current and over-voltage protection and the drive error protection action by a few milliseconds.

   BestRegards!

    LiuQmin

2,715 次查看
mariuslucianand
NXP Employee
NXP Employee

@adriantudor , Can you please comment on this?

Thanks,

Marius

0 项奖励
回复