1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

31 Commits

Author SHA1 Message Date
Gunar Schorcht
1d20f88bb0 cpu/esp32: set stdout/stderr to be non-buffering 2022-01-25 00:36:51 +01:00
benpicco
c18f1c2a9b
Merge pull request #17455 from gschorcht/cpu/esp32/sdk-as-package
cpu/esp32: download Espressif SDK ESP-IDF as package
2022-01-24 16:13:04 +01:00
Francisco Molina
b9d1461b38 cpu/esp32: use macros/units 2022-01-17 12:28:11 +01:00
Gunar Schorcht
2e820a09fc cpu/esp32: print SDK version with esp_log_startup 2022-01-04 16:35:47 +01:00
Marian Buschsieweke
e46c1f732e
cpu/esp32: make CI happy 2021-11-17 13:10:37 +01:00
Bas Stottelaar
94171b7389 cpu/*: replace #if ENABLE_DEBUG with IS_ACTIVE 2020-11-02 21:34:12 +01:00
Bas Stottelaar
bd34cf8fc0 cpu/*: reorder ENABLE_DEBUG after last include 2020-10-23 00:45:55 +02:00
Gunar Schorcht
bb51fbb7ec cpu/esp32: fix GPIO32 and GPIO 33 as I2C pins
GPIO32 and GPIO33 are used during boot to start an 32.768 kHz XTAL if it is connected to these GPIOs. If the 32.768 kHz XTAL is not connected, these pins can be used digital IO. However, the 32.678 kHz XTAL has to be disabled explicitly in this case. Furthermore, the handling of GPIOs greater than GPIO31 had to be fixed in I2C software implementation.
2020-04-17 18:46:15 +02:00
Gunar Schorcht
dff74a3278 cpu/esp32: add pm_layered support 2020-03-23 12:38:36 +01:00
Gunar Schorcht
90dc2ce846 cpu/esp*: common parts of syscalls in cpu/esp_common 2020-02-21 09:09:34 +01:00
benpicco
66c7c63c94
Merge pull request #13061 from gschorcht/cpu/esp32/rtc_xtal_32k
cpu/esp32: allow external 32 kHz crystal for the RTC hardware timer
2020-02-07 10:24:22 +01:00
Gunar Schorcht
4c0cfdcc8e cpu/esp32: allow external 32 kHz crystal for RTC 2020-02-07 00:46:16 +01:00
benpicco
5d1bf26f0c
Merge pull request #13076 from gschorcht/boards/esp32/ttgo_t_beam_gps
boards/esp32: enable GPS module on ESP32 TTGO T-Beam V1.0
2020-02-01 23:25:55 +01:00
Gunar Schorcht
3208207ec5 cpu/esp32: change order of board and periph init
To be able to access periphals to initialize board specific hardware, the board_init function has to be called after periph_init.
2020-02-01 16:12:05 +01:00
benpicco
3672502f6f
Merge pull request #12998 from gschorcht/cpu/esp/common_sdk_log_output
cpu/esp: cleanup of ESP SDK log outputs
2020-01-15 15:08:02 +01:00
Gunar Schorcht
9cf103e055 cpu/esp32: fix rtc_init and displaying system time
The explicit call of rtc_init during the CPU start was removed because rtc_init is called within the function periph_init. The display of the system time at startup had to be placed after the call to periph_init.
2019-12-25 09:47:52 +01:00
Gunar Schorcht
53139c067c cpu/esp32: make the level for wifi log outputs settable 2019-12-20 17:58:58 +01:00
Gunar Schorcht
649bce4a46 cpu/esp*: cleanup the log level for init functions
The log level for normal information should be LOG_DEBUG.
2019-12-20 16:25:41 +01:00
Gunar Schorcht
8d25e6909e cpu/esp32: module to print startup info
Startup information, including board configuration, is only printed when module esp_log_startup is used. This reduces the amount of information that is printed by default to the console during the startup. The user can enable module esp_log_startup to get the additional startup information.
2019-11-28 18:59:09 +01:00
Gunar Schorcht
83892aa184 cpu/esp32/periph: workaround for UART clock problems
The UART peripheral clock seems to be sporadically set to wrong value when the CPU clock is changed. In this case, the UART clock is not set to 115.200 kbps but to 96 kbps, so that the output in the console seems like garbage. This can also cause automatic tests to fail. Therefore, the CPU clock is only changed if CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ defines a different default CPU clock than the one already used at boot time.
2019-11-28 08:22:30 +01:00
benpicco
63e4d8ffa5
Merge pull request #12803 from gschorcht/cpu/esp32/fix_little_fs
cpu/esp32: fix to be able to use SPI flash drive with pkg_littlefs
2019-11-25 15:49:13 +01:00
Gunar Schorcht
5f9e3b1a4b cpu/esp32: change order for spi_flash_drive_init
To see debug or error messages during SPI flash drive initialization, spi_flash_drive_init has to be called after stdio_init.
2019-11-25 07:23:47 +01:00
a8c3c6ab68 cpu/esp32: fix typos 2019-11-23 22:39:36 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
Marian Buschsieweke
2750dc2000
cpu/esp32: Moved stdio_init() before periph_init()
- This guarantees that DEBUG() is available early in boot process
- Forgotten in https://github.com/RIOT-OS/RIOT/pull/11367, fixes broken stdio
2019-09-14 11:12:32 +02:00
Gunar Schorcht
328813ce12 cpu/esp32: fix of ctor and newlib initialization
Module `newlib` is now used by default. Therefore, the separation of initialization of ctors and the newlibc is not needed any longer. Instead of calling `do_global_ctors` and `_init` separately, `__libc_init_array` is called. Explicit function `do_global_ctors` is removed.
2019-08-21 16:31:06 +02:00
Gunar Schorcht
bf331bd54b cpu/esp32: use printf/puts from newlib
Initializing the stdio file descriptors in global reent structure with newlib fake stdio file descriptors led to the problem that newlib stdio functions printf and puts were not working since they can't operate on these fake stdio file descriptors. Therefore, this initialization was removed. Now, the real stdio file descriptors as created automatically by newlib are used. Specific functions `printf`, `puts`, `getchar`and `putchar` are not required any longer and are removed now.
2019-08-19 15:14:32 +02:00
Gunar Schorcht
87cd181f56 cpu/esp32: use always newlib_syscalls_default
Modules newlib and newlib_syscalls_default are now used by default. Conditional compilations for MODULE_NEWLIB_SYSCALLS_DEFAULT as well as alternative code are removed completely.
2019-08-19 15:13:53 +02:00
Jens Alfke
ce1fe776cf 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
2018-10-30 16:42:07 -07:00
Gunar Schorcht
fddfe86a4b cpu/esp32: fixes dependency problem for timer
Xtensa newlib version requires pthread_setcancelstate as symbol. Therefore, the module pthread was always used, which in turn requires the module xtimer. The xtimer module, however, uses TIMER_DEV(0). Therefore, tests/timers failed for TIMER_DEV(0).
2018-10-14 13:50:38 +02:00
Schorcht
3ac99877ac cpu: add esp32 2018-10-08 12:20:49 +02:00