AnsweredAssumed Answered

STM32F4 Unusual interrupt behaviour

Question asked by AlexSmart on Sep 12, 2013
Latest reply on Sep 17, 2013 by AlexSmart
So, here the situation.
There is high priority asynchronous external interrupt and low priority systick interrupt.
In EXTI handler I disable all interrupts and make pulse on test output 1
In SysTick -  pulse on test output 0.
And the weird part - on the logic analyser (drawing below).
So in EXTI handler, with no interrupt enabled(!) Systick interrupt appears...
Piece of init code:
#define LOWPRIO        0xF0
#define HIGHESTPRIO    0x00
NVIC_SetPriority (SysTick_IRQn,            LOWPRIO);
NVIC_SetPriority (EXTI3_IRQn,            HIGHESTPRIO);

Asynchronous external interrupt
void  EXTI3_IRQHandler(void)
    OUT1_PORT->ODR|=OUT1_PIN; // set test output 1
    delay_ctr = 100;
    OUT1_PORT->ODR&=~OUT1_PIN; // clear test output 1
SysTick and RTX OS tick handlers
/*-------------------------- SysTick_Handler --------------------------------*/
__asm void SysTick_Handler (void) {
#ifdef  IFX_XMC4XXX
        EXPORT  SysTick_Handler_Veneer
        PUSH    {R4,LR}                 ; Save EXC_RETURN
        BL      __cpp(rt_systick)
        B       Sys_Switch
/*--------------------------- rt_systick ------------------------------------*/
void rt_systick (void) {
  /* Check for system clock update, suspend running task. */
  P_TCB next;
    *((volatile unsigned int*)0x40020C14) |= 0x0020; // set test output 0>state = READY;
  rt_put_rdy_first (;
  /* Check Round Robin timeout. */
  rt_chk_robin ();
  /* Update delays. */
  rt_dec_dly ();
  /* Check the user timers. */
  rt_tmr_tick ();
  /* Switch back to highest ready task */
  next = rt_get_first (&os_rdy);
  rt_switch_req (next);
    *((volatile unsigned int*)0x40020C14) &= ~0x0020; // clear test output 0