ESP8266_RTOS_SDK
v1.4.0
|
boot APIs More...
Macros | |
#define | SYS_BOOT_ENHANCE_MODE 0 |
#define | SYS_BOOT_NORMAL_MODE 1 |
#define | SYS_BOOT_NORMAL_BIN 0 |
#define | SYS_BOOT_TEST_BIN 1 |
#define | SYS_CPU_80MHZ 80 |
#define | SYS_CPU_160MHZ 160 |
Functions | |
uint8 | system_get_boot_version (void) |
Get information of the boot version. More... | |
uint32 | system_get_userbin_addr (void) |
Get the address of the current running user bin (user1.bin or user2.bin). More... | |
uint8 | system_get_boot_mode (void) |
Get the boot mode. More... | |
bool | system_restart_enhance (uint8 bin_type, uint32 bin_addr) |
Restarts the system, and enters the enhanced boot mode. More... | |
flash_size_map | system_get_flash_size_map (void) |
Get the current Flash size and Flash map. More... | |
bool | system_update_cpu_freq (uint8 freq) |
Set CPU frequency. Default is 80MHz. More... | |
uint8 | system_get_cpu_freq (void) |
Get CPU frequency. More... | |
boot APIs
#define SYS_BOOT_ENHANCE_MODE 0 |
It can load and run firmware at any address, for Espressif factory test bin
#define SYS_BOOT_NORMAL_BIN 0 |
user1.bin or user2.bin
#define SYS_BOOT_NORMAL_MODE 1 |
It can only load and run at some addresses of user1.bin (or user2.bin)
#define SYS_BOOT_TEST_BIN 1 |
can only be Espressif test bin
enum flash_size_map |
uint8 system_get_boot_mode | ( | void | ) |
Get the boot mode.
null |
uint8 system_get_boot_version | ( | void | ) |
Get information of the boot version.
null |
uint8 system_get_cpu_freq | ( | void | ) |
Get CPU frequency.
null |
flash_size_map system_get_flash_size_map | ( | void | ) |
Get the current Flash size and Flash map.
Flash map depends on the selection when compiling, more details in document "2A-ESP8266__IOT_SDK_User_Manual"
null |
uint32 system_get_userbin_addr | ( | void | ) |
Get the address of the current running user bin (user1.bin or user2.bin).
null |
bool system_restart_enhance | ( | uint8 | bin_type, |
uint32 | bin_addr | ||
) |
Restarts the system, and enters the enhanced boot mode.
uint8 | bin_type : type of bin
|
uint32 | bin_addr : starting address of the bin file |
bool system_update_cpu_freq | ( | uint8 | freq | ) |
Set CPU frequency. Default is 80MHz.
System bus frequency is 80MHz, will not be affected by CPU frequency. The frequency of UART, SPI, or other peripheral devices, are divided from system bus frequency, so they will not be affected by CPU frequency either.
uint8 | freq : CPU frequency, 80 or 160. |