Debugger detached after injecting an NCF in FCCU

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

Debugger detached after injecting an NCF in FCCU

723 Views
myassine
Contributor II

Hi Community,

I am using an MPC5746C and I have a requirement in which I have to set a masked NCFF in the FCCU before initializing the software.

The code works as expected indeed, however when the debugger (lauterbach) is attached -debugging step by step- it shows that the SYSTEM is DOWN after the execution of fault injection line, indicating that it did disconnect from the MCU. An Attach is needed to resume debugging.

This is very critical in our case, because it will drive everyone crazy while launching auto-tests or even debugging manually.

I have envisioned 3 solutions :

1) detect when the MCU is in debug mode and disable the NCFF incection --> I couldn't find where to get this information.

2) prevent FCCU when going to the FAULT state from detaching the debugger -> still don't know how to do it and why it does happen
3) drive EOUT as a GPIO pin instead of being the FCCU error pin --> very ugly implementation.

I would be very glad if you could enlighten me about how to implement one of those solutions properly. 

An explanation of what exactly happens would be appreciated too.

mpc5746c‌ mpc574xx‌ fccu‌ debugger‌ lauterbach‌ 
petervlna

4 Replies

580 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

Would be nice if you can share with us how do you perform fault injection.

Debugging FCCU is quite tricky as FCCU implements configuration watchdog.

Injection fault itself has no effect on micro until a reaction on fault is set in FCCU configuration registers.

Peter

580 Views
myassine
Contributor II

Hi,

Thank you peter for your quick response.

Here is the configuration :

FCCU_CTRL = 0x80000000

FCCU_CFG =  0x01000E9E 

FCCU_NCF_CFG[myNCFF] = 0x1

FCCU_NCFS_CFG[myNCFF] = 0x0

FCCU_NCF_E[myNCFF] = 0x1

FCCU_NCF_TOE[myNCFF] = 0x0

FCCU_EINOUT =  0x20 

FCCU_IRQ_ALARM_EN[myNCFF] = 0x0

FCCU_NMI_EN[myNCFF] = 0x0

FCCU_EOUT_SIG_EN[myNCFF] = 0x1

 

The FCCU is configured to go to Fault state when we inject the NCFF.

Best Regards,
Mohammed

0 Kudos

580 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

And how should I know what is MyNCFF?

If you share with someone register contents please do it in following name:

for example :  FCCU_NCF_CFG = 0xFFFF0000

I am sorry but your post just tell me nothing.

You say your device is configured to go into fault state on NCF injeciton.

What is the configuration for NCF in fault state? Is it reset? interrupt?

If it is reset then it is correct that device will leave debug mode.

Peter

580 Views
myassine
Contributor II

Hi Peter,

The whole content of the register is given when needed, as for the registers represented as arrays only the configuration of the injected fault in question is given.

In fact each bit of these registers concern only and independently one fault.

MyNCFF can actually be any fault. For instance FCCU_NCF_TOE[myNCFF] = 0x0 means that the Alarm timer is not enabled for MyNCFF fault. 

I do believe, thus that something like this FCCU_NCF_TOE = 0xFFFFFFFE, where MyNCFF is of index 31, won't be - as to my knowledge- of much help more than FCCU_NCF_TOE[myNCFF] = 0x0.

Thank you for your response,
Mohammed

0 Kudos