To make my program work correctly,I have to comment codes as follows.Mybe it's caused by the hardware,but I'm not sure the real cause.To your knowledge,what does the problem exist in my hardware?
Thank you !
This is not the problem in your HW.
The underlined line is verification loop - waiting for successful mode change.
Check the Mode Entry module, and check GS register. Here you can see actual mode.
Most probably it is the DRUN (or your previous mode) instead of RUN0.
Configure your ME initialization correctly and you will pass this verification loop with no issues.
PS: it is always useful to state which device you are using.
The software in the attachment is tested in a MPC5643L demo board and it works well.In my own hardware,I have to comment codes as follows in order to make sure that the code "counter++ "work well.
If not,the software always waits for transitoin.Do you know what's wrong with it?
Retrieving data ...