The MCU on our board starts at SAFE-Mode, on the Eva-board the Code switches the current mode from DRUN to RUN1 without problems. The Code previously worked on our board. Which functions can we test? Can the voltage supply be the problem? Programming over the JTAG-interface is possible and the it looks like the Debugging is working. The FCCU seems to switch the MCU in SAVE-Mode. Should the xosc switch by the code be possible in SAVE-Mode? Witch procedure is recommended for an error-analysis. Where can I find detailed informations.
Hi Nils.,
Nils Schroeder wrote:
The Code previously worked on our board. Which functions can we test? Can the voltage supply be the problem? Programming over the JTAG-interface is possible and the it looks like the Debugging is working. The FCCU seems to switch the MCU in SAVE-Mode. Should the xosc switch by the code be possible in SAVE-Mode? Witch procedure is recommended for an error-analysis. Where can I find detailed informations.
[Peter] – Yes, it can be problem. If you are using for example BIST self-test after power on than Leopard can cause the safe mode. So first of all make sure you are in Leopard datasheet spec and also make sure your power supply is strong enough to deliver the requested current in proper time.
To exclude the weak power supply issue you can apply external power supply to your board.
[Peter] – The first thing to do is to check the RGM registers DES and FES in order to identify the root cause of SAFE mode.
Are you in safe mode directly after reset? Place breakpoint or while(1) loop at the start of your code to make sure no other code is executed after reset and check the Mode entry for Mode.
Share with me the concept of RGM[FES], RGM[DES], and FCCU[CFSx], FCCU[NCFSx] registers.
Do not forget that you need to read FCCU via OPx bit set.
All the informations required for SAFE mode analyses are in MPC5643L reference manual. However this require wide experiences with this micro to fully understand how to find the issue.
Hello, thanks for the advises. The device is directly in SAFE-Mode after reset. With JTAG debugging we read the following register contents:
RGMFES 0xd480
RGMDES 0x8000
we figured out a flash, ECC or lock-step error event has occured (FFLECCRCC) is set to 1.
FCCU_STATE tells us the FCCU is in normal state. Sweitching to config state by writing key for OP1 and setting OPR in FCCU_CTRL to 1 results to Poeration statur Aborted.
We tried to switch the FCCU mode to OP 9 or 10 (FCCU.CTRL.B.OPR=9/10). But the [CFSx] and [NCFSx] Register dont change.
FCCUCFS0 0x00000000
FCCUCFS1 0x00000000
FCCUCFS2 0x00000000
FCCUCFS3 0x00000000
FCCUNCFS0 0x00000000
FCCUNCFS1 0x00000000
FCCUNCFS2 0x00000000
FCCUNCFS3 0x00000000
Are there any steps to do to run operations of the FCCU?
How can we investigate the problem reportet by FFLECCRCC.
Thank you.
Regards
[Peter] – Ok, the micro can transition directly from RESET to SAFE mode via mode entry module.
But I have a feeling that the safe mode is caused by your SW as there is not issue with voltage.
Hi,
the microcontroller is in Lock-step mode (verfied by project settings and bit in System Status Register)
Our SW works on the Evalboard but not on a self designed board. This board design already worked before with the same SW.
Power Supply and soldering was already checked. As written before JTAG and debugging is working. So we think the SW
have be correct and there might be an HW Fault detected by the controller.
Is there a way to distinguish between Flash,ECC,RCC faults to come closer to the origin of the fault?
Did we understand the procedure to read the FCCU (N)CF status registers right?
We would be very grateful if you could send us your example code.
Thanks again!
Regards,
Nils
[Peter] –
Hi Nils,
Attached is my example code for dealing with safe mode and correct startup sequence.
I have a feeling that this code will run fine even on your board.
I did not saw your startup code, but the problem can be here.
Before we will proceed let me know if my example is working as expected.
Tip: In the LSM the core registers must be initialized by 64-bit. If not then as soon as you use one of them the redundancy checker will trigger F_FL_ECC_RCC flag and force reset and put micro in SAFE mode.
Check also my startup file (startup.c) for comparism.