Hi all,
So I'm having a very strange issue - I'm trying to change the FSEC in flash, and keep getting the same result (0xFE).
Some background on my setup I'm:
Using Eclipse with the IAR compiler.
Using a Segger Jlink.
Modifying the byte in the startup_S32K148.S file.
Things I've tried already:
1) Simply changing the FSEC byte (and backdoor comparison key) in startup_S32K148.S:
MohMoh_6-1669726065693.png
My FSEC byte is 0xBB (0b10111011)
MohMoh_0-1669727658038.png
2) I found a post stating that if I'm using the IAR compiler I need to use the "--enable_config_write" argument in my .board settings (https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-IAR-Linker-file-for-initalizing-FSEC-Flash...). I've done this. Please find a snippet of FlashS32K148.board below
MohMoh_5-1669725400205.png
This gets used by S32K148.i79 via the flash loader in Eclipse. Please find below
MohMoh_4-1669725063352.png
3) I also read that I need to use the (allow security) variant of my board when debugging with SEGGER (https://wiki.segger.com/S32Kxxx). Again I've done this. :
MohMoh_1-1669724452115.png
After modifying these settings I'm still getting 0xFE returned from FTFC->FSEC
MohMoh_7-1669726169840.png
MohMoh_9-1669726257095.png
0xFE is the default value for this register. Any guidance on what am I missing would be very much appreciated.
Moh