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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

417件の閲覧回数
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 件の賞賛
1 返信

394件の閲覧回数
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中执行的几种方法