MPC5748G - programming flash with same partition

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

MPC5748G - programming flash with same partition

503 Views
songoku711
Contributor II

Hi,

I have an bootloader code which is in flash address range 0x01000000 - 0x01040000 (in RWW partition 6 according to RM). The story is I can use this bootloader to erase and write flash in another partition (for example 0x01200000 - 0x013FFFFF in RWW partition 7), but for the case flash in the same with bootloader partition (let's say 0x01080000 - 0x011FFFFF, still in RWW partition 6), it's unable to write into. I mean the erase and write process, which I had referred to NXP example code, performed smoothly and no error flag set, but when I verify those written address, the value is all 0xFF, which means it failed.

I also tried to move the write flash function into RAM section to execute (only write flash function, the other code in bootloader is still in flash) and the result is still the same, no write success into flash which is same partition with bootloader code.

I searched through NXP application note and community but found no topic related to this case. Is there any evidences, explanations for this, or anything that I'm missing?

Please help me!

0 Kudos
Reply
1 Reply

485 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

please check if the blocks are unlocked. No error flag is set when you try to program/erase locked block. You can find in description of PEG bit in C55FMC_MCR register:

lukaszadrapa_0-1637773783885.png

Regards,

Lukas

0 Kudos
Reply