bootloader: Boost bootloader CPU to 80MHz

Partially needed to use RNG, also useful to improve boot performance.
This commit is contained in:
Angus Gratton
2017-01-04 15:36:40 +11:00
parent 19fa6e254d
commit 2e3ca1c2f7
3 changed files with 34 additions and 24 deletions

View File

@@ -29,6 +29,7 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/xtensa_api.h"
#include "rtc.h"
static const char* TAG = "system_api";
@@ -119,6 +120,9 @@ void IRAM_ATTR esp_restart(void)
DPORT_TIMERS_RST | DPORT_SPI_RST_1 | DPORT_UART_RST);
REG_WRITE(DPORT_PERIP_RST_EN_REG, 0);
// Set CPU back to XTAL source, no PLL, same as hard reset
rtc_set_cpu_freq(CPU_XTAL);
// Reset CPUs
if (core_id == 0) {
// Running on PRO CPU: APP CPU is stalled. Can reset both CPUs.