We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am problems with bank switching: I use: Keil Compiler, STR912FAW44X6 rev H and ULINK2. Bank 0: Main program (FMI not configured) Bank 1: Bootloader (FMI: NBBank 512K, 0x80000, BBank 32K 0x0). The RemapBank 1 is uncommented from 91x_fmi.h Hardware remap using CSX bit activated to boot always from bank 1.
I start from Bank 1, and jump to Bank 0 using the following function stored in RAM: FMI->BBSR = 0; //Size 32K FMI->NBBSR = 6; //Size 512K FMI->NBBADR = 0x0 >> 2 ; FMI->BBADR = 0x80000 >> 2; FMI->CR |= 0x18; Jump_To_Application = (pFunction) 0x00; Jump_To_Application();
The program gets blocked. If I press reset or power-off the program starts again from bank 1, but never jumps to bank 0.
Trick: I load a program on bank 0 with FMI BBank: 512K, 0x0, NBBank 32K, 0x80000 and then load again the same program on Bank 0 with the FMI not configured. In this case the jump from Bank 1 to 0 is done OK. If I press reset, the program starts again from Bank 1 and the jump is always done OK.
The problem is that when I disconnect the power, the program starts again from Bank 1 but gets blocked when jumping to 0. It seems that some register stored the first time I loaded the program on bank 0 with FMI, is mantained until the power is switched off. And when switching off, the FMI on bank 0 is not configured and this is why it crashes (not sure about that).
Please I need some help to resolve this problem and find the correct FMI configuration to switch between banks.
Thank you very much, Firin