Don't know, whether the question is put right, anyway, I'm debugging an assembler program.
The effect is, that as soon as I enable interrupts using the "cpsie i" instruction, an exception (code=5, buserror) occurs.
"cpsie i"
The PC (TOS) has some weird value (00000007). I can only imaging that some timer or some other asynchronous event is causing this.
I also intercepted the sysTick-Handler by a breakpoint but this isn't being hit. (I'm using STM32CubeIDE 1.9.0 to debug the code).
Is it possible to look ahead just in the moment before I'm about to enable interrupts to detect which interrupt source is pending?
Forgot to mention that disabling IWDG Interrupts (suspend watchdog counters during debugging) didn't help.
You should be able to read the NVIC_ISPRn registers to see which external interrupts are pending.
Core interrupts (SysTick included) are elsewhere, in SCB->SHCSR
I'm debugging an assembler program.
Did you remember to set up your vectors with bit 0 set (to select THUMB mode for the ISR?
Regarding the vector addresses: yes, they all have point to Handler+1.
Thanks for the other tips.
BFSR:
x/b 0xe000ed29 0xe000ed29: 0x04 (IMPRECISERR)BFAR:
x 0xe000ed38 0xe000ed38: 0xf8NVIC Registers are all 0
I've learnt that IRs are enabled from start on. In this case the IR was disabled a few instructions after Reset.
Then some initialization occurs. Also Systicks are enabled. Cannot say where exactly the Busfault occurs. Will have to narrow it down somehow.
Regarding the vector addresses: yes, they all point to Handler+1.