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.