Another Sub-project Inspired by the 2PI502

The Raspberry PI Pico has some UART interfaces that you can use to do asynchronous serial communications using three or five wires. These are based on the ARM PrimeCell UART and are quite capable of running at 2Mbps, so good enough for processing a stereo CD Digital Audio stream, which needs just 1,411,200 bps, over a USB 2.0 connection. The Pico UARTs have 32 character Tx/Rx FIFOs which can be directly connected to DMA channels. The Pico has 12 DMA channels and the Pico 2 has 16.  There is an example of using DMA channels to transfer a packet stream over a UART. The notable thing here is that, because the hardware does almost all of the work, the amount of programming necessary is minimal: all that is involved is setting up some registers to configure the UART and the two DMA channels.

I was surprised that there is no library for running an error-corrected session layer over such a link.  This is an excellent blog post by Eli Bendersky: Framing in serial communications. The FreeRTOS library provides no such facility, and it will be awkward to implement something like this because it cuts across a lot of the structures. See https://www.freertos.org/Documentation/02-Kernel/02-Kernel-features/04-Stream-and-message-buffers/01-RTOS-stream-and-message-buffers.

This lecture by Hunter Adams has some interesting stuff about Cornell University and the history of digital communications. At 43:10 he goes into the Raspberry Pi Pico UARTs.


See also CuriousMarc Breaking The US$33,000 HP 3GHz Signal Generator he Bought for US$150.

In this lecture he talks about implementing a custom serial bootloader for the RP2040, which implements some very basic error-correction:

The Pico 2 has some rudimentary support for a UART boot in the ROM. See the RP2350 Data Sheet 5.8. UART Boot.

Subscribe to V. Hunter Adams.

Comments

Popular posts from this blog

Steven Johnson - So You Think You Know How to Take Derivatives?

Welsh Republic Podcast Talking With Kars Collective on Armenia Azerbaijan Conflict

Hitachi HD44780U LCD Display Fonts