What we do here to get around this problem, is to use the Motorola SDK Interrupt
Dispatcher and a "Normal" interrupt. How to do this is described in several of
my earlier postings to the motoroladsp discussion group. The SDK Interrupt
Dispatcher saves and restores everything, including the Hardware Stack.
If you don't want to use the SDK Interrupt Dispatcher, you can save and restore
the lc and la registers and the Hardware Stack yourself, please see my message
"RE: [motoroladsp] Interrupt stack pointer corruption" that I posted on
September 23, 2002, at 12:37pm. It explains what you need to do.
I am posting this message to the motoroladsp discussion group, as I think other
members could find this information to be useful.
Senior Systems Analyst
PMC Prime Mover Controls Inc.
3600 Gilmore Way
Burnaby, B.C., Canada
Phone: 604 433-4644
FAX: 604 433-5570
From: Danknick, Dan [mailto:]
Sent: Thursday, November 14, 2002 6:03 PM
To: Art Johnson
Subject: HW stack Hi Art,
Are you aware of any replacement math library routines from Metrowerks that are
safe to use in an ISR? I just got bit by a HW stack overflow in ARTDIVU16UZ.asm
- seems the ISR "wrapper" doesn't bother saving the HW stack.
I saw you posted new versions of the memcpy() stuff to the Yahoo group that
didn't use DO loops, just wondering if you dealt with math as well.
Thanks and best regards,