FCCU configuration failed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FCCU configuration failed

914 Views
haiquan_sun
Contributor I

Hi,

I am trying to configure FCCU for MPC5745B. When I run OP1 operation after unlock the configuration, the operation status is always aborted. Can anyone help me to point out what I am doing wrong here?

The code I use looks like this:
/* Unlock configuration */
FCCU.TRANS_LOCK.R = 0xBC;
/* provide Config state key */
FCCU.CTRLK.R = 0x913756AF; //key for OP1
/* enter config state - OP1 */
FCCU.CTRL.R = 0x1; //set OP1 - set up FCCU into the CONFIG mode
/* wait for successful state transition */
while (FCCU.CTRL.B.OPS != 0x3);  //always aborted!!!

Best Regards.

0 Kudos
6 Replies

794 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

My guess, you are using debugger and stepping in it.

The FCCU has SWT which will abort configuration phase.

Try to run over the code without stepping.

regards,

Peter

0 Kudos

794 Views
haiquan_sun
Contributor I

Hi,

You are right, I did use the debugger, but the breakpoints are set after all the necessary steps have been completed in order to see the values in the registers. And when I don't use the debugger, by observing the log output, the FCCU configuration is still not successful.

Best regards,

John

0 Kudos

794 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

Hmm, and do you configure FCCU without any intervention? Like interrupt or any other than FCCU configuration instruction is executed.

Once you enter configuration state, no other than FCCU configuration code can be executed.

This is not a real issue.

Just have a look at my example codes:

https://community.nxp.com/docs/DOC-329719 

regards,

Peter

0 Kudos

794 Views
haiquan_sun
Contributor I

Hi,

I think there is no interrupt or other instruction being executed, the code I used is as follows, is there anything wrong here?

void FCCU_Init()
{
   FCCU->TRANS_LOCK = 0xBC;
   FCCU->CTRLK = 0x913756AF;
   FCCU->CTRL = (FCCU->CTRL & ~FCCU_CTRL_OPR_MASK) | FCCU_CTRL_OPR(0x01);
   while(((FCCU->CTRL & FCCU_CTRL_OPS_MASK) >> FCCU_CTRL_OPS_SHIFT) != 0x03);

   FCCU->NCF_E[0] = 0xFFFFFFFF;
   FCCU->NCF_TOE[0] = 0x00FF8000;
   FCCU->IRQ_ALARM_EN[0] = 0x00FF8000;

   FCCU->CTRLK = 0x825A132B;
   FCCU->CTRL = (FCCU->CTRL & ~FCCU_CTRL_OPR_MASK) | FCCU_CTRL_OPR(0x02);
   while(((FCCU->CTRL & FCCU_CTRL_OPS_MASK) >> FCCU_CTRL_OPS_SHIFT) != 0x03);
}

Best regards

John

0 Kudos

794 Views
petervlna
NXP TechSupport
NXP TechSupport

If you will share with me your code I can check where is the issue.

Otherwise its hard to help here.

This is correct procedure:

void FCCU_CONFIG (void)
{
  /* Unlock configuration */
  FCCU.TRANS_LOCK.R = 0xBC;  

/* provide Config state key */
  FCCU.CTRLK.R = 0x913756AF;           //key for OP1
  /* enter config state - OP1 */
  FCCU.CTRL.R = 0x1;                  //set OP1 - set up FCCU into the CONFIG mode
  /* wait for successful state transition */
  while (FCCU.CTRL.B.OPS != 0x3); //operation status successful
 
  /**************************************/
  /* Insert here the FCCU configuration */
  /**************************************/
   
  /* set up the NOMAL mode of FCCU */
  FCCU.CTRLK.R = 0x825A132B;           //key for OP2  
  FCCU.CTRL.R = 0x2;                  //set the OP2 - set up FCCU into the NORMAL mode
  while (FCCU.CTRL.B.OPS != 0x3); //operational status successful
   
}//FCCU_CONFIG

0 Kudos

794 Views
haiquan_sun
Contributor I

I created a new project, and everything is worked!There may be problems in the original project.Thank you very much for your answers, and wish you a happy today!

Best regards

John

0 Kudos