[riot-commits] [RIOT-OS/RIOT] ce1fe7: cpu/esp32: allow explicit ESP32 crystal freq confi...

Francisco Acosta fco.ja.ac at gmail.com
Thu Nov 1 14:05:03 CET 2018


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: ce1fe776cfc1dd643ceb73cbbb0545a8a5756b4d
      https://github.com/RIOT-OS/RIOT/commit/ce1fe776cfc1dd643ceb73cbbb0545a8a5756b4d
  Author: Jens Alfke <jens at couchbase.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    M boards/common/esp32/include/board_common.h
    M cpu/esp32/include/sdk_conf.h
    M cpu/esp32/startup.c
    M cpu/esp32/vendor/esp-idf/esp_funcs.c

  Log Message:
  -----------
  cpu/esp32: allow explicit ESP32 crystal freq configuration

Some ESP32 boards (like my SparkFun ESP32 Thing) have a main clock
crystal that runs at 26MHz, not 40MHz. RIOT appears to assume 40MHz.
The mismatch causes the UART to not sync properly, resulting in
garbage written to the terminal instead of log output.

I’ve added:

* A new board configuration constant ESP32_XTAL_FREQ that defaults
  to 40, but can be overridden by a board def or at build time to
  force a specific value (i.e. 26).
* Some code spliced into system_clk_init() to check this constant and
  call rtc_clk_init() to set the correct frequency.
* A copy of the rtf_clk_init() function from the ESP-IDF sources.

Fixes #10272


  Commit: 0d95cc877b420a5937fcad629ad4c74f62ce81f4
      https://github.com/RIOT-OS/RIOT/commit/0d95cc877b420a5937fcad629ad4c74f62ce81f4
  Author: Francisco Acosta <fco.ja.ac at gmail.com>
  Date:   2018-11-01 (Thu, 01 Nov 2018)

  Changed paths:
    M boards/common/esp32/include/board_common.h
    M cpu/esp32/include/sdk_conf.h
    M cpu/esp32/startup.c
    M cpu/esp32/vendor/esp-idf/esp_funcs.c

  Log Message:
  -----------
  Merge pull request #10273 from snej/master

cpu/esp32: allow explicit ESP32 crystal freq configuration


Compare: https://github.com/RIOT-OS/RIOT/compare/1606e1687965...0d95cc877b42
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the commits mailing list