qmk_firmware icon indicating copy to clipboard operation
qmk_firmware copied to clipboard

[Feature Request] RP2040 UART driver

Open Kriechi opened this issue 2 years ago • 3 comments

Feature request to add UART driver for the RP2040.

ChibiOS seems to be already ready for it to a large degree.

Feature Request Type

  • [x] Core functionality
  • [x] Add-on hardware support (eg. audio, RGB, OLED screen, etc.)
  • [ ] Alteration (enhancement/optimization) of existing feature(s)
  • [ ] New behavior

Description

  • add UART driver for RP2040 to enable communication with serial devices using a simple write/read API using uint8 or string commands.
  • document necessary settings and options in https://docs.qmk.fm/#/uart_driver
  • Split keyboards should be able to use both PIO/SIO (for split) and UART (for other devices) at the same time, and any limitation /restriction documented.

Kriechi avatar Jul 21 '22 21:07 Kriechi

This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs. For maintainers: Please label with bug, in progress, on hold, discussion or to do to prevent the issue from being re-flagged.

github-actions[bot] avatar Oct 28 '22 02:10 github-actions[bot]

I got a uart driver working using the pico sdk submodule. I added a uart_vendor driver that you can select using UART_DRIVER = vendor in rules.mk. The uart drivers had to be refactored a bit to accommodate the second interface in addition to the hal_serial one. I have a redox_w clone that uses the uart driver for communicating with a bluetooth receiver and recently upgraded from ATMega to RP2040. So far it's working great (although I had to knock the baud rate down from 1M to get stable IO)

shout out to @infinityis for helping me through UART debugging in general! 🎉

karosc avatar Nov 16 '22 00:11 karosc

Pretty cool @karosc! I just tried your branch on a raspberry pico and it works if I lower the baud rate like init_uart(9600);.

JohnAZoidberg avatar Jan 06 '23 00:01 JohnAZoidberg

This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs. For maintainers: Please label with bug, in progress, on hold, discussion or to do to prevent the issue from being re-flagged.

github-actions[bot] avatar Apr 06 '23 01:04 github-actions[bot]

This issue has been automatically closed because it has not had activity in the last 30 days. If this issue is still valid, re-open the issue and let us know. // [stale-action-closed]

github-actions[bot] avatar May 07 '23 01:05 github-actions[bot]