Deep Dive w/Scott: Flash config for RP2040 @tannewt #rp2040 #adafruit

Deep Dive w/Scott: Flash config for RP2040 @tannewt #rp2040 #adafruit

Subscribers:
460,000
Published on ● Video Link: https://www.youtube.com/watch?v=8lH03pQmaxM



Category:
Discussion
Duration: 2:04:22
3,165 views
58


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 will be on Friday.

0:00 Getting started
04:44 Housekeeping
11:41 what sort of question/comments should go on Discord vs. YouTube chat?
13:59 Mailbag! Showed the Feather goodie bag ladyada sent Scott. Used CircuitPython to program a GameBoy and the RP2040s are destined to go there! PIO can buffer and make sure it’s timing specific.
Scott was on the Tomshardware Pi Cast. Idea of making CircuitPython run bare-metal on a Raspberry Pi.
Sneak peak of Simple Electronics. Does not officially come out until tomorrow.
18:49 More Mailbag! Becca wanted a sensor to track temperature, humidity and light levels for an indoor plant sensor. Hammond USB case (DigiKey part# 1551USB3TSK) with paper prototype. Low profile pluggable sensors.
Q) Why not use a feather with a 3D printed case? (1) Scott doesn’t have a 3D printer and (2) he really likes the Hammond case.
Saw Hammond enclosures on the manufacturer’s website.
Showed NeoPixel board to show measurement scale, and veml 7700 temperature and humidity sensor.
Q) Will you be able to isolate the temperature sensor from the electronics heat? Temperature sensor in the enclosure can read some of the case temperature.
28:20 Today’s Deep Dive. Let’s talk about flash! Lady Ada was producing the Feather and found 4MB wasn’t working and switched to 8MB. Saw pico-sdk GitHub and datasheet for RP2040 boot process with flowchart. Let’s talk about the flash second stage after the checksum has passed.
Flash second stage: problem is the code stored off-chip. How do you figure out what flash it is and how do you talk to it? Common problem: IMX and ESP also have the execute-in-place problem. Pico-sdk has boot stage and 4 options for flash initialization. Thought we were using 0x3H, but we weren’t which is why the 4MB flash failed.
New nvm.toml repository. mram is useful in space for satellites running CircuitPython because memory doesn’t corrupt the same way. Saw gigadevices.
Q) Are their (sic) board where I can remove the flash and replace by sRam? Just like we add flash to QT-Py? Or SRam QT-Py? Same question with mram.
Cascade TOML: can grab settings for a device using `cascadetoml cascade filter sku=\”GD25Q4C\”` for squishing settings into 1 TOML file. We want to take the “database” and produce flash stage 2.
Lady Ada asked what if we came up with a stage 2 that could handle all the devices in here?
Showed assembly code. Apparently it supports “#include”. Can we use C instead of assembly here? Tried making a stage2.c
Q) I'm afraid of the person for whom it isn't easier to read C code than assembly
Q) I used something called TAL, which is C like but lower level
stage2.c : In assembly you have to worry about setting registers and indirection, which you don’t have in C code because of the [convenient] assignment operator.
stage2.c : Explanation of vector table
Testing stage2.c *drum roll*
Q) Will the next revision have less flash?
Looked at stage2 assembly in boot2.elf, then the padded and checksummed assembly.
1:06:57 Lady Ada pops in to save Scott from assembly code. Asks about the disassembler.
1:40:52 Scott answers some of Lady Ada’s comments about soldering after she leaves.
1:45:10 Q) So where is the ROM code?
1:46:58 More debugging of C stage2
2:02:07 wrap-up


Q) Out of curiosity, was there a benefit to the weird bootloader approach?

Lady Ada shows the tester pogo board.
Discussion of flash initializer assembler.
Q) Which flash chip will be on [the] itsy?
Q) What is the price of the RP2040 chips themselves?
Commentary about capacitor packages.
Optional USB host. And the “bad idea” diode!
RP2040 board pin layout.
USB boot signal, chip select GPIO pin deep dive.
Q) Will that impact how fast the CS pin rises and falls? Does it matter?
Q) Scott: When will the next [RP2040] batch be in the store?


Showed SOIC-A clip to debug the flash chip on the Feather: https://www.digikey.com/en/products/detail/pomona-electronics/5250/745102 (link courtesy of Mr. Certainly)
Use Saleae to capture the data line trace. Maybe failing the checksum? No clock signal?
Is the clip orientation correct? Pulled up the GigaDevice flash chip datasheet.


Visit the Adafruit shop online - http://www.adafruit.com




Other Videos By Adafruit Industries


2021-03-103D Hangouts – MIDI Controller, Guardian Robot and Mechanical Iris
2021-03-10Retroreflective Chromakey Greenscreen DIY demo @adafruit @johnedgarpark #adafruit
2021-03-09JP’s Product Pick of the Week Recap AW9523 IO / LED Expander @adafruit @johnedgarpark #adafruit
2021-03-09JP’s Product Pick of the Week 3/9/21 AW9523 GPIO Expander LED Driver @adafruit @johnedgarpark
2021-03-09The Great Search: Cherry MX switches & Hot-Swap sockets #TheGreatSearch @DigiKey @cherryswitches
2021-03-08Mechanical Venus Box #3DPrinting #Timelapse #adafruit
2021-03-08CircuitPython Weekly Meeting for March 8, 2021 @circuitpython #circuitpython #adafruit
2021-03-07Desk of Ladyada - Cyber Sunday on The Desk of Ladyada
2021-03-05STEM Chat Episode 4: All About Pi ( π ) #STEM
2021-03-04New Products 3/03/2021 Feat. Adafruit Feather RP2040!
2021-03-04Deep Dive w/Scott: Flash config for RP2040 @tannewt #rp2040 #adafruit
2021-03-04JOHN PARK'S WORKSHOP LIVE Retroreflective Greenscreen DIY 3/4/21 @adafruit @johnedgarpark #adafruit
2021-03-04EYE on NPI – ProAnt PRO-OB-607 OnBoard SMD 2400 Mini Antenna #EyeOnNPI #DigiKey #Adafruit @DigiKey
2021-03-04Adafruit Top Secret! March 3, 2021 #Adafruit #AdafruitTopSecret @Adafruit
2021-03-04The Python on Hardware weekly video 122 #CircuitPython #Adafruit #Python #MicroPython #SBC @Adafruit
2021-03-04Made in NYC 3/3/2021 Featuring RP2040 Feathers and the Original STEMMA Idea!
2021-03-03ASK AN ENGINEER 3/3/2021 LIVE!
2021-03-03SHOW and TELL 3/3/2021 #ShowandTell
2021-03-03Build a Wifi-Enabled Shadow Box Internet Clock with NeoPixel Visualization #adafruit #tutorial
2021-03-03JP’s Product Pick of the Week Recap TSL2591 HDR Light Sensor @adafruit @johnedgarpark
2021-03-033D Hangouts – MIDI Pico, Engraving and MicroStacks



Tags:
adafruit
electronics
diy
arduino
hardware
opensource
projects
raspberry
pi
computer
raspberrypi
microcontrollers
limor
limorfried
ladyada
STEAM
STEM
python
microbit
circuitpython
neopixel
neopixels
raspberry pi
circuitplaygound
nyc
make
makers
micro:bit
adafrit
adafruit promo code
ada fruit
adafruit coupons
raspberry pi zero
micropython
machine learning
ai
tensorflow