expanded mode using address space 2000-7fff as external RAM?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

expanded mode using address space 2000-7fff as external RAM?

1,279 Views
PBis
Contributor I
which MCS12 MCU ( any suggestion which one and why??)  can work in expanded mode using address space 2000-7fff as external RAM. Can we still boot from Flash in expanded mode? if yes any short code which does so ??
I will appreciate any help or suggestions.
Kind Regards



Labels (1)
0 Kudos
Reply
1 Reply

503 Views
DPB
NXP Employee
NXP Employee
Hello

The S12 devices by default map internal RAM either to a range starting in 0x0000 or ending at 0x3FFF.
The S12 devices (as opposed to S12X) allow the RAM range to be moved using the INITRM register. Thus if you select a device with the default range ending at 0x3FFF, it is still possible to remap the RAM so that it does not conflict with your external RAM at 0x2000-0x3FFF. Note also that mapping the RAM base address to 0x0000 conflicts with the REG internal register range. So using 0x1000 as the RAM base address is probably better, if you select a device with 4K of RAM or less.

Internal flash can be put in the memory map in expanded mode using the ROMCTL pin and ROMON bit in the MISC register. Using ROMCTL it is possible to reset into expanded mode with the internal flash in the memory map for bootloading purposes. It is possible to then write to ROMON to remove the internal flash from the memory map. Note ROMON is a write once bit in normal expanded mode.

Note also that on many S12 devices the internal flash is mapped from 0x4000-0xFFFF, so with ROMON=1 the whole range 0x4000-0xFFFF is mapped to this flash and is no longer available externally until ROMON is cleared.

The S12C family supports the INITRM feature and features devices with 2K and 4K of internal RAM.
Other device families' larger internal RAM blocks would conflict with your external range 0x2000+

DPB


 
0 Kudos
Reply