I am revisiting a very old project which needs updating to a more available processor (SH4 to PA4). Seems the flash changes quite a bit. I have some great ultra small RAM footprint flash erase / write code (attached) which has been used in production for years on hundreds of thousands of units, feel free to use it (it has been used on hundreds of thousands of units for many years without issue).
Has anyone got similar code that will work on PA4 (or similar family)? Or can you easily touch my code to make it work? This code works on every other processor I have used in this family, and works well. I did see some other posts but nothing complete and working. Obviously I can work through it, but if someone already has done the work it will save me a day of doing it myself, and its Christmas time
Would be nice if freescale adapted this type of code I have attached as a "standard" for their documentation as its far more practical than the cumbersome and selfish code they supply in their examples.
Original Attachment has been moved to: flash.h.zip
Original Attachment has been moved to: flash.c.zip