suspend the erase sector command

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

suspend the erase sector command

1,618 Views
814420552
Contributor III

hello,

when i test the erase sector command,  and I make a break point in function FLASH_DRV_EraseResume. then run the code to the break point, i found suspend function does not take effect(all the two sector are erased to FF, but i expected it should erase stop when execute FLASH_DRV_EraseSuspend),

whether the use method is wrong?  and when should i used this fucntion FLASH_DRV_EraseSuspend?

//-==============code========================

#define BASE_ADDRESS  0x80000

FLASH_DRV_EraseSector(&flashSSDConfig, BASE_ADDRESS, 4096*2);

FLASH_DRV_EraseSuspend();

FLASH_DRV_EraseResume();

wish your help!  thansk in advance!

0 Kudos
6 Replies

1,497 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

Please, refer to the installation folder of S32DS C:\NXP\S32DS_ARM_v2018.R1\S32DS\S32SDK_S32K1xx_RTM_3.0.0\platform\drivers\src\flash\doxygen or

C:\NXP\S32DS_ARM_v2.2\S32DS\software\S32SDK_S32K1xx_RTM_3.0.0\platform\drivers\src\flash\doxygen

 There you can see the section "## Important Note"

2. To suspend the sector erase operation for a simple method, invoke the
#FLASH_DRV_EraseSuspend function within callback of #FLASH_DRV_EraseSector. In this case, the
#FLASH_DRV_EraseSuspend must not be placed in the same block in which the Flash erase sector
command is going on.
3. #FLASH_DRV_CommandSequence, #FLASH_DRV_EraseSuspend and #FLASH_DRV_EraseResume should be executed from RAM
or different Flash blocks which are targeted for writing to avoid the RWW error.
#FLASH_DRV_EraseSuspend and #FLASH_DRV_EraseResume functions should be called in pairs.

I hope it helps.

Best regards,

Diana

0 Kudos

1,497 Views
814420552
Contributor III

Hello Diana,

   My question above is the same operation with the  

2. To suspend the sector erase operation for a simple method, invoke the
#FLASH_DRV_EraseSuspend function within callback of #FLASH_DRV_EraseSector. In this case, the
#FLASH_DRV_EraseSuspend must not be placed in the same block in which the Flash erase sector
command is going on.

why it does not suspend the erase operation?  (when executed the suspend operation all the two sectors are erased)

0 Kudos

1,497 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

Can you share your code?

Thank you.

Best regards,

Diana

0 Kudos

1,497 Views
814420552
Contributor III

hello Diana,

 

when i test the erase sector command,  and I make a break point in function FLASH_DRV_EraseResume. then run the code to the break point, i found suspend function does not take effect(all the two sector are erased to FF, but i expected it should erase stop which some of the erasing area is not been erased  when execute FLASH_DRV_EraseSuspend) and the following is my test code.

//-==============code========================

#define BASE_ADDRESS  0x80000// define in the second Bank

FLASH_DRV_EraseSector(&flashSSDConfig, BASE_ADDRESS, 4096*2);

FLASH_DRV_EraseSuspend();// execute in the first bank

FLASH_DRV_EraseResume();// execute in the first bank

or whther can you provide the demo code?

thanks in advance!

0 Kudos

1,497 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

I'm very sorry for the delay. Unfortunately, there is no demo code.

However, when you invoke EraseSuspend() function after EraseSector() function you can expect that the memory is erased. (The memory is erased after FLASH_DRV_EraseSector() function. So, using FLASH_DRV_EraseSuspend() function after the using FLASH_DRV_EraseSector() function lacks meaning)

Best regards,

Diana

0 Kudos

1,497 Views
814420552
Contributor III

hello,

   thanks for your answer,  if i want to check the suspend result (for example when erasing then suspend ), how can i coding for testing the FLASH_DRV_EraseSuspend function? 

0 Kudos