STR912--IAP問題
ARM處理器產(chǎn)生的地址叫虛擬地址,把這個(gè)地址按照某種規(guī)則轉(zhuǎn)換到另一個(gè)物理地址去的方法稱為地址映射。
banko,bank1就是物理地址,而ARM處理器(例如KEIL下就是虛擬地址), 通過CAP可以將bank1物理地址映射到虛擬地址0x00, 然后通過軟件設(shè)置將bank0物理地址映射到虛擬地址0x00,bank1映射到虛擬地址0x80000
//RAM_exevoid Execute_STR9Application(void)
void Execute_STR9Application(void)
{
pFunction Jump_To_Application;
/* -------------------------------------------------------------------------- */
/* Configure bank 0 as 512KB and bank 1 as 32KB */
/* Remap bank 0 at address 0x0 and bank 1 at address 0x80000 */
/* -------------------------------------------------------------------------- */
FMI->BBSR = 0x0;//之前相同
FMI->NBBSR = 0x6;//之前相同
FMI->BBADR = 0x80000 >> 2;//FMI->BBADR=0(之前)
FMI->NBBADR = 0x0 ; //FMI->NBBADR = 0x8000>>2 (之前)
/* Jump to the user application and execute it */
Jump_To_Application = (pFunction) 0x00;
Jump_To_Application();
}
引導(dǎo)塊(跳轉(zhuǎn)之前)----地址:0x00000 大小32K
非引導(dǎo)塊(跳轉(zhuǎn)之前)--地址:0x80000 大小512K
引導(dǎo)塊(跳轉(zhuǎn)之后)----地址:0x80000 大小32K
非引導(dǎo)塊(跳轉(zhuǎn)之后)--地址:0x00000 大小512K
評(píng)論