You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/01/31 08:26:46 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on issue #5380: Support for Heltec Wifi Kit 32 (ESP32)

Ouss4 commented on issue #5380:
URL: https://github.com/apache/incubator-nuttx/issues/5380#issuecomment-1025487931


   Can you please configure the onboard crystal to be 26 MHz (make menuconfig -> System Type -> On-board Crystal Frequency) and then apply this patch:
   
   ```diff
   diff --git a/arch/xtensa/src/esp32/esp32_clockconfig.c b/arch/xtensa/src/esp32/esp32_clockconfig.c
   index 27a0a0a9c6..89f30ce901 100644
   --- a/arch/xtensa/src/esp32/esp32_clockconfig.c
   +++ b/arch/xtensa/src/esp32/esp32_clockconfig.c
   @@ -25,6 +25,8 @@
    #include <nuttx/config.h>
    #include <stdint.h>
   
   +#include <arch/board/board.h>
   +
    #include "xtensa.h"
    #include "xtensa_attr.h"
    #include "hardware/esp32_dport.h"
   @@ -186,7 +188,7 @@ void esp32_clockconfig(void)
      uint32_t freq_mhz = CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ;
      uint32_t old_freq_mhz;
      uint32_t source_freq_mhz;
   -  enum esp32_rtc_xtal_freq_e xtal_freq = RTC_XTAL_FREQ_40M;
   +  enum esp32_rtc_xtal_freq_e xtal_freq = BOARD_XTAL_FREQUENCY / MHZ;
   
      old_freq_mhz = esp_rtc_clk_get_cpu_freq();
      if (old_freq_mhz == freq_mhz)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org