Default uart fixups #3185
No reviewers
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk!3185
Loading…
Reference in a new issue
No description provided.
Delete branch "default-uart-fixups"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add
UART_CLK_DEST_PERI()andUART_CLK_DEST_SYS()macros to use in low powerDocument the pairing between
stdio/stdout/stdininit/deinitfunctionsFix and simplify the
PICO_DEFAULT_UART_TX_PIN/RX_PINchecksFixes #3172 and #3173
@ -188,1 +210,4 @@#define UART_CLK_DEST_SYS(uart) (uart_get_index(uart) ? CLK_DEST_SYS_UART1 : CLK_DEST_SYS_UART0)#endif/**?
@ -188,0 +198,4 @@#define UART_CLK_DEST_PERI(uart) (uart_get_index(uart) ? CLK_DEST_PERI_UART1 : CLK_DEST_PERI_UART0)#endif/**I don't know much about how the clocks work, but is "the clk_peri dest for the given UART instance" something that needs a better explanation? 🤷
(Does "dest" mean "destination", or something else?)
What does "disables for output" / "disables for input" mean? 😉
I’m not sure - that’s pre-existing wording, I was just adding the comma. The only thing it actually does to the pins is isolate them on RP2350.
@ -188,0 +198,4 @@#define UART_CLK_DEST_PERI(uart) (uart_get_index(uart) ? CLK_DEST_PERI_UART1 : CLK_DEST_PERI_UART0)#endif/**It means destination, but I used dest to match the abbreviation used in the enum
clock_dest_num_t@ -25,3 +26,3 @@#ifdef PICO_DEFAULT_UART_TX_PIN#if (PICO_DEFAULT_UART_TX_PIN & 0x1) || (PICO_RP2040 && (PICO_DEFAULT_UART_TX_PIN & 0x2))#if (PICO_DEFAULT_UART_TX_PIN % 2) || (PICO_RP2040 && (PICO_DEFAULT_UART_TX_PIN % 4))#error "Specified PICO_DEFAULT_UART_TX_PIN does not support UART TX"Is it also worth checking that PICO_DEFAULT_UART_TX_PIN is below a particular value? (e.g.
#define PICO_DEFAULT_UART_TX_PIN 100obviously wouldn't work 🙂 )I guess it depends how much needs to be checked in the code, and how much can just be assumed to have been already checked by https://github.com/raspberrypi/pico-sdk/blob/develop/tools/check_board_header.py ?
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.