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
Second question
I set a breakpoint, but the program will not stop at the breakpoint after running. Why?
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
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.