Hi
I am using MPC5744P,
The execution gets halts in while loop, once i try to enter into configuration state.
The execution will enters into aborted state, we are clearing the FCCU.NCFSx flag before entering into configuration state.
And I am not debugging it, since because of watchdog timer starts once i try to enter into config state.
The Code using:
/* Unlock configuration */
FCCU.TRANS_LOCK.B.TRANSKEY = 0xBC;
/* provide Config state key */
FCCU.CTRLK.R = 0x913756AF;
/* enter config state - OP1 */
Clear_Flags(); /*Clear NCFSx falg*/
FCCU.CTRL.R = 0x1;
/* Verify if state change was sucessful */
while (FCCU.CTRL.B.OPS != 0x3)test=FCCU.CTRL.B.OPS;
To Clear the NCFSx using below code:
FCCU.NCFK.R = 0xAB3498FE;
FCCU.NCF_S[0].R = 0xFFFFFFFF; // read FCCU.NCF_S0 register
/* Verify if state change was successful */
while (FCCU.CTRL.B.OPS != 0x3); //Operation status successful
/* NCFS_1 register clear */
FCCU.NCFK.R = 0xAB3498FE; //Non-critical fault key = AB34_98FEh
FCCU.NCF_S[1].R = 0xFFFFFFFF; // clear FCCU.NCF_S1 register
/* Verify if state change was successful */
while (FCCU.CTRL.B.OPS != 0x3); //Operation status successful
/* NCFS_2 register clear */
FCCU.NCFK.R = 0xAB3498FE; //Non-critical fault key = AB34_98FEh
FCCU.NCF_S[2].R = 0xFFFFFFFF; // clear FCCU.NCF_S2 register
/* Verify if state change was sucessful */
while (FCCU.CTRL.B.OPS != 0x3); //Operation status succesfull
Is there any thing i am missing?
is there any other way of doing it?
Hello guys,
I do not understand why you are still struggling with FCCU.
I have wrote 2 application notes explaining how to work with it.
Just make sure (read the faults in NCFSx) that faults are cleared before FCCU state change.
Have in mind you cannot step with debugger while FCCU is in CONFIG state and no other operation can be done while FCCU is in CONFIG state.
Peter
Hi Jun Li,
yes, i am having problem with FCCU.
I have tried lot but its not working for me...!!
Hi,bhat
Do you solve this problem?I have same issue with you.
Hi,
Yes you are clearing the faults before mode change request.
But after clearing the active fault can be immediately set if the fault is still present in its source.
So, verify after clearing, if the fault was really resolved and cleared.
While(FCCU.NCFS != 0)
Peter