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

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Discussion Groups

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Freescale DSPs | DSP56F807 - Mutual exclusion using IPL 0 masking

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

  

Post a new Thread

DSP56F807 - Mutual exclusion using IPL 0 masking - Aaron Needles - Oct 29 23:05:00 2002

Hi,
I need a mutual exclusion mechanism that allows access to two
global variables as an atomic unit. To prevent code within an ISR
from accessing one of the variables during this short period, I would
like to mask IPL 0 interrupts while I access the pair and then unmask
IPL 0 interrupts again when done. I would also like to put this code
into a function that automatically determines if masking is already
in affect (SR bit $0200 is set) so that the IPL 0 mask in the SR can
be restored to its original state. This would allow the function to
be called from inside or outside ISRs without the user keeping track
of IPL 0 masking.
Is it possible to use a BFSET instruction to set the IPL 0 mask
bit in the SR and then test whether this bit was actually changed?
This would then allow me to restore the mask after my "critical
section" of code. So far I have not been suscessful in my attempts
to do this, so I am wondering if anyone has a mechanism like this
working.
I am using an up to date version of Metrowerks with the 56F807
DSP.

Thanks,
Aaron


______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



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