2025-05-14 10:26 AM
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>
"
2025-05-14 11:00 AM
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
2025-05-14 1:18 PM
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
2025-05-14 7:00 PM
Thanks @KnarfB ,
Thats sounds right.how to change the endianess
2025-05-14 9:52 PM
in the Memory View: New Renderings... -> Hex Integer
hth
KnarfB
2025-05-14 10:16 PM
Hi knarfb,
Didn't get thing.could u please eloborate
2025-05-19 5:11 PM
Hi, could you explain a bit more on that
2025-05-19 6:10 PM
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.
2025-05-19 9:45 PM
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
2025-05-19 9:50 PM
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.