Sign in

username:

password:



Not a member?

Search motoroladsp



Search tips

Subscribe to motoroladsp



motoroladsp by Keywords

56303 | 563xx | 5680 | 56805 | 5680x | 56F80 | 56F800DEMO | 56F805 | 56f807 | 56F830 | ADC | Bootloader | Codec | CodeWarrior | CW5 | CW6 | Debugger | DSP56303 | DSP56303EVM | DSP563xx | DSP5680 | DSP56800 | DSP56807 | DSP56858 | DSP56858EVM | DSP56F803 | DSP56F805 | DSP56F807 | DSP56F80x | DSP56F826 | DSP56F827 | DSP56F8xx | EVM | FFT | Flash_over_jtag | GPIO | Interrupt | Interrupts | JTAG | LCD | Linker | MCF5307 | Metrowerks | Modulus | MSCAN | PCMaster | PWM | Quad | Rif | RTOS | SDK | SPI

Discussion Groups

Discussion Groups | Freescale DSPs | 56f80x interrupt/pipeline problem?

Technical discussions about Freescale (Motorola) DSPs (including the DSP56000, DSP56300, DSP56600, 56800 DSPs).

  

Post a new Thread

56f80x interrupt/pipeline problem? - bergy50us - Oct 19 14:08:00 2004




I'm running a round robin multitasker on a 56F801.
Interrupts are heavily used, but not for task switching.
When I go to change the stack pointer (SP) I find that I must lock out
interrupts around the following:

move x:(r3),sp
nop
move x:(sp)-,r1
move x:(sp)-,r2
move x:(r1)+,b
rts

where r3 contains the address of a different task's saved stack pointer.
r1, r2, and b need to be preserved across task switching (r1 is used
as a data stack pointer, r2 must be preserved, and b is the top
element of the data stack that r1 points to)

Adding a bfset #$200,sr and replacing the rts with an rti (to allow
the pulling of the stacked status, therefore restoring the state of
the interrupt mask) fixes this. eg:

bfset #$200,sr
move x:(r3),sp
nop
move x:(sp)-,r1
move x:(sp)-,r2
move x:(r1)+,b
rti

Also running the code with interrupts enabled but not occuring also
fixes the problem.
Only if I change sp with interrupts allowed and occuring does this
code fail. I am assuming that the other 3 move instructions are not
the problem though.
I expect this is a problem with the chip's pipelining. I have not
been able to find anything on-line, in the manuals, in the on-line ap
notes or errata, or in this group.

Any thoughts? What am I missing?

Gary





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