Reply by VE3ID September 28, 20062006-09-28
Oops. sorry about that. Must have been that extra beer!
cheers,
Nigel
Tony Papadimitriou wrote:
> ----- Original Message -----
> From: "VE3ID"
> To:
>
>> IIRC,changes to BPROT are only effective after the next restart.
>>
>
> You're thinking of the CONFIG register, not BPROT.
>
>
>> Nigel
>>
>
> t...@acm.org
>
>
>
Reply by Tony Papadimitriou September 28, 20062006-09-28
----- Original Message -----
From: "VE3ID"
To:
> IIRC,changes to BPROT are only effective after the next restart.

You're thinking of the CONFIG register, not BPROT.

> Nigel

t...@acm.org
Reply by Tony Papadimitriou September 28, 20062006-09-28
----- Original Message -----
From: "Daniel Bull"
To:
> My project uses the 68HC11F1 in expanded mode. I have tried to clear the
BPROT
> register with no success. I modified the startup code with the lines
>
> ldaa #00;
> staa BPROT (or $1035)
>
> just after initializing the stack pointer. This should execute within the
first 64 clock cycles.
> When I run the program the register does not change. The register reads as
0x1F, which
> is the default. Therefore I cannot write to EEPROM. I am using Imagecraft
C compiler V6.
> CONFIG is 0x0F.
>
> In an earlier project using V5, I was able to write to EEPROM.

A "CLR BPROT" should be good enough (although I wouldn't enable CONFIG
without need to change it). The stack pointer is irrelevant.

My guess is that your compiler's startup code writes BPROT to $1F (or $FF)
sometime after your "staa BPROT" (and that doesn't necessarily have to be
within the first 64 cycles).

Use a simulator to trace the generated machine code and look for writes to
BPROT.

> Dan

t...@acm.org
Reply by VE3ID September 28, 20062006-09-28
IIRC,changes to BPROT are only effective after the next restart.

cheers,
Nigel
Daniel Bull wrote:
>
> Hello -
>
> My project uses the 68HC11F1 in expanded mode. I have tried to clear
> the BPROT
> register with no success. I modified the startup code with the lines
>
> ldaa #00;
> staa BPROT (or $1035)
>
> just after initializing the stack pointer. This should execute within
> the first 64 clock cycles.
> When I run the program the register does not change. The register
> reads as 0x1F, which
> is the default. Therefore I cannot write to EEPROM. I am using
> Imagecraft C compiler V6.
> CONFIG is 0x0F.
>
> In an earlier project using V5, I was able to write to EEPROM.
>
> Any suggestions? I have also tried using clr $1035. That didn't work
> either. In all cases
> the stack pointer was initialized. The program runs perfectly, except
> I can't write to
> EEPROM.
>
> Thanks,
> Dan
>
>
--
Nigel Johnson
MSc., MIEEE, MCSE
VE3ID/G4AJQ/VA3MCU

http://nigel.homelinux.net
http://va3mcu.ham-radio-op.net

You can reach me by voice on Skype: TILBURY2591

If time travel ever will be possible, it already is. Ask me again yesterday

This e-mail is not and cannot, by its nature, be confidential. En route from me to you, it will pass across the public Internet, easily readable by any number of system administrators along the way.
Reply by Daniel Bull September 28, 20062006-09-28
Hello -

My project uses the 68HC11F1 in expanded mode. I have tried to clear the BPROT
register with no success. I modified the startup code with the lines

ldaa #00;
staa BPROT (or $1035)

just after initializing the stack pointer. This should execute within the first 64 clock cycles.
When I run the program the register does not change. The register reads as 0x1F, which
is the default. Therefore I cannot write to EEPROM. I am using Imagecraft C compiler V6.
CONFIG is 0x0F.

In an earlier project using V5, I was able to write to EEPROM.

Any suggestions? I have also tried using clr $1035. That didn't work either. In all cases
the stack pointer was initialized. The program runs perfectly, except I can't write to
EEPROM.

Thanks,
Dan