I am new to Freescale MCU,HCS08
in my application, i need to reprogram some flash area to update my parameters, my upate subroutine locate in FLASH
i shoud copy the update subroutine from FLASH to RAM, and re-program flash , right?
if it is right ,how to how to copy a subroutine from FLASH to RAM?
any guys here know how to do it, plz tell me, thanks a aot
Solved! Go to Solution.
Hello caseykevin,
Welcome to the fora!
Take a look https://community.freescale.com/message/35354#35354
The key is the doonstack subroutine
Hello,
There are two different methods of using RAM for the programming of non-volatile data. One method uses the stack, as Peg has referenced. The second method uses a fixed block of RAM, often placed at the bottom of the stack. In this case the temporary block size can be as little as 20 bytes. I recall that the code required for this method has also been previously placed on this forum - see if you can find it using the forum search.
You do not say whether you are coding in assembly or C.
Regards,
Mac
hi,mac
i am coding in C langeuage, do i need to use assembly to do it?
Hello caseykevin,
Welcome to the fora!
Take a look https://community.freescale.com/message/35354#35354
The key is the doonstack subroutine
thank u for your link,i will go to read it