A strange problem with S32K MCU ADC module

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

A strange problem with S32K MCU ADC module

Jump to solution
1,678 Views
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

 

 

Tags (1)
0 Kudos
1 Solution
1,644 Views
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

View solution in original post

0 Kudos
3 Replies
1,645 Views
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 Kudos
1,635 Views
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

1,663 Views
mariuslucianand
NXP Employee
NXP Employee

@adriantudor , Can you please comment on this?

Thanks,

Marius

0 Kudos