efuse/add cpu freq rating

This commit adds support for CPU max freqeuency rating
bits in CPU. Bootloader will now print an error if attempting
to 160MHz rated ESP32 at 240MHz.

EFUSE_CHIP_VER_RESERVE has been replaced by the
frequency rating bits. Dependancies on EFUSE_CHIP_VER_RESERVE
have been changed to use EFUSE_CHIP_VER_PKG
This commit is contained in:
Darian Leung
2018-02-28 17:12:34 +08:00
parent 6acb38af4c
commit 8b1277c55f
3 changed files with 49 additions and 22 deletions

View File

@@ -447,6 +447,14 @@ void bootloader_main()
{
vddsdio_configure();
flash_gpio_configure();
#if (CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ == 240)
//Check if ESP32 is rated for a CPU frequency of 160MHz only
if (REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_CPU_FREQ_RATED) &&
REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_CPU_FREQ_LOW)) {
ESP_LOGE(TAG, "Chip CPU frequency rated for 160MHz. Modify CPU frequency in menuconfig");
return;
}
#endif
bootloader_clock_configure();
uart_console_configure();
wdt_reset_check();