Sign in

username:

password:



Not a member?

Search hc11



Search tips

Subscribe to hc11



Ads

Discussion Groups

Discussion Groups | M68HC11 | Re: static config reg can not be changed

Technical discussions about Freescale Microcontrollers: M68HC11. (Freescale Semiconductor is a Subsidiary of Motorola).

Re: static config reg can not be changed - jackson_cp - Sep 21 5:48:00 2004


> The short answer to your question is: Yes, it can be done.
>
> I have been working on a project recently that uses a 'F1 in
> expanded mode, with FLASH mapped to $8000-$FFFF. I, too, have had
> the need to be able to write to the FLASH underlying the EEPROM
that
> is default-mapped to $FE00-$FFFF when the 'F1 is started in
> bootstrap mode.
>
> One thing that many users of the HC11 are unaware of with regard to
> the CONFIG register is that it is implemented as both a static
latch
> and a EEPROM cell. The CONFIG static latch *can* be written to (in
> special test or bootstrap mode) independent of the EEPROM cell.
> Writing to the CONFIG register using a normal store operation (as
> opposed to the EEPROM programming procedure) will update the static
> latch, applying the CONFIG change for the current session, until
> written again or MCU reset.
>
> If you use the JBug 'R' command to update CONFIG (e.g. R
> CONFIG=$7F), JBug will attempt to update CONFIG using the EEPROM-
> write method, which does NOT update the static latch. However, if
> you use JBug's MM or F(ill) commands to update it, it will be
> written using a normal memory write operation.
>
> The bottom line: To perform a 'temporary' CONFIG register change,
> use this JBug command:
>
> F 1030 +0 7F
>
> Issuing the above command will change the CONFIG register to $7F.
>
> One handy feature of JBug that I have found particularily useful
for
> development with my 'F1 expanded mode project is the AUTOSTART
macro
> feature. I use an AUTOSTART macro to automatically initialize
> the 'F1 CONFIG and chip-select-control registers. Since AUTOSTART
> is executed every time the target is reset, my target is always
> configured to operate in expanded mode with the mappings that my
> hardware requires.
>
> The macro I use actually loads a small program into internal RAM
> which performs the initialization tasks I need (I do this because
> there are several hardware subsystems I need to initialize that
> cannot be set up using simple memory writes) but for basic CONFIG
> and chip select register programming, the following macro would
> likely suffice:
>
> DEFM AUTOSTART
> BEGIN
> S ;Make sure CPU is stopped
> F 103F +0 7F ;Map EEPROM to 7E00-7FFF
> F 105C +0 30B50001 ;Configure chip selects
> END
>
> Create the above macro definition using a text editor (such as the
> macro editor built into JBug) and save it (I put it in my project
> directory under the name 'F1Start.MCR'). Go into JBug's Settings
> dialog, General tab, and check the 'Load macro on boot' checkbox,
> and enter the path to your macro definition file in the space
> provided. Save these settings under an appropriate name. Now,
when
> you do a target reset (assuming JBug is 'listening' properly) the
> CONFIG and chip select registers will be automatically set for you.
>
> You will likely have to modify the values for the chip select
> register settings (the 2nd 'F' instruction in the macro) to
> something other than the ones I show above. The values shown are
> suitable for a 32K RAM on -CSGEN at $0000-$7FFF, 32K ROM on -CSPROG
> at $8000-$FFFF, memory-mapped peripheral(s) on -CSIO1 at $x000 with
> 0 wait states, and a character LCD module on +CSIO2 at $x800 with 3
> wait states.
Thank you for the information. I have tried the sane thing, but
unfortunately it is giving some error.

1. First I have tried to change the CONFIG register using the
command ˇ§F 1030 +0 7Fˇ¨
But it gave a error message in the popup window ˇ§Echo error
writing RAMˇ¨
2. Second I have experimented with AUTOSTART macro. But that
also give an error message
ˇ§F 103F +0 7F „˛ cannot be used to write config
F 1030 +0 7F
Writing control regs 1030..1030
Diagnostics for : Echo error writing RAM

What would be the problem here. In our hardware we have mapped only
External SRAM from the location 0x8000-FFFF. No other memory mapping
is changed.
Could you please find out what went wrong here.

Thanking you

JACKSON





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