I use the offical SDK demo"flash_partitioning_s32144" and debug with OPEN SDA.
I run the project once and it works, the eeprom can work normally.
But I want to make another DEFlashPartition with a different configuration。I found the previous DEFlashPartition information already exist.So I need a "mass erase" or "erase all blocks" to clear the configuration.
Question:How to perform "mass erase" or "erase all blocks"?I select the "Emergency Kinetis Device Recovery by Full Chip Erase" in the Debug Configurations " but no use.
I modify the demo like below,I add the "FLASH_DRV_EraseAllBlock" command .
I change the target to Debug_RAM and I can see the function is located to the RAM.
I debug the demo step by step .But when it run to the line FTFx_FSTAT |= FTFx_FSTAT_CCIF_MASK;in the function "FLASH_DRV_CommandSequence" in the FLASH_DRV_EraseAllBlock ,an error occurred like below.
So, what's the reason?How to use FLASH_DRV_EraseAllBlock correctty?
Hello cqhcau@163.com,
Seen the FLASH_DRV_EraseAllBlock clear the flash configuration field I will suggest trying the FLASH_DRV_EraseAllBlockUnsecure API.
Also, be sure that the command is executed from RAM since al the flash will be cleared after this.
Best Regards,
Alexis Andalon
Thanks,first.
I use the function FLASH_DRV_EraseAllBlockUnsecure, but also with an error. Could you give me a demo of how to use erase all command.Thanks.
Hi cqhcau@163.com,
You would find attached the main file using the RTM 3.0.0 and the S32K Design Studio. You can substitute the main code from the example flash_partitioning_s32k144 by this.
Remember that you need to run this using the debugRAM option.
Let me know if this help you.
Best Regards,
Alexis Andalon
Hi cqhcau@163.com,
That's very strange since I'm running this example without any problems:
Did you do any additional settings for this? You need to first run a debug session, stop it and after running again to enter the FLASH_DRV_EraseAllBlockUnsecure.
These are my setting for the flash component:
Let me know if this helps you.
Best Regards,
Alexis Andalon
Who can help me?