S32K142 PDB0 and PDB1 always error

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

S32K142 PDB0 and PDB1 always error

1,082 Views
KeepGoing
Contributor I

demo:MCSXTE2BK142_PMSM_FOC_2Sh

First question

After I entered the debug mode, I carried out step-by-step debugging and found that when the program runs to

PWM_ Motor_ Speed_ Control();

PDB0. Error and pdb1 Error is 1

KeepGoing_0-1648449790292.png

KeepGoing_1-1648449801379.png

 

 

KeepGoing_0-1648448587088.png

 

 
 

Second question

I set a breakpoint, but the program will not stop at the breakpoint after running. Why?

0 Kudos
Reply
2 Replies

1,067 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

most probably it will be due to not reading ADC result in time when stepping code, which can induce lock of PBD retriggers causing error flag setting later. When running a code this does not happen.

BR, Petr

0 Kudos
Reply

1,040 Views
KeepGoing
Contributor I

Yes, I understand. At first, I didn't debug in one step, but the motor didn't rotate.

I stopped the program and found that pdb1 and pdb0 reported errors. I adjusted all clocks to the frequency division of the system clock to ensure correct timing, but this did not change the results of pdb0 and pdb1 reported errors.

I'm not sure what else is wrong. Thank you for your answer.

0 Kudos
Reply