Hello @lukaszadrapa
Thank you for your response. I've checked core registers and now I'm able to jump to bootloader from firmware.
Now I want to use primary and secondary bootloader so I'm using 24 KB for Primary bootloader and 64 KB for secondary bootloader.
Flash configuration in Primary bootloader:
static const flash_user_config_t _xFlashFirmwareInitCfg =
{
.PFlashBase = 0x0U,
.PFlashSize = 0x16000U, // 24KB + 64KB = 88KB
.DFlashBase = 0x10000000U,
.EERAMBase = 0x14000000U,
.CallBack = NULL_CALLBACK
};
Flash configuration in Secondary bootloader:
static const flash_user_config_t _xFlashFirmwareInitCfg =
{
.PFlashBase = 0x6000U,
.PFlashSize = 0x7A000U, // 64KB + 424KB = 448KB
.DFlashBase = 0x10000000U,
.EERAMBase = 0x14000000U,
.CallBack = NULL_CALLBACK
};
With this configuration I'm not able write or erase flash memory at address 0x16000 in secondary bootloader project.
But if I'm using below configuration for secondary bootloader then I'm able to write/erase this memory.
static const flash_user_config_t _xFlashFirmwareInitCfg =
{
.PFlashBase = 0x0000U,
.PFlashSize = 0x80000U, // 24KB + 64KB + 424KB = 512KB
.DFlashBase = 0x10000000U,
.EERAMBase = 0x14000000U,
.CallBack = NULL_CALLBACK
};
I'm not able to understand Why configuration of base address and flash size of primary bootloader is also required to be configured in secondary bootloader ?