Thomas Gaffney

FLASH Reprogramming on S12X

Discussion created by Thomas Gaffney on Aug 24, 2006
Latest reply on Jun 1, 2010 by Jonathan Valks

Are there any plans for a FLASH programming utility app note (much like AN2720) to be created and released specific to the S12X.  I am working with a MC9S12XDP512 and would like to have the capability of reprogramming a few pages of FLASH that contain data tables.

I think I understand the basic setup of the FLASH registers along with address and data lines but don't fully understand the assembly code in AN2720.  Is the stack being used to basically check the CBEIF for the flash complete signal because the FLASH cannot be read from at this time meaning RAM has to be used.  Can this assembly code be used as is on an S12X core?

Also, if the XGATE is configured to run out of RAM, could 1 of the 8 software trigger interrupt routines be used after the FLASH command is sent to the fcmd register.  This would eliminate the need to specifically use the stack.  Any feedback on any of these questions is appreciated.