i.MXRT1021&&MCUPresso IDE Interrupt the method of redirecting the table to ram

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MXRT1021&&MCUPresso IDE Interrupt the method of redirecting the table to ram

644 Views
jarman_zhou
Contributor I

Hi,I have two more questions

1.How do I redirect an interrupt vector to RAM? My development environment is MCUPresso IDE and MIMXRT1020-EVK.

2.How do you specify an interrupt handler to run in RAM based on the first problem?

Because the project is running in XIP mode, and I want to operate FLASH, but the system outage will cause FLASH read and write exceptions

0 Kudos
Reply
1 Reply

621 Views
jay_heng
NXP Employee
NXP Employee

1). You need to manually copy 1KB vector table from flash (0x60002000) to RAM, and then set SCB->VTOR to ram address in startup code. I have two blogs on this topic

嵌入式Cortex-M中断向量表原理及其重定向方法
嵌入式Cortex-M中断向量表对齐原则的深入研究

2). You need to make the interrupt handler to be ramfunc, see my blogs below:

MCUXpresso IDE下将应用程序RW段分散链接的几种方法
MCUXpresso IDE下将关键函数重定向到RAM中执行的几种方法