The attached CMM file is a script that writes the FBL and App to the S32K312 MCU and then activates SecureBoot, SecureDebug, and Configuration Lock.
We would like to request a review and improvement regarding the HardFault issue that occurs when running this CMM.
Previously, as shown in the screenshot, a HardFault occurred after the FBL and App were imported when executing "Go," with the JTAG Clock set to 5 MHz throughout.
As a change, we set SYStem.JtagClock to 1 MHz after importing the App file. With this change, HardFaults rarely occurred at the "Go" step when running the CMM, so we concluded that lowering the JTAG Clock speed is an effective approach. However, when the modified CMM is applied, a "stopped by vectbl" error occasionally occurs at "Go" after the FBL and App have been imported.
We kindly ask you to review the CMM so that it can run stably overall, and we would like to inquire about how to improve it so that the "stopped by vectbl" error does not appear at all.
Original CMM: GN7_PE_MAIN_G_SECURE_260412.cmm
Modified CMM (JTAG Clock changed to 1 MHz): GN7_PE_MAIN_G_SECURE_260412_0714RE.cmm
Additionally, we would like to import a different FBL after SecureBoot has been enabled. Is there a way to import a different FBL while SecureBoot is enabled? If it is possible, we would appreciate it if you could provide a guide.