micropython/ports
Trent Piepho f72a7dde18 esp32/uart: Preserve console UART clock, fix UART console with DFS.
In commit 7c929d44 the console UART was changed to use the UART HAL.
Starting the UART HAL will change the UART clock from whatever it was
already configured at to UART_SCLK_DEFAULT.  There is no "initialize at
existing settings" option.

This clock doesn't work with DFS.

The ESP-IDF code already takes this into account, and when DFS is enabled
it will configure the console UART to use the correct platform-specific
clock that will work with DFS.

The UART HAL init undoes this and sets it back to default.

This change will query the clock before the HAL init, then use the HAL
function to restore it back.  Thus keeping the clock at the "correct"
value, which depends on platform, DFS status, and so on.

The clock frequency will be found using the UART driver function ESP-IDF
code uses for this.  The existing code hard-coded a path that worked if the
clock was the APB clock and would fail otherwise.

The UART_NUM_0 define is removed because driver/uart.h already provides
this same macro.

Signed-off-by: Trent Piepho <tpiepho@gmail.com>
2023-11-23 11:49:08 +11:00
..
bare-arm shared/libc/string0: Don't deref args for n==0 case. 2023-11-07 16:01:50 +11:00
cc3200 {cc3200,nrf}/boards/make-pins.py: Add a note about tools/boardgen.py. 2023-11-03 14:18:54 +11:00
embed
esp32 esp32/uart: Preserve console UART clock, fix UART console with DFS. 2023-11-23 11:49:08 +11:00
esp8266 ports: Remove SRC_QSTR_AUTO_DEPS from all ports' Makefiles. 2023-11-03 14:04:17 +11:00
mimxrt mimxrt/boards/OLIMEX_RT1010: Adjust the UART pin assignment. 2023-11-09 13:41:44 +11:00
minimal
nrf {cc3200,nrf}/boards/make-pins.py: Add a note about tools/boardgen.py. 2023-11-03 14:18:54 +11:00
pic16bit ports: Remove SRC_QSTR_AUTO_DEPS from all ports' Makefiles. 2023-11-03 14:04:17 +11:00
powerpc
qemu-arm tools/tinytest-codegen.py: Externalise tests list. 2023-11-07 15:53:27 +11:00
renesas-ra renesas-ra/boards/ARDUINO_PORTENTA_C33: Fix incorrect I2C pins. 2023-11-17 15:40:33 +11:00
rp2 ports: Fix incorrect identifiers on Arduino boards. 2023-11-17 15:24:15 +11:00
samd samd: Use unique id for USB serial number. 2023-11-16 15:03:09 +11:00
stm32 ports: Fix incorrect identifiers on Arduino boards. 2023-11-17 15:24:15 +11:00
unix py/misc: Change sizeof to offsetof for variable-length alloc. 2023-11-03 16:03:18 +11:00
webassembly
windows windows: Use the MicroPython logo as application icon. 2023-11-07 17:22:52 +11:00
zephyr