1.4.5.5 bootloader_ProgramFlashBankSelect Function

C

void bootloader_ProgramFlashBankSelect( void );

Summary

Selects Appropriate Program Flash Bank after reset.

Description

This function can be used to select the appropriate Program flash bank based on the serial number stored at fixed location in each of the bank after reset.

Bootloader should know the address at compile time where the serial number is stored in each bank. It reads the serial number from both banks, Compares the values and maps the bank with highest serial number to lower region.

  • Note: This Function will be generated only for MIPS based MCUs with dual flash bank support and when the dual bank support option is selected in MCC bootloader component settings

    • Refer to Bootloader Configurations section for more details

Precondition

  • PORT/PIO Initialize must have been called.

  • This Function should be called before calling bootloader_Trigger() function

Parameters

None

Returns

None

Example

bootloader_ProgramFlashBankSelect( void );

if (bootloader_Trigger() == false)
{
    run_Application();
}