MPC5744 EEPROM Emulation with Qorivva failed

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

MPC5744 EEPROM Emulation with Qorivva failed

Jump to solution
1,341 Views
liujinhang
Contributor III

I have added the driver code to my own project , but when swapping, an error of "eraseStatus_Flag = ERASE_SWAPERROR" occured.

 

MCU: MPC5744p Q9

DRIVER: EEE_Driver_v1.2.0 (no modified)

Memory Layout:

 

119666_119666.bmpTT截图未命名.bmp

main: as same as main function in ee_demo.c;

When the first block is full , it should be swapped. After swapping, the eraseStatus_Flag = ERASE_SWAPERROR;

I traced the procedure of EEE_Driver, and I found that before'FSL_FlashEraseStart' was exacuted, the block is full like below:

119667_119667.bmpTT截图未命名.bmp

but after the funtion 'FSL_FlashEraseStart' being exacuted, the first block can not be erased succesfully. see below:

119668_119668.bmpTT截图未命名.bmp

we can see that there were four bytes can not be erased.

this case coursed 'EE_ERROR_MISMATCH' error in function 'FSL_FlashRead' doing the 'BLANK_CHECK' in the after steps.

That's why swap failed.

What I want to kwno is how can I swap the blocks successfully?

I even moved all the code to RAM from ROM and then exacuted them , but the result is still same.

One thing need NOTE: I used the DEMO project of RAM, the result is sucessful. But when I run the DEMO of FLASH, I found that I cannot down load the .elf file to MCU. See below:

119831_119831.bmpTT截图未命名.bmp

I also want to know the reason.

Labels (1)
0 Kudos
Reply
1 Solution
887 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

first of all, let's try if the flash can be erased ever. Select in main menu: MPC5XXX -> Tools -> Program FLASH (Prepare only)

Then enter this command: flash.erase 0x00800000--0x00803FFF

Is this working?

Regards,

Lukas

View solution in original post

0 Kudos
Reply
2 Replies
888 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

first of all, let's try if the flash can be erased ever. Select in main menu: MPC5XXX -> Tools -> Program FLASH (Prepare only)

Then enter this command: flash.erase 0x00800000--0x00803FFF

Is this working?

Regards,

Lukas

0 Kudos
Reply
887 Views
liujinhang
Contributor III

Thank you very much for your response. But it needs not to try, because I got the reason why SWAP failed.  

when I moved the code from DEMO project to my own project, I lost the macro definition of "DCACHE_AVAILABLE".

So I have tried to add the definition of "DCACHE_AVAILABLE" to my own project, and glad to see the SWAP succesfully.

0 Kudos
Reply