
Deep Dive w/Scott: RP2040 DMA and Audio #raspberrypipico #rp2040 #adafruit @tannewt
I’m sponsored by Adafruit to work on CircuitPython. Support them, and by extension me, by purchasing hardware from https://adafruit.com Chat with me and lot of others on the Adafruit Discord at https://adafru.it/discord.
Deep Dive happens every week. Normally Fridays at 2pm Pacific but occasionally shifted to Thursday at 2pm. Typically goes for two hours or more. Questions are welcome. Next week is on Friday as well.
0:00 Getting started and hellos
07:26 Housekeeping
12:22 Any plans for a ESP32 wired Ethernet feather wing?
13:45 Does the Wiznet library support TLS?
15:05 State of CircuitPython RP2040
20:07 How'd you come to choose Arch?
21:25 how to smooth library porting to and from micropython?
22:49 A quick question how feasible is to replace/upgrade to flash chip on pico?
23:56 Have you ever talked about OTA (over the air updates) on a circuit python based deployment?
24:53 What makes the pico better then other boards?
25:31 RP2040 as a dev board - issues
27:25 Will PWM capture be supported? That would be interesting for reading ultrasonic sensors
28:40 Is circuit python going to support the dual core s of the pico?
29:47 will there be a Starting with Circuit Python on the PICO book?
32:25 could you tell us something about Circuitpython vs Micropython?
36:05 What is your guess how far the PIO's can be pushed quadrature encoder wise for CP ? (for closed loop motor control)
37:43 arduino on the pico when?
38:34 do you see the rp2040/pico and circuit python overtaking arduino due to python being so much easier to code for beginners or otherwise?
41:11 I often get old print statements (from infinite loops) still printing in the mu serial output after saving and my code restarting. Is that due to a big buffer somewhere still pushing out text somewhere?
43:16 Is CP doing QUAD SPI or QPI to flash ? (or just SPI)
46:24 did you implement peek and poke from c64?
46:54 Can CircuitPython take advantage of Sparkfun's proposed larger flash part ?
47:43 will Firmata work on this board?
48:34 Heh, just a follow up on the OTA question... what I meant was the support for changing the files (like code.py) on the mass storage and not circuit python itself. Would that still be considered OTA?
50:15 how would you control a low power state entry without WFE or WFI?
53:04 From dcd: given earlier interest in FPGAs and comparing it to the focused power of the rp2040's PIO - have you followed the Glasgow Interface Explorer ? Is it the next step? Has anyone 'backed' it yet? - just 4 days left on crowd supply https://www.crowdsupply.com/1bitsquared/glasgow )
56:52 Does CP have ability to toy with clock to get current lower on the new speed? How is current compared to Portenta ?
59:28 Any part of the RP2040 port that would be useful for me to poke at working on that needs to be done still? Now that I have a couple picos finally.
1:02:49 Will UART work over old skool pins (instead of or in addition to) through USB ?
1:04:25 what does audio mean on the RP2040
1:05:44 I2S out ( see wikipedia and readthedocs )
1:07:04 PDM in (pulse modulation)
1:07:56 Using Audacity to understand digital audio
1:09:39 ( CP / wiznet / ethernet )
1:11:08 using the REPL to explore the audio frequency rates …
1:12:20 I2S out / CD standard rates
1:13:09 Audio Core / RawSamples
1:13:43 Audioio ( audio output )
1:15:00 Audiomixer / MixerVoice
1:16:05 audiomp3 - support for MP3-compressed audio files
1:16:46 audiopwmio - Audio output via digital PWM ( want to do for the RP2040 )
1:18:07 Can you take advantage of the parallel read/write across memory banks to improve throughput on the Pico? ( audio is not that fast… )
1:19:39 - “working code”
1:20:00 audio pwm out discussion / resolution
1:25:36 DMA feature - PIO pacing timers
https://www.youtube.com/watch?v=aVLRUyPBBJk
1:28:30 Clock division on RP2040 divisor_finder.py (sp?)
Tannewt rp2040_audiopwmio branch
1:34:10 Pacing timer story ( 4 timers in hardware )
1:37:40 8-bits and 4-bits divisor
1:39:22 RP2040 requires external crystal - for more accurate frequencies…
1:40:18 Plan for I2S
1:41:45 Pico example and pico extras
1:43:20 PIO assembly code for IO - ping pong buffers
1:47:30 DMA buffer size/alignment limitations / channel chaining
1:50:02 Deep dive into the DMA Registers ( around page 99 in the data sheet)
1:55:40 pause and resume
2:01:15 Completely unrelated question. Is there a way to use the USB connection as a USB/CDC serial device with micropython I would assume since the REPL is over the USB this wouldn't work
2:04:08 What are the downsides of the rp2040? Compared to samd51 etc.
2:08:55 Can you be a web server in CP ?
2:09:46 could you inject ramp PIO instructions for the transitions?
2:10:33 GPIO 15 story
2:14:56 What is best target for CP to do ethernet ?
2:16:03 Wrap-up
-----------------------------------------
Visit the Adafruit shop online - http://www.adafruit.com