Hi all,
I'am currently working on a project on an mpc5516 microcontroller. I would like to transfer data from ram to internal flash, but I do not succeed in finding relevant information about writting data on flash memory in the reference manual (mpc5510RM). For example, on page 22-20, chapter Flash Array and Control, section Flash Programming, we are told that to program the flash, we need to "Write the first address to be programmed in the flash module with the program data", but I can not find in the rest of the document precisely where the address and data have to be written.
If anyone has tips or code examples about this issue, that would be great!
I also have read that Freescale provides a set of flash drivers called the Standard Software H7F Driver. Anyone knows where I may find it?
Thanks a lot,
Nicolas
Solved! Go to Solution.
Hi,
flash drivers can be found here:
http://www.freescale.com/files/microcontrollers/software/device_drivers/MPC5500_H7F_SSD_v323.zip
The package contains drivers, examples, user manual...
"Write the first address to be programmed in the flash module with the program data"
- this sentence means that you have to write data directly to flash address that is going to be programmed. For example:
*(unsigned int *)0x1000 = 0xAABBCCDD;
If you follow all other steps described on mentioned page 22-20 then this will program value 0xAABBCCDD to address 0x1000 in flash.
And important note from reference manual:
"Whenever a program operation occurs, ECC bits are programmed. ECC is handled on a 64-bit boundary.
Thus, if only one word in any given 64-bit ECC segment is programmed, the adjoining word (in that
segment) should not be programmed because ECC calculation has already completed for that 64-bit
segment. Attempts to program the adjoining word will probably result in an operation failure. It is
recommended that all programming operations be from 64 bits to 128 bits, and be 64-bit aligned. The
programming operation should completely fill selected ECC segments within the page."
Lukas
I know that this topic is old but I'm starting to learn about MPC5500 family to create a simple read and write example for a Microcontroller.but the link provided in this topic is dead or removed by ST for some reason.
http://www.freescale.com/files/microcontrollers/software/device_drivers/MPC5500_H7F_SSD_v323.zip
please provide me with an updated link or if there is an updated solution.
to be clear I'm not interrested in Buying a professional programmer.since i'm trying to learn how to implement my own.
Thanks
Is it possible to use this drivers for MCP5517 microcontrollers??
Yes, this one can be used also for MPC5517:
http://www.freescale.com/files/microcontrollers/software/device_drivers/MPC5500_H7F_SSD_v323.zip
Lukas
Hi,
flash drivers can be found here:
http://www.freescale.com/files/microcontrollers/software/device_drivers/MPC5500_H7F_SSD_v323.zip
The package contains drivers, examples, user manual...
"Write the first address to be programmed in the flash module with the program data"
- this sentence means that you have to write data directly to flash address that is going to be programmed. For example:
*(unsigned int *)0x1000 = 0xAABBCCDD;
If you follow all other steps described on mentioned page 22-20 then this will program value 0xAABBCCDD to address 0x1000 in flash.
And important note from reference manual:
"Whenever a program operation occurs, ECC bits are programmed. ECC is handled on a 64-bit boundary.
Thus, if only one word in any given 64-bit ECC segment is programmed, the adjoining word (in that
segment) should not be programmed because ECC calculation has already completed for that 64-bit
segment. Attempts to program the adjoining word will probably result in an operation failure. It is
recommended that all programming operations be from 64 bits to 128 bits, and be 64-bit aligned. The
programming operation should completely fill selected ECC segments within the page."
Lukas
Thank you very much for your quick answer, it is very helpful!