Hi,
I am working in one S32K116 (32 pins encapsulate) project for mass production where it is needed to disable the debugging SWD port. This is achieved changing the FSEC[SEC] bit. We can disable/enable the debugging without problems. The problem arises when debugging is disabled, then we get an scenario where we do not have CAN signals, No SPI signals, neither RESETS (Reset_b signal is always high).
How could we debug this situation (no debugging available)? What is the difference of changing SEC bit with respect to normal running of the code?
Thanks in advance,
Javier
Hi Javier,
In addition to modifying the FSEC of Flash Configuration in startup_S32K116.S, are there any other changes?
If you just modify FSEC, I don't think it will cause this problem.
Maybe you can check if START_FROM_FLASH is defined.
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Sorry I didn't debug your code.
What is the result if SecurizedIsAlreadyDone is ignored, that is, if this program is executed regardless of secure or unsecure? I wonder if these codes functions properly and erases the first flash sector correctly and reprograms it correctly.
AN12123 mentions: Note that changes to the flash configuration field will take effect at the next reset. Have you try to read back through the JTAG port before reset MCU?
In addition, when reprogramming, how about enable backdoor key feature so that temporary unlocking MCU then read and verified through the JTAG port?
Hi, thank you for the reply.
Before performing a reset I have checked all, It seems to be ok. I can continue debugging without problems until next reset.
I have checked this code with unsecure configuration. Everything works fine.
But if I configure with secure configuration and I do a reset, the MCU does not send any signal or action.
Now, I am instrumentalizing the code for debugging with a GPIO when I am securized.