Mpc5125 doesn't start occasionally. We find the code hanging by lighting the indicator in. S and. C files.
It starts after the blr instruction of. S file and before the initialization PSC of. C file.
When the fault occurs, the poreset signal cannot restarts mpc5125. It must be powered off and then started. What is the possible reason.
The running process of the program is as follows.
in .s file
mr r3, r2
blr //hang start jump to .c file code
in .c file
pscInit(); //hang end
//led2 //not run
If this problem happens occasionally, this problem is not software problem.
Check your board using the Chapter 5 of the MPC5125 Datasheet:
Often incorrect concerning to this chapter produces similar behavior.
I found another problem on this board, The LPC_ CLK signal's frequency changes with temperature, and the relationship between frequency and temperature is similar to linear relationship. We use FPGA to collect LPC_CLK and counting,then lighting LED, we can find that the lighting frequency increases when the temperature decreases. When the temperature increases, the lighting frequency gradually decreases.
I checked my board using the Chapter 5 of the MPC5125 Datasheet. my board has some problems.
1. some supplies reach the specified operating conditions after the PORESET be released.
2. Unlike the recommended circuit, the PLL power supply uses magnetic beads instead of 10 ohm resistors.
Will these problems lead to the abnormality of my board? And my board has started running, and then it hangs. Is this problem really irrelevant to the software?