cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt Vector Table

Alex_reynold
Associate III

Hello,
As per CM4 guide and TRM of Nucleo f446re,interruot vector table is array of function pointers and each pointer holds the entry address(initial address) of each IRQ_handler, Where interrupt IRQ_number is used for indexing.

While debugging I failed to observe the intial address of teh reset handler and USART2_Handler at location 0x0000 0004 and 0x0000 00DC respectively.Please find the samething in attachments.Address fo the IRQ_handlers are available in expressions window snapshot and actuall value stored at location 0x0000 0004 and 0x0000 00DC is not matching.
Am I missing something here?
I am just verifying my understanding -->"At each location in IVTable,address oif IRQ handlers should be ther (&<IRQ_Handler_Name>Screenshot 2025-05-14 222309.png

 

Screenshot 2025-05-14 222359.png

 

Screenshot 2025-05-14 222411.png

 

"

12 REPLIES 12

Hard to discern from the presentation.

Perhaps the built code and the code on the device aren't current / coherent.

Make sure the build complete, and the code delivered / verified. Check Release vs Debug build

Check the .MAP file, perhaps OBJDUMP the .ELF

What function is at 0x08000530 ? The ODD version is jump the +1 indicating the code is THUMB/16-BIT

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
KnarfB
Super User

The renderings seem to be in the wrong endianess, so 690A0008 reads 0x08000A69 (match!) and the other handler seems to be one word to the left: 1D050008 -> 0x0800051D. The least significant bit indicates a branch to thumb mode code.

hth

KnarfB  

Alex_reynold
Associate III

Thanks @KnarfB ,

Thats sounds right.how to change the endianess

in the Memory View: New Renderings... -> Hex Integer 

hth

KnarfB

 

Hi knarfb,

Didn't get thing.could u please eloborate

Alex_reynold
Associate III

Hi, could you explain a bit more on that

That there is a configuration item that controls how the hex data is presented in the memory dump. It doesn't change what's in memory. 

You could also print out the vector table as an array of 32-bit unsigned into. Use the serial console and printf() to format as desired. 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hi,

Ok I got it.what to assign user defined function as an interrupt handler to some ISR.

Currently for all interrupts,there is already handler names declared as weak functions.

 

Best RGS,

Alex

You define a C function with the very same name like so void  USART2_IRQHandler(void) {...} and the linker will pick your function and ignore the weak one.