Hi All,
I having some trouble writing to the internal Flash memory, I can erase the flash blocks fine.
I think my problem is I am not really understanding the steps in the MPC manual for programming.
Ignoring the process of unlocking the blocks (which I'm sure I have right), the MPC manual states:
"Write the first address to be programmed in the flash module with the program data."
A sampe of my code I am using for testing is to write the data $12345678 to address 0x0006_0000
lis r12,6 ; Hardcode to address $60000 for testing
lis r11,1234
ori r11,r11,5678 ; Try to write 12345678 to $60000
stw r11,0(r12)
Then turn on the EHV bit.
But this doesn't work, in fact it makes the CPU reset.
Am I missing something?
Thanks.
Hey Bloodhound,
We provide flash drivers with an API for writing to the flash on the MPC55xx MCU's. I would recommed that you uses these drivers as the handle the set up of the flash for sucessful programming.
Here if the link to the drivers:
Regards,
Dayve
the driver is good but it does not run on all the versions of mpc5554!!!
how do i find out which version is my mpc???