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.
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.
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
Solved! Go to Solution.
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
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
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