AnsweredAssumed Answered

MPC5748 EOUT for FCCU

Question asked by Yuehe Deng on Feb 23, 2017

Hello,

 

   I'm working on FCCU development with MPC5748. I want to use EOUT with Bi-stable protocol to inform external IC. Now I can inject fake faults to trigger FCCU alarm, but nothing happen to EOUT[1.0].

   As written in datasheet, if configured as Bi-stable protocol, when in fault mode, EOUT0 = 0, EOUT1 = 1. When normal, EOUT0 = 1, EOUT1 = 0. However, no matter in which state, the pins are always: EOUT0 = 0 and EOUT1 = 1.

 

Also I haven't try to set EOUT0 and clear EOUT1 manually, but it didn't take effect.

 

My EOUT0 is PF10, EOUT1 is PF12. The source code is shown as follows:

 

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 succesful

/**************************************/
/* Insert the FCCU configuration here*/
/**************************************/
/* FCCU pin configure: EOUT0 -->PF10, EOUT1 -->PF12 */
SIUL2.MSCR[90].B.SSS = 5; /* Pad PF10-->EOUT0 */
SIUL2.MSCR[90].B.OBE = 1; /* Pad PF10: OBE=1. */
SIUL2.MSCR[90].B.SRC = 3; /* Pad PF10: Full strength slew rate */

SIUL2.MSCR[92].B.SSS = 4; /* Pad PF12-->EOUT1 */
//SIUL2.MSCR[92].B.OBE = 1; /* Pad PF12: OBE=1. */
SIUL2.MSCR[92].B.SRC = 3; /* Pad PF12: Full strength slew rate */

//GPIO_Set(EOUT0_PIN);
//GPIO_Clear(EOUT1_PIN);

/* FS6502 only support Bi-stable Protocol */
/* ___________ ____________ */
/*EOUT0__| |_______________| */
/* _______________ */
/*EOUT1______________| | */
/* |Normal |error or config| */
FCCU.CFG.B.FOM = 2u;
FCCU.CFG.B.PS = 0u;

/* FCCU moves into the ALARM state if the respective fault is enabled */
FCCU.NCF_TOE[0].R = 0xFFFFFFFF; //ALARM Timeout Enable

FCCU.NCF_E[0].B.NCFE7 = 0x1; //Enable reaction on fault NCF[7]

FCCU.IRQ_ALARM_EN[0].R = 0x80; //Enable ALARM interrupt on fault NCF[7]
INTC.PSR[488].R = 0x8000 | FCCU_ALARM_PRIORITY;

/* 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 succesful
}/* FCCU_CONFIG */

Outcomes