Does NXP imxrt 1052 controller has programmable interrupt vector table or is it having hardcoded interrupt vector table??
Thanks for the reply.
It solves most of my problems. It seems NXP i.MXRT 1052 has fixed interrupt vector addresses.
Just for more clarity, my query is as below -
-> If I want to replace the predefined NXP GPIO interrupt handler with my callback function located at some different address, is there any API which does this job in NXP i.MXRT 1052 controller?
There is a CMSIS function NVIC_SetVector which you probably could use for that purpose if your vector table is located in RAM. If you are using any XIP example from NXP the vector table will be located in flash. For that case you would have to copy the vector table to RAM first and relocate VTOR.
Hi
The Cortex-M7 in the i.MX RT 1052 controls the location of the interrupt vector table via its Vector Table Offset Register register (at address 0xe000ed08).
Regards
Mark
[uTasker project developer for Kinetis and i.MX RT]
Thanks for the quick reply.
But, I am still not clear.
What specifically I want to know is as below -
-> Is writing handler with same name and running my callback function from the handler is the only way to run callback in NXP IMXRT 1052 controller or I can bypass this handler completely, write my own callback function and pass its address as directly as interrupt handler in vector table?
Hi
I am not exactly sure about what you mean but the vector table in example code for imxrt processors is located in the file startup_MIMXRTxxxx.s (assembler).
If you want to overwrite an interrupt you can either change the name in the vector table and implement your own ISR or you can overwrite the implementation of NXP because the interrupt handlers in the vector table are all PUBWEAK (IAR EWARM).
In the vector table you can find the following line
DCD DMA0_DMA16_IRQHandler ;DMA channel 0/16 transfer complete
The implementation of this IRQ Handler is
PUBWEAK DMA0_DMA16_IRQHandler
PUBWEAK DMA0_DMA16_DriverIRQHandler
SECTION .text:CODE:REORDER:NOROOT(2)
DMA0_DMA16_IRQHandler
LDR R0, =DMA0_DMA16_DriverIRQHandler
BX R0
Be careful if you are using NXP SDK drivers if you change the vector table. If they depend on the interrupt you want to change you will have to call the interrupt handler of the driver.
Kind regards,
Stefan