Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC

Ads

Discussion Groups

Discussion Groups | 68HC12 | INITRM and RAMHAL

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

INITRM and RAMHAL - eric_cina - Feb 12 12:45:14 2008

I've been using an A128 which has 8K RAM for several years now. I
set the INITRM to 0x20 to place the RAM at 0x2000 to 0x3FFF and I
thought I knew what I was doing.

Recently I started using the A256 which has 12K RAM and I realized
that I have not been understanding correctly how the INITRM works.
The default reset value of INITRM is 0x09. Wouldn't this place the
RAM at 0x800 to 0x37FF?

I set the INITRM to 0x10 to place the RAM at 0x1000 but this seems
to actually place the RAM at 0x0 to 0x2FFF. If I use 0x11 (setting
RAMHAL to 1) this will place it at 0x1000 to 0x3FFF like I want but
I don't understand it.

Can somebody please explain the relationship between RAM15 to RAM11
and the RAMHAL bit? Does the RAMHAL bit override the RAM15 to RAM11?
How do they interact?

The documentation does not do a very good job explaining this.

Thanks,
Eric



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )


Re: INITRM and RAMHAL - Edward Karpicz - Feb 13 3:39:27 2008

Eric wrote:

> I've been using an A128 which has 8K RAM for several years now. I
> set the INITRM to 0x20 to place the RAM at 0x2000 to 0x3FFF and I
> thought I knew what I was doing.
>
> Recently I started using the A256 which has 12K RAM and I realized
> that I have not been understanding correctly how the INITRM works.
> The default reset value of INITRM is 0x09. Wouldn't this place the
> RAM at 0x800 to 0x37FF?
>

Not at all. As far as I know not all INITRM bits are implemented (or have
effect) in all derivatives. Derivatives with 4k of RAM should be able to
place RAM at any 4k boundary, $0, $1000, $2000 etc. Derivatives with 8k -
at any 8k boundary: $0, $2000, $4000 etc. But derivatives with 12k can have
RAM placed at any 16k boundary and RAMHAL determines the position of
remaining 16k-12k either at top of 16k boundary or at the bottom. So after
reset A256 should have its RAM at 0x1000 to 0x3FFF :-).
> I set the INITRM to 0x10 to place the RAM at 0x1000 but this seems
> to actually place the RAM at 0x0 to 0x2FFF. If I use 0x11 (setting

Yeah. 0x10 means RAMHAL==0 and 4k hole is at the top of 16k boundary.

> RAMHAL to 1) this will place it at 0x1000 to 0x3FFF like I want but
> I don't understand it.
>
> Can somebody please explain the relationship between RAM15 to RAM11
> and the RAMHAL bit? Does the RAMHAL bit override the RAM15 to RAM11?

16k boundaries are 0,$4000,$8000,$C000. So only bits RAM15, RAM14 and RAMHAL
are used in A256.
> How do they interact?

BTW setting INITRM to 0x39 makes all S12 derivatives alligning their top of
RAM to $3FFF.

>
> The documentation does not do a very good job explaining this.

+

>
> Thanks,
> Eric
>

Edward



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )