2009-10-25 09:31 PM
Porting from ST10F269 to ST10F276, what about XRAM2 region?
2009-10-25 09:31 PM
Hi,
In several projects we use the ST10F269 controller. We would like to use the ST10F276 in future. However, the firmware has to be compatible to old PCB’s with the ST10F269. As it is easy on runtime to determine if the firmware is running on the ST10F269 or ST10F276 it’s easy to make a firmware set-up for one of both controllers. Now there is only one problem that I see. In the ST10269 we have most variables located in XRAM2. Is it possible to locate the XRAM2 region of the ST10F276 also in memory range 0xc000...0xdfff using register XADRS3? Peter2012-02-22 05:27 PM
The 276 has 64k of XRAM2, so locating it at the same address as the 269 XRAM2 would not be possible as it would use up all of segment 0.
You could determine at run time what type of part you are running and then set a pointer to where all your data lives or something messy like that.Remember the placing of XRAM2 out of segment 0 in the 276 means that you now need to use the DPPs correctly to get to that RAM. Not a problem in C as your compiler will take care of if for you, but makes an assembly project more tricky. Note that you need to change to a segmented mode if not using one now...