cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP1 interrupt causes undefined exception in ARM mode (but works in thumb)

bsvi
Visitor

I modified an FSBL example to get to the root of the problem (everything else being as in the example).

 

 

 

volatile int rrr = 0;
void SGI0_IRQHandler(void) {
    while (1) {
        rrr++;
    };
}

int main()
{
  HAL_Init();
  SystemClock_Config();

  IRQ_Disable(SGI0_IRQn);

  IRQ_SetPriority(SGI0_IRQn, 0);
  IRQ_Enable(SGI0_IRQn);

  while(1) {
	  GIC_SendSGI(SGI0_IRQn, 1, 0);
  }
}

 

 

 

This works perfectly in thumb mode, but when I switch to ARM (that probably should give slight performance boost for my DSP task), the interrupt is stuck in Vectors section, without doing anything.

bsvi_0-1732116792961.png

The LR is weird, and I cant get my head around how is it possible that is has LR = 0x2ffe0106 (not multiple of 4)

bsvi_1-1732116911656.png

As if the core switched to thumb mode without address being odd and started executing instructions in 16 bit mode.

Thanks for any advice :)

0 REPLIES 0