About IPSR
I use STM32F1 Value Line Discovery Kit.
I would like to have a common interrupt handler and call the corresponding handler from that common handler.
I am assuming the following.
Specifically, I am trying to get the IPSR number from its common handler and call the corresponding function pointer.
-------------------------------------------
vec_common: // Set this as a common handler for all vector tables.
push {r4,r5,r6,r7,r8,r9,r11,LR}
MRS r0 , IPSR
bl interrput // Call interrput() with the first argument being the value of IPSR.
pop {r4-r11, PC}
-------------------------------------------
-------------------------------------------
typedef void (handler)(void);
handler int_hdlr[61];
void interrput(int int_no){
handler hdlr = int_hdlr[int_no];
if(handler){
handler(); // Call the handler for the corresponding interrupt
}
}
-------------------------------------------I generated the UART3 interrupt and looked at the into_no (IPSR) in the interrupt function and found it to be 0x37 (55d).
The manual says the UART3 interrupt position is 0x27(39d), I thought the IPSR value and the interrupt position in the manual would match, do you want to tell me about the relationship between them? Is there any offset?
