DPRG
DPRG List  



[DPRG] HELP with 68HC11 stack problem

Subject: [DPRG] HELP with 68HC11 stack problem
From: Clay Timmons ctimmons at cadence.com
Date: Wed Jun 20 10:39:36 CDT 2001

HELP!   I'm having a problem with a 68HC11 microcontroller board.
I consider myself a near expert on the 68HC11 but this one has me baffled.
I'm not even sure of the most basic question.  Is this a software or hardware
problem.   I've spent about 3 hours tracking down this one and still haven't
found it.  For reference I'm using a New Micros NMIY-0020 board and
Imagecraft ICC11 C-compiler.



My code runs fine when the very first instruction is  LDS #0x00FF
which loads the stack pointer to the 256 byte RAM internal to the HC11 itself.

When I cange the code to LDS #0x4000 to initalize the stack pointer
to external RAM  I have a problem.   On powerup nothing happens
but then if I hit the reset button it works fine.   I can't figure out why
it would hang on powerup but work after reset?  Powerup should be
the same as reset right...  I also really wonder what its doing when
it appears to hang.



Anyone ever set the stack to external memory?    Any advantage/disadvantage?
I think everything should work the same with the stack in external or internal
memory.  My code has grown and grown and now I'm needing more stack space.

The external memory is a ST Microelectronics NVSRAM.   I started to suspect
that it takes some time after powerup before you can access it.  I added some
delay in the code to compensate but it had no effect.  So much for that idea.


Any ideas, even crazy ones, are appreciated,

-Clay Timmons-









More information about the DPRG mailing list