| CPC G06F 9/4401 (2013.01) | 20 Claims |

|
1. A method for program loading, the method being implemented at an electronic device, wherein a preconfigured bin file is stored in a flash memory of the electronic device, the method comprising:
loading the bin file at a program loading speed that is a first speed, the bin file comprising a configuration parameter for adjusting the program loading speed;
adjusting the program loading speed to a second speed based on the configuration parameter in the bin file; the second speed being faster than the first speed;
loading a first-stage bootloader (FSBL) at the program loading speed which is adjusted to the second speed;
wherein the adjusting the program loading speed to a second speed based on the configuration parameter in the bin file comprises:
obtaining a port physical layer (PHY) register configuration parameter, a flash memory adaptation parameter, and a serial peripheral interface (SPI) clock rate parameter in the bin file;
adjusting a board-level wiring PHY register configuration in the flash memory based on the PHY register configuration parameter; and
enabling a quad SPI (QSPI) mode of an SPI based on the flash memory adaptation parameter to cause the program loading speed to reach the second speed, or adjusting a clock rate of the SPI in the flash memory based on the SPI clock rate parameter to cause the program loading speed to reach the second speed, or enabling the QSPI mode of the SPI based on the flash memory adaptation parameter and adjusting the clock rate of the SPI in the flash memory based on the SPI clock rate parameter, to cause the program loading speed to reach the second speed.
|