Add function to control UART FIFO trigger levels #719
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!719
Loading…
Reference in a new issue
No description provided.
Delete branch "nmk456/develop"
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?
The RP2040 has a register to change the UART FIFO level at which an interrupt will be generated, but this is not exposed in the SDK. The only time it is used is within the
uart_set_irq_enablesfunction, where it is set to the minimum value. I wrote a functionuart_set_irq_fifo_levelsto configure it to any of the possible values (1/8, 1/4, 1/2, 3/4, and 7/8 full).There is a slight inconvenience that
uart_set_irq_enablesresets them to 1/8, so every time that function is calleduart_set_irq_fifo_levelsmust be called again to set the chosen values. This could potentially be fixed by removing the lines inuart_set_irq_enablesthat does this, but I didn't want to change the functionality of an existing function to keep backwards compatibility.I wrote some code to test this function, which can be found here, along with it's output.
I'm not sure if they're relevant to your change here, but see also #548 and #500 and #568
seems like you could do this in one
hw_write_maskedView command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
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.