fix(log): Fix log time mismatch

When system startup, using 2*crystal as clock source.
This commit is contained in:
Wu Jian Gang
2018-12-28 13:55:32 +08:00
parent 34b64c20ee
commit 09fe8f7085
6 changed files with 44 additions and 9 deletions

View File

@ -200,6 +200,19 @@ config ESP8266_CORE_GLOBAL_DATA_LINK_IRAM
help
Link libcore.a internal global data(.bss .data COMMON) from DRAM to IRAM.
choice CRYSTAL_USED
prompt "Crystal used in your module or board"
default CRYSTAL_USED_26MHZ
help
For most modules, 26MHz is the default crystal. If you use special module,
you can reconfigure this option.
config CRYSTAL_USED_26MHZ
bool "26MHz"
config CRYSTAL_USED_40MHZ
bool "40MHz"
endchoice
endmenu
menu WIFI

View File

@ -19,10 +19,20 @@
#include <stdbool.h>
#include "esp_err.h"
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
#if CONFIG_CRYSTAL_USED_26MHZ
#define CRYSTAL_USED 26
#endif
#if CONFIG_CRYSTAL_USED_40MHZ
#define CRYSTAL_USED 40
#endif
typedef enum {
ESP_MAC_WIFI_STA,
ESP_MAC_WIFI_SOFTAP,

View File

@ -113,7 +113,7 @@ void esp_reset_reason_init(void)
esp_reset_reason_clear_hint();
}
ESP_EARLY_LOGI(TAG, "RTC reset %u wakeup %u store %u, reason is %u", hw_reset, hw_wakeup, hint, s_reset_reason);
ESP_LOGI(TAG, "RTC reset %u wakeup %u store %u, reason is %u", hw_reset, hw_wakeup, hint, s_reset_reason);
}
/**