S32K142 PDB0 and PDB1 always error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K142 PDB0 and PDB1 always error

1,982件の閲覧回数
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 件の賞賛
返信
2 返答(返信)

1,967件の閲覧回数
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 件の賞賛
返信

1,940件の閲覧回数
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 件の賞賛
返信