I am creating a custom board and using STM32F303 chip. I have looked into the datasheet and there are 3 boot modes and according to the datasheet the bootloader resides in the ROM memory.
I got confused on few things like what the three boot modes do? Because in other microcontrollers we have one boot sequence in which the microcontroller fetches the reset handlers address and start executing the startup code and according to the STM32 datasheet using the boot pins we can decide among flash, system memory and SRAM boot.
If I select system memory or SRAM boot does that mean the STM32 has separate reset handlers for these modes or what's their use then?
And secondly, if I decide to boot from flash memory (the chip contains no firmware, only the ROM bootloader is in the chip) then will the bootloader invoke like in other MCUs, that it first looks for the firmware on the serial peripheral and then the MCU fetches the reset handler address here, because I didn't select the system boot mode where bootloader is present?
If yes then for a new chip with no firmware or in every reset I have to first select the system boot mode to invoke the bootloader then I have to select the flash boot mode in STM32?