AnsweredAssumed Answered

MPC5748 FlashErase IVOR1Trap using C55FG Flash Standard Software Driver

Question asked by 雄 苏 on Jul 11, 2019
Latest reply on Jul 21, 2019 by Lukas Zadrapa

Hi I'm developing a bootloader for MPC5748G, and I found AN5319 on the official website days ago, so I decided to develop my bootloader based on it. Unfortunately when I erase the flash with the SSD driver, the bootloader will jump to IVOR1Trap. I checked the reference manual and realize that the reason might be read and write flash simultaneously at an same partition, but I'm still confused why there is no problem in AN5319.


My SSD driver was downloaded from this page:

It's different from AN5319, but I think they are just different versions, is that so?


And there are my code:  



when midBlockSelect = 0x2f0, pFlashErase() worked well, but if midBlockSelect = 0x3F8, it jumped to IVOR1. When midBlockSelect = 0x3F8, blocks 0x00F90000--0x00F93FFF and  0x00FB0000--0x00FB7FFF are selected to be erased, but they are located in Read Parition 2 which contains my bootloader codes. That might cause the IVOR1Trap, but I'm not so sure about it.


And there are codes from AN5319:


When lowBlockSelect = 0x17C, it will erase blocks  0x00FC0000--0x00FC7FFF,  0x00FC8000--0x00FCFFFF and  0x00FE0000--0x00FEFFFF in Read Partition 0 which contains block  0x00FC8000--0x00FCFFFF occupied by bootloader.

When midBlockSelect = 0x3FE, it will erase several blocks in Read Partition 2 which contains block 0x00F90000--0x00F93FFF  occupied by bootloader.



So what's the real reason, please help me to find it, thanks! And forgive my poor English ^_^.

Lukas Zadrapa