if an Application, started from Bank A, sets via IAP-command "Chip_IAP_SetBootFlashBank(..B)" flashbank B to get the active one, the Bootloader (after a reset) does start Flashbank A again as Flashbank A has not been invalidated (with 00000000 from 0x1A000001C on) while Flashbank B (with valid 4-Byte Checksum at 0x1B000001C (calculated out of Vector-Tables 0 to 6)) has been validated only. I expected the Bootloader to start Flashbank B
Here is a code-snippet of my application, started from Bank A, for setting B to get the active one. What am I missing?:
__disable_irq();
ret_code = Chip_IAP_SetBootFlashBank(IAP_FLASH_BANK_B);
if (ret_code != IAP_CMD_SUCCESS){
DEBUGOUT("Command failed to execute, return code is: %x\r\n", ret_code);
}
__enable_irq();/* Re-enable interrupt mode */ NVIC_SystemReset();
Hi Mario Göckel,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
According to your statement, the flash bank switch fails even if ret_code is IAP_CMD_SUCCESS after executing the Chip_IAP_SetBootFlashBank(IAP_FLASH_BANK_B) function, is it right? And MCU always boot from the Flash bank A?
So I'd like to suggest you check the POW bit in the FLASHCFGA and FLASHCFGB registers for confirming, please give a try.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------