Fix IRQ management in FreeRTOS to avoid crash and deadlock in BLE stack.

This commit is contained in:
Jean-François Milants
2021-02-14 14:42:30 +01:00
parent 6420885abb
commit 01e194426d
2 changed files with 24 additions and 2 deletions

View File

@@ -354,4 +354,24 @@ static void vPortEnableVFP( void )
configASSERT( NVIC_GetPriorityGrouping() <= ulMaxPRIGROUPValue );
}
uint32_t ulSetInterruptMaskFromISR( void )
{
__asm volatile (
" mrs r0, PRIMASK \n"
" cpsid i \n"
" bx lr "
::: "memory"
);
}
/*-----------------------------------------------------------*/
void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask )
{
__asm volatile (
" msr PRIMASK, r0 \n"
" bx lr "
::: "memory"
);
}
#endif /* configASSERT_DEFINED */