Marius Boncea

Code in Paged RAM area MC9S12XET512

Discussion created by Marius Boncea on Jun 10, 2009
Latest reply on Jun 10, 2009 by kef

Hello,

I'm using the MC9s12XET512 controller and I want to do the following:

-link some code in RAM paged area(use the FC,FD,FE,and FF RAM pages)

-download the code in these RAM pages using the existing application that resides in the flash memory,and CAN communication.

The issue that I'm facing is how can I call the functions that are stored in the paged RAM area?I know that for functions placed in the paged flash area, the modifier "@far" in function declaration allows  the CALL/RETC instructions to set and restore the PPAGE register, when calling paged functions in flash memory.

But how can a similar mechanism be used for RPAGE register?For calling the functions from paged RAM area I am using a pointer to function table, so at call time I will not know which function is placed in which RAM page.  

Outcomes