Переглядів 28,096
I’m sponsored by Adafruit to work on CircuitPython. Support them, and by extension me, by purchasing hardware from adafruit.com
Chat with me and lot of others on the Adafruit Discord at 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 Friday as normal.
Links:
Pico from Adafruit - www.adafruit.com/product/4864
Pico w/loose headers from Adafruit - www.adafruit.com/product/4883
CircuitPython for Pico - circuitpython.org/board/raspb...
Getting Started with Pico and CircuitPython - learn.adafruit.com/getting-st...
CircuitPython Essentials Guide - learn.adafruit.com/circuitpyt...
Feather RP2040 - www.adafruit.com/product/4884
CircuitPython for RP2040 - circuitpython.org/board/adafr...
ItsyBitsy RP2040 - www.adafruit.com/product/4888
rp2pio API doc - circuitpython.readthedocs.io/...
pico announcement blog post - www.raspberrypi.org/blog/rasp...
pico getting started - www.raspberrypi.org/documenta...
RP2040 datasheet - datasheets.raspberrypi.org/rp...
CircuitPython PIOASM library - github.com/adafruit/Adafruit_...
0:00 Getting started and hellos
08:41 Housekeeping
11:43 RP2040 and Raspberry Pi Pico board!
19:45 Show how to install CircuitPython on a Pico fresh out of a package.
24:00 Hello World
27:14 RP2040 / pico data resources
28:45 RP2040 data sheet
32:10 CP use of multi-core - “Not Yet”
36:43 Can I use any quad SPI memory with RP2040 like an MRAM memory does UF2 support these memories or only flash memory?
39:20 PIO ( Programmable IO )
41:22 Circuit Python has a list of the supported Flash chips in the source code, easy to find.
41:46 PIO ( Programmable IO ) continued
44:30 IRQ PIO
45:36 NeoPixel example for PIO ( 4 instructions )
46:20 Micropython vs. CP PIO differences
47:42 CP PIO future expansion
48:45 CAN bus in PIO? Possible…
49:20 PIO FIFO
51:50 GPIO functions ( PIO1 and PIO2 peripherals? )
53:52 3.2 PIO Programmer’s Model
55:01 USB Host examples ? ( see the sdk ? )
55:28 back to Programmer’s Model ( PC )
56:10 Output Shift Register
56:34 3.3 PIO Assembler (pioasm) / 3.4 Instruction Set
1:03:42 Examples…( see the SDK chapter 3 - Thanks @Luke)
1:04:06 - live code PIO example on Feather
1:06:49 CP NeoPixel code.py - not PIO
1:07:40 PIO test code (pioasm)
1:09:27 raspberrypi2.StateMachine
1:12:13 Logic Pro 16
1:13:15 square wave pioasm in code.py
1:14:55 Hub75 example does hot patch of the instruction memory (@luke)
1:15:45 Deinit for destroy and recreate pio scheme
1:17:03 plug into channel 4 - see the blink
1:18:28 update the old CP firmware - enter boot loader on the feather
1:20:05 PIO code goes into dedicated PIO instruction memory
1:21:15 you can read by writing PC and reading out SMx_INSTR
1:21:49 loading code.py into cleaned board ( pioasm and support libraries )
1:23:00 switch to 800KHz ( hmm - frequency is 400KHz )
1:23:40 squarewave assembly code
1:24:22 readthedocs.io/en/latest/README.html…
1:25:00 Rp2pio API
1:26:15 Learn.adafruit.com - for wiring tutorials
1:27:19 Iterate on square wave example
1:31:44 State machine “wrap” feature
1:33:15 Alternate logic analyzers ( use an rp2040 )
1:35:36 Tinlylogic friend promo
1:37:40 full speed 125000000 ( 62.5 MHz on the scope? )
1:39:04 Neopixel in 4 instructions
1:41:05 PIO resource sharing CP and user allocation
1:45:05 deep dive into neopixel pioasm
1:46:30 - wifi support from the airlift board via spi ( see Arduino Nano RP2040 )
1:47:05 back to neopixel pioasm ( out, jmp autopull, nop)
1:55:40 Assembler for the other M0 - someone needs to write it still :-)
1:57:15 microDev - s2 risc-v low power core
1:59:45 sm.write to get the bytes from CP to the PIO
2:01:50 assembler can be run on c-python
2:02:50 licensing question for @luke - compare with RISC-V / ARM
2:04:11 adafruit_pioasm.py source
2:09:35 PIO can use DMA
2:10:12 back to the datasheet ( Page 14 - bus overview )
2:12:00 state of GUI in CP
2:13:00 One of the strengths of CP is USB support…
2:14:05 CP porting checklist - what to do first
2:15:00 DisplayIO and HDMI - look for bare metal CP on rPI
2:16:30 CP definition with respect to Micropython
2:19:00 VSCode extension for CP
2:22:00 Double tap to reset doesn’t work yet
2:25:24 wrap up
2:28:54 off