AN2345 Freescale Semiconductor / Motorola, AN2345 Datasheet - Page 31

no-image

AN2345

Manufacturer Part Number
AN2345
Description
Real-Time Memory Manager for StarCore DSPs
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
#if
#if
void VSMM_ENTER_CRITICAL(void)
{
LOCK_SAVE
}
void VSMM_EXIT_CRITICAL(void)
{
LOCK_RESTORE
}
#endif
#endif
#if
// Disable all interrupts except those with a priority > 5.
void VSMM_ENTER_CRITICAL(void)
{
asm(" di");
asm(" bmclr #7<<5,SR.H");
asm(" bmset #5<<5,SR.H");
asm(" nop");
asm(" nop");
asm(" ei");
}
// Enable ALL Interrupts
void VSMM_EXIT_CRITICAL(void)
{
asm(" di");
asm(" bmclr #7<<5,SR.H");
asm(" nop");
asm(" nop");
asm(" ei");
}
#endif
// if critical method == 4 & OSE_RTOS == 1 then use spin-locks
#if ((VSMM_CRITICAL_METHOD == 4) && (OSE_RTOS > 0))
void VSMM_ENTER_CRITICAL(void)
{
bsp_spinlock_aquire(gpusiCMSpinLock);
}
void VSMM_EXIT_CRITICAL(void)
{
bsp_spinlock_release(gpusiCMSpinLock);
}
#endif
// end vsmm_cfg.c
Freescale Semiconductor, Inc.
OSE_RTOS > 0
VSMM_CRITICAL_METHOD == 2
// end ose_rtos > 0
// end vsmm_critical_method == 2
VSMM_CRITICAL_METHOD == 3
// end vsmm_critical_method == 3
// end vsmm_critical_method == 4
For More Information On This Product,
/* Restore interrupts back to their prev state */
/* Disable interrupts */
Go to: www.freescale.com
VSMM Configuration Source Listing
31

Related parts for AN2345