DSPRelated.com
Forums

Stack Extension..

Started by Steve Kellogg December 3, 2004
Hello,

I'm using a 56321, and I think I need to enable Stack extension (I'm
getting unpredictable behavior in an interrupt that can be 'fixed' by
reducing the nesting level of DOR loops). I've looked all over for a simple example of how to correctly enable
stack extension, and I can't seem to find one. Can anyone here point
me to a source? Thanks in advance, Steve




Steve,

Essentially you just need to ensure that the stack size (SZ) and
extension pointer (EP) registers are configured and that you've
selected X or Y memory space before enabling stack extension...

--
dB

--- Steve Kellogg <> wrote:

> Hello,
>
> I'm using a 56321, and I think I need to enable Stack extension (I'm
> getting unpredictable behavior in an interrupt that can be 'fixed' by
>
> reducing the nesting level of DOR loops). > I've looked all over for a simple example of how to correctly enable
> stack extension, and I can't seem to find one. Can anyone here point
>
> me to a source? > Thanks in advance, > Steve

__________________________________



Dear Steve,

We use the following strategy:

(1) extern F_lc_ub_se
(2) extern F_lc_ue_se

(3) move #F_lc_ub_se+2,ep
(4) move #(F_lc_ue_se-(F_lc_ub_se+2))/2+14,sz
(5) bset #16,OMR
(6) bset #20,OMR

In here (1) and (2) are begin/end locator labels for the
extension stack. (3) concerns a workaround for silicon bug
ES6. (4) Initialises the stack size register according the
56300 family manual. (5) sets the space in which extension
stack resides (in this case Y space). (6) enables the stack
extension mechanism.

Regards,
--
Henk-Piet Glas Support Engineer
-----------------------
E-mail: Altium Software BV
Voice: +31-33-455 85 84 Saturnus 2
Fax: +31-33-455 55 03 3824 ME Amersfoort
WWW: http://www.altium.com The Netherlands
--------[Altium - Making Electronics Design Easier]--------