Hello,I am using s32k1xx.I have found a issue about the"FLASH_DRV_CommandSeque"when it launched in different memory block.
I knew that when used " __attribute__((section (".code_ram")))",it would be launch in RAM.I I wanted to know if I can still use flash erase command or program command if I delete this definition.Then I have found the issue:
1.When the program runs to eee Initialization function "FLASH_DRV_DEFlashPartition➡FLASH_DRV_CommandSequence",mcu will reset.Reset source is "LOCK UP".I used the "step over".



2.Before mcu reset, I used the "step into" to run "FLASH_DRV_CommandSequence".The program will run normally and also I debugged the same program again,issue 1 that I described earlier will not happen.
3.In issue 1 and 2 process,the FTFC_FSTAT is normally.CCIF is 1 before every memory commands.
I have read the S32RM manual then I find these reasons:
1.

2.

I don't know if I have found the cause of the issue.
I have 4 questions:
1.In issue 1 when I used the "step over" to run eee Initialization function,Why does the MCU reset?
2.In issue 2 when I used the "step into" to run "FLASH_DRV_CommandSequence",Why can the program run normally?Why I debugged the same program again,issue 1 that I described earlier will not happen?
3.How to understand Reason 1 and Reason 2,are they causing this issue?
4.If I can still use flash erase command or program command if I delete the"__attribute__((section (".code_ram")))"?What are the block requirements for flash erase command or program command if I delete the"__attribute__((section (".code_ram")))"?
if you have any ideas,please contact me or comment in the comment sections,Thanks so much.
Best regards,
ZZKK