S32K144-EERPOM problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K144-EERPOM problem

1,724 Views
cqhcau
Contributor I

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.

 

0 Kudos
7 Replies

1,278 Views
cqhcau
Contributor I

I modify the demo like below,I add the "FLASH_DRV_EraseAllBlock" command .

pastedImage_1.png

I change the target to Debug_RAM and I can see the function is located to the RAM.

pastedImage_11.png

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.

pastedImage_8.png

So, what's the reason?How to use FLASH_DRV_EraseAllBlock correctty?

0 Kudos

1,278 Views
Alexis_A
NXP TechSupport
NXP TechSupport

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

0 Kudos

1,278 Views
cqhcau
Contributor I

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.

0 Kudos

1,276 Views
Alexis_A
NXP TechSupport
NXP TechSupport

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.

pastedImage_1.png

Let me know if this help you.

Best Regards,

Alexis Andalon

0 Kudos

1,277 Views
cqhcau
Contributor I

Hi,Alexis Andalon

   I change my project follow your instructions,but also with the same error.

  The attach is my project and below pictures are the main EmSys Registers.

 Best Regards.

pastedImage_1.pngpastedImage_2.pngpastedImage_3.png

0 Kudos

1,277 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi cqhcau@163.com‌,

That's very strange since I'm running this example without any problems:

pastedImage_1.png

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:

pastedImage_2.png

Let me know if this helps you.

Best Regards,

Alexis Andalon

0 Kudos

1,277 Views
cqhcau
Contributor I

Who can help me?

0 Kudos