Skip to main content
Graduate
May 14, 2025
Question

Interrupt Vector Table

  • May 14, 2025
  • 6 replies
  • 1112 views

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

 

"

    This topic has been closed for replies.

    6 replies

    Graduate II
    May 14, 2025

    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

    Super User
    May 14, 2025

    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  

    Graduate
    May 15, 2025

    Thanks @KnarfB ,

    Thats sounds right.how to change the endianess

    Super User
    May 15, 2025

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

    hth

    KnarfB

     

    Graduate
    May 15, 2025

    Hi knarfb,

    Didn't get thing.could u please eloborate

    Graduate
    May 20, 2025

    Hi, could you explain a bit more on that

    Graduate II
    May 20, 2025

    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. 

    Graduate
    May 20, 2025

    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

    Graduate
    May 23, 2025

    Hi,

    I got it.as youa re asking to use same function names declared in startup file.I tried it si working .But  I am looking for soltion where I have define some function funcHandler() and It need to attach this on interruptVectorTable.for example at 0x000000DC(Loc at IVT) i,e, &funcHandler needs to be placed at 0x000000DC.
    How to Achive this.
    I tried to use pointer also.
    uint32_t *p;

    p=(uint32_t *)(0x000000DC);

    *p=(uint32_t)&funcHandler;

    while debugging,value didnt change

     

    Super User
    May 23, 2025

    this area is flash memory and you cannot write to it like writing to RAM. You may however relocate the entire vector table to SRAM using SCB->VTOR.

     

    Graduate
    May 24, 2025

    Thanks knarfb, I git the answer.thanks for the support an precise answer.

    You may close this ticket