Hi,
my ISR is not called from a pending interrupt.I see that the pending flag of the external interrupt becomes active in ISPR after I call my_fun(). Also, the specific enable bit in ISER is set correctly. This is the only interrupt which is enabled in.ISER. I also tried to comment out priority setting.Call sequence:
// # 128 -> desired external interrupt __NVIC_EnableIRQ(128U); __NVIC_SetPriority(128U,1U); __enable_irq();
// # 128 -> desired external interrupt
__NVIC_EnableIRQ(128U);
__NVIC_SetPriority(128U,1U);
__enable_irq();
// call to my_fun generates the interruptmy_fun();
// call to my_fun generates the interrupt
my_fun();
But my ISR is not called!
Settings:BASEPRI = 0
BASEPRI = 0
Status before call sequence:ICSR = 0x00403803SHCSR = 0x0DHCSR = 0x01010001
ICSR = 0x00403803SHCSR = 0x0DHCSR = 0x01010001
Is it necessary to enable more interrupt related stuff or clear active system handler first?I'm connected with Lauterbach and load and run the ELF file via this device with DBGEN = 1. Could this be a problem?
Vector table:
extern const VECTOR_TABLE_Type __VECTOR_TABLE[145];const VECTOR_TABLE_Type __VECTOR_TABLE[145] __VECTOR_TABLE_ATTRIBUTE = { (VECTOR_TABLE_Type) (&__INITIAL_SP), /* Initial Stack Pointer */ Reset_Handler, /* Reset Handler */ NMI_Handler, /* -14 NMI Handler */ HardFault_Handler, /* -13 Hard Fault Handler */ MemManage_Handler, /* -12 MPU Fault Handler */ BusFault_Handler, /* -11 Bus Fault Handler */ UsageFault_Handler, /* -10 Usage Fault Handler */ 0, /* Reserved */ 0, /* Reserved */ 0, /* Reserved */ 0, /* Reserved */ SVC_Handler, /* -5 SVCall Handler */ DebugMon_Handler, /* -4 Debug Monitor Handler */ 0, /* Reserved */ PendSV_Handler, /* -2 PendSV Handler */ SysTick_Handler, /* -1 SysTick Handler */
extern const VECTOR_TABLE_Type __VECTOR_TABLE[145];
const VECTOR_TABLE_Type __VECTOR_TABLE[145] __VECTOR_TABLE_ATTRIBUTE = {
(VECTOR_TABLE_Type) (&__INITIAL_SP), /* Initial Stack Pointer */
Reset_Handler, /* Reset Handler */
NMI_Handler, /* -14 NMI Handler */
HardFault_Handler, /* -13 Hard Fault Handler */
MemManage_Handler, /* -12 MPU Fault Handler */
BusFault_Handler, /* -11 Bus Fault Handler */
UsageFault_Handler, /* -10 Usage Fault Handler */
0, /* Reserved */
SVC_Handler, /* -5 SVCall Handler */
DebugMon_Handler, /* -4 Debug Monitor Handler */
PendSV_Handler, /* -2 PendSV Handler */
SysTick_Handler, /* -1 SysTick Handler */
/* Interrupts */ InterruptHandler_0, InterruptHandler_1, InterruptHandler_2,
/* Interrupts */
InterruptHandler_0,
InterruptHandler_1,
InterruptHandler_2,
...
InterruptHandler_128 // here my ISR is a while(1) loop
};