Greg Semeraro

Programming on-chip flash with mcf52223evb

Discussion created by Greg Semeraro on Nov 29, 2006
Latest reply on Dec 3, 2006 by Mark Butcher
I'm new to the CodeWarrior toolset and the mcf52223evb. My problem is that I have not been able to get code into the on-chip flash of the device (MCF52223 cpu). My application is too large to fit into SRAM alone (which is necessary to run in the debugger without programming the flash). To eliminate all variables with the code I am trying to get the "Hello World" application that comes with the board into flash (modified to blink the LEDs so I can tell it is running - works fine when run out of SRAM on the board with the "M52223EVB Console Debug" build).

When I use the CF Flasher application I get nowhere - it complains that it cannot talk to the PE_USB_ML puck.

When I use the flash programmer (with the "M52223EVB Internal ROM.elf.S19" build) within CodeWarrior I get the following error:

"Flash Programmer: Flash driver reports the following error(s): Chip reported error during program"

I'm using the P&E config file that came with the board and all default linker map files, etc. It looks like things are reasonably correctly configured because the flash code gets downloaded, initialized and executes.

This is probably something simple, but as the saying goes "everything is easy once you understand it" - anyone out there understand this one?

It almost seems like the flash is write protected or something but I cannot find any documentation to that effect. I would appreciate any/all comments.