AN2345 Freescale Semiconductor / Motorola, AN2345 Datasheet - Page 30

no-image

AN2345

Manufacturer Part Number
AN2345
Description
Real-Time Memory Manager for StarCore DSPs
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
VSMM Configuration Source Listing
30
/*
**************************************************************************
*
*
* Method 1: Disable/Enable interrupts using simple instructions. After * critical
section, interrupts will be enabled even if they were disabled * before entering the
critical section.
*
* Method 2: Disable/Enable interrupts by preserving the state of
* interrupts.
* interrupt disable flag in the local variable ’guliDSPSR’ and then
* disable interrupts. You restore the interrupt disable state by testing
* the interrupt enable bit, in ’guliDSPSR’, and if clear re-enable
* interrupts; else leave interrupts disabled.
*
* Method 3: Disables interrupts, adjusts the Interrupt Priority Mask
* (IPM), and re-enables interrupts when entering a critical section. When
* exiting a critical section interrupts are disabled, the IPM restored,
* and interrupts re-enabled. This method is useful when you want
* higher-priority processes to continue to generate and service interrupts,
* i.e. an OS Kernel. Note that it is extremely important that these higher-
* prioritiy processes do not access any VSMM routines.
*
* Method 4: Utilizes an OSEck spin-lock (binary semaphore) to ensure
* mutual exclusivity. VSMM_CRITICAL_METHOD must be set to 4 and OSE_RTOS
* must be set to 1 to implement this method.
**************************************************************************
*/
#if
#if OSE_RTOS > 0
void VSMM_ENTER_CRITICAL(void)
{
}
void VSMM_EXIT_CRITICAL(void)
{
}
#else
void VSMM_ENTER_CRITICAL(void)
{
}
void VSMM_EXIT_CRITICAL(void)
{
}
#endif
#endif
LOCK
UNLOCK
asm (" di");
asm (" ei");
VSMM_CRITICAL_METHOD == 1
// end ose_rtos > 0
// end vsmm_critical_method == 1
Freescale Semiconductor, Inc.
For More Information On This Product,
Generally speaking you would store the state of the
/* Enable interrupts */
/* Enable interrupts
/* Disable interrupts */
/* Disable interrupts */
Go to: www.freescale.com
Motorola MSC8101 (Big Model)
*/

Related parts for AN2345