From b72c4a102a3f298e1ef80c9a73e29f6d58f3b130 Mon Sep 17 00:00:00 2001 From: Heltec-Aaron-Lee Date: Fri, 4 Jun 2021 15:45:42 +0800 Subject: [PATCH] updated asr6601 boardInitMcu() --- cores/asr6601/platform/system/system_cm4.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cores/asr6601/platform/system/system_cm4.c b/cores/asr6601/platform/system/system_cm4.c index e03b7585..b2421bd1 100644 --- a/cores/asr6601/platform/system/system_cm4.c +++ b/cores/asr6601/platform/system/system_cm4.c @@ -5,6 +5,7 @@ #include "tremo_pwr.h" #include "rtc-board.h" #include "ASR_Arduino.h" +#include "uart.h" void boardInitMcu( void ) { @@ -21,14 +22,15 @@ void boardInitMcu( void ) rcc_enable_peripheral_clk(RCC_PERIPHERAL_RTC, true); rcc_enable_peripheral_clk(RCC_PERIPHERAL_SAC, true); rcc_enable_peripheral_clk(RCC_PERIPHERAL_LORA, true); - delay(100); + delay(200); pinMode(Vext,OUTPUT); digitalWrite(Vext,HIGH); pinMode(VBAT_ADC_CTL, OUTPUT); digitalWrite(VBAT_ADC_CTL,HIGH); pwr_xo32k_lpm_cmd(true); RtcInit(); - systime = (uint32_t)TimerGetCurrentTime(); + delay(100); + systime = (uint32_t)RtcGetTimerValue(); srand(analogRead(11)+analogRead(4)+analogRead(5)+analogRead(8)+analogRead(47)); SX126xInit(); sx126xSleep();