AnsweredAssumed Answered

MPC5744 EEPROM Emulation with Qorivva failed

Question asked by liu jinhang on Dec 24, 2015
Latest reply on Dec 28, 2015 by liu jinhang

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:

 

TT截图未命名.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:

TT截图未命名.bmp

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

TT截图未命名.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:

TT截图未命名.bmp

I also want to know the reason.

Outcomes