Hi Peter,
I use MC_ME to make a SW reset while check FCCU.NCF_S[0] = 0x4000, the result without debug tool is that the mcu is still reset. We can get a can message 0x300, cannot get a canid=0x100 message.
Thanks.
The code is as following:
void Sw_Reset(void)
{
MC_ME.MCTL.R = 0x5AF0;
MC_ME.MCTL.R = 0xA50F;
}
void main(void)
{
SWT_0.SR.R = 0xC520;
SWT_0.SR.R = 0xD928;
SWT_0.CR.B.WEN = 0;
SystemClock_Init();
Tim_Init();
Can_Init();
FCCU_clear_faults();
FCCU_read_faults();
if((FCCU.NCF_S[0] & 0x4000) != 0)
{
Can_SendFrame(0); //canid = 0x300
Sw_Reset();
}
FCCU_Init();
Can_SendFrame(1);//canid = 0x100
Wdg_Init();
for(;;)
{
}
}