Deep Dive w/Scott: Raspberry Pi CircuitPython speedup and SD card episode artwork

EPISODE · Oct 29, 2021 · 2H 9M

Deep Dive w/Scott: Raspberry Pi CircuitPython speedup and SD card

from Adafruit Industries · host Adafruit Industries

Scott recaps work on the Raspberry Pi running CircuitPython and then continues working on SD card support. Visit the Adafruit shop online - http://www.adafruit.com Chat with me and a lot of others on the Adafruit Discord at https://adafru.it/discord. Deep Dive happens every week. Next week is on Friday at 2pm Pacific. 0:00 Getting Started 09:32 Housekeeping 13:00 Raspberry Pi Zero 2 W discussion 19:50 raspberry pi .org vs. .com 20:51 Dune and DOS 21:49 USB Host and Tiny USB 23:07 Edit code on a Pi over BLE 23:38 working on Pi 400 steps to figure out 24:14 Pi-DOS project mention 26:00 Glasses come off / glasses setup 27:00 Pi Zero - epic for CP with .5 GB RAM 29:00 Zero 2 is the ultimate board for CP!!! 29:50 Review last week’s status - 30:00 Now Tac has High Speed working 31:08 Last week - HDMI was very slow - investigate caches off/on 31:38 Not caching “enough” 32:48 Scrolling demo, much faster than last week, caching on for everything 33:42 Tweek resolution 34:00 “what is CP” 35:15 Still Broadcom chip 36:14 Flash speed vs. run from RAM 37:37 once I get the SD card working, there will be some re-organization for all the boards 38:20 experiment with screen resolutions, to demo refresh performance 40:17 640x480 REPL - pretty quick 42:00 1080p seems blurry 43:10 Are there any plans to make this a simpler process, eg moving it to a Java IDE? Suggested https://codewith.mu/ 45:10 check out visual studion circuitpython plugin 47:11 Python 3.10 has deprecated “distutils”. Spent my day on that for Yocto Project. It’s nice to not need to worry with CP 48:00 rebooted to ‘lower’ resolution 48:30 flash wear discussion Nand flash, Nor flash, flash protocol 49:36 Should you have some knowledge of Python before learning Circuit Python? 50:00 Pi4 is ARM64....so theoretically you could port CPY to the M1 chip 50:32 core of CP is just like Python 50:57 SD Cards technical proprietary, but … 51:27 Why use bare-metal CP over blinka ( ease of setup, just does one thing ) 52:20 Implementation 53:11 adafruit_sdcard.py - SPI 1, 4 or 8 bits at a time 54:15 here is a lot of IO stuff that you couldn't do under a Linux kernel like bitbanging is quite hard/limited in a non realtime OS 55:16 raspi3-tutorial / 0B_readsector / sd.c 56:39 habits that lead to more reusable code :-) 57:04 declaring 5 global variables on one line with no comments 57:37 SBD generated structs vs. 58:05 multiple things on one line - suggest using curly braces freely 59:00 initializing some but not all variables ( on one line ) 59:26 ‘weird’ globals 59:39 q:is there a native async library in circuitpython? I found a library called "asynccp" it works for me now but it would be better to use the native way. 1:01:04 use single letter variables sparingly 1:02:06 perhaps run it through a formatter 1:02:18 “I still don’t know what this code does” :-) 1:02:55 consider naming style for global variables 1:03:15 ‘circle’ reference gighub rsta2/circle - well commented 1:04:10 check out the license 1:06:04 sdcard.org PDFs 1:06:44 Scott’s Pi Zero arrives on Monday! 1:08:11 640x480 HDMI raspberry pi bare metal REPL demo - last piece is SD card reading in CP - connect to USB mass storage 1:09:40 goal: read SD card over USB 1:10:29 Exception levels - switch from EL2 to EL1 ( os exception level ) CP is running EL1 1:12:00 Waiting for high speed to be merged into tiny USB 1:12:40 HDMI output used for display IO 1:14:40 Looking at board.c in CP ports/broadcom/boards/PI4 1:15:15 sdioio API 1:15:35 “with this big chonky font, CP needs to implement CBM ASCII to get cool map-building "letters"” 1:15:42 detour - fantasy console - mimic but modernize 1:16:34 nerd fonts project (nerdfonts.com) 1:18:00 Does circuitpython use Unicode strings? 1:18:14 Twitter emojis opensourced twitter/twemoji 1:19:44 displayio doesn't display it yet - though emoji variable names do 1:24:30 in cpython you can only use unicode characters in variable names if the belong to the "letter" class, so you can do accented characters, or Chinese, or Hebrew, but not emoji 1:25:37 back to sdioio/SDCard.c 1:27:54 second argument to SD send command - refer to adafruit_sdcard.py 1:30:50 SD Specs - commands , and back to adafruit_sdcard.py 1:39:03 bztsrc/raspi3-tutorial 0B_readsector/sd.c sd_cmd() / 32-bit commands vs BCM2835 ARM Peripherals.docx 1:41:21 Q: been experimenting with the sdcard module on circuitpython but it stops the code if there is no card in the reader 1:42:36 consider the response type ( number of bits ) 1:43:54 sdioio/SDCard.h 1:45:03 sdcard.org Part1_Physical_Layer_Simplified_Specification_Ver800.pdf r2 response codes 1:48:57 autogenerated SVD generated file bcm2711_ipa.h 1:52:45 sdcard.org Design Guide « Whitepaper » is a pretty cool resource. https://www.sdcard.org/cms/wp-content/uploads/2020/11/SD_Express_Design_Guide.pdf 2:04:00 CM4 Appendix B - ordering codes ( wireless, eMMC, RAM ) 2:06:15 Wrap up - next week Pi Zero on Friday 2:09:35 have a great weekend

Scott recaps work on the Raspberry Pi running CircuitPython and then continues working on SD card support. Visit the Adafruit shop online - http://www.adafruit.com Chat with me and a lot of others on the Adafruit Discord at https://adafru.it/discord. Deep Dive happens every week. Next week is on Friday at 2pm Pacific. 0:00 Getting Started 09:32 Housekeeping 13:00 Raspberry Pi Zero 2 W discussion 19:50 raspberry pi .org vs. .com 20:51 Dune and DOS 21:49 USB Host and Tiny USB 23:07 Edit code on a Pi over BLE 23:38 working on Pi 400 steps to figure out 24:14 Pi-DOS project mention 26:00 Glasses come off / glasses setup 27:00 Pi Zero - epic for CP with .5 GB RAM 29:00 Zero 2 is the ultimate board for CP!!! 29:50 Review last week’s status - 30:00 Now Tac has High Speed working 31:08 Last week - HDMI was very slow - investigate caches off/on 31:38 Not caching “enough” 32:48 Scrolling demo, much faster than last week, caching on for everything 33:42 Tweek resolution 34:00 “what is CP” 35:15 Still Broadcom chip 36:14 Flash speed vs. run from RAM 37:37 once I get the SD card working, there will be some re-organization for all the boards 38:20 experiment with screen resolutions, to demo refresh performance 40:17 640x480 REPL - pretty quick 42:00 1080p seems blurry 43:10 Are there any plans to make this a simpler process, eg moving it to a Java IDE? Suggested https://codewith.mu/ 45:10 check out visual studion circuitpython plugin 47:11 Python 3.10 has deprecated “distutils”. Spent my day on that for Yocto Project. It’s nice to not need to worry with CP 48:00 rebooted to ‘lower’ resolution 48:30 flash wear discussion Nand flash, Nor flash, flash protocol 49:36 Should you have some knowledge of Python before learning Circuit Python? 50:00 Pi4 is ARM64....so theoretically you could port CPY to the M1 chip 50:32 core of CP is just like Python 50:57 SD Cards technical proprietary, but … 51:27 Why use bare-metal CP over blinka ( ease of setup, just does one thing ) 52:20 Implementation 53:11 adafruit_sdcard.py - SPI 1, 4 or 8 bits at a time 54:15 here is a lot of IO stuff that you couldn't do under a Linux kernel like bitbanging is quite hard/limited in a non realtime OS 55:16 raspi3-tutorial / 0B_readsector / sd.c 56:39 habits that lead to more reusable code :-) 57:04 declaring 5 global variables on one line with no comments 57:37 SBD generated structs vs. 58:05 multiple things on one line - suggest using curly braces freely 59:00 initializing some but not all variables ( on one line ) 59:26 ‘weird’ globals 59:39 q:is there a native async library in circuitpython? I found a library called "asynccp" it works for me now but it would be better to use the native way. 1:01:04 use single letter variables sparingly 1:02:06 perhaps run it through a formatter 1:02:18 “I still don’t know what this code does” :-) 1:02:55 consider naming style for global variables 1:03:15 ‘circle’ reference gighub rsta2/circle - well commented 1:04:10 check out the license 1:06:04 sdcard.org PDFs 1:06:44 Scott’s Pi Zero arrives on Monday! 1:08:11 640x480 HDMI raspberry pi bare metal REPL demo - last piece is SD card reading in CP - connect to USB mass storage 1:09:40 goal: read SD card over USB 1:10:29 Exception levels - switch from EL2 to EL1 ( os exception level ) CP is running EL1 1:12:00 Waiting for high speed to be merged into tiny USB 1:12:40 HDMI output used for display IO 1:14:40 Looking at board.c in CP ports/broadcom/boards/PI4 1:15:15 sdioio API 1:15:35 “with this big chonky font, CP needs to implement CBM ASCII to get cool map-building "letters"” 1:15:42 detour - fantasy console - mimic but modernize 1:16:34 nerd fonts project (nerdfonts.com) 1:18:00 Does circuitpython use Unicode strings? 1:18:14 Twitter emojis opensourced twitter/twemoji 1:19:44 displayio doesn't display it yet - though emoji variable names do 1:24:30 in cpython you can only use unicode characters in variable names if the belong to the "letter" class, so you can do accented characters, or Chinese, or Hebrew, but not emoji 1:25:37 back to sdioio/SDCard.c 1:27:54 second argument to SD send command - refer to adafruit_sdcard.py 1:30:50 SD Specs - commands , and back to adafruit_sdcard.py 1:39:03 bztsrc/raspi3-tutorial 0B_readsector/sd.c sd_cmd() / 32-bit commands vs BCM2835 ARM Peripherals.docx 1:41:21 Q: been experimenting with the sdcard module on circuitpython but it stops the code if there is no card in the reader 1:42:36 consider the response type ( number of bits ) 1:43:54 sdioio/SDCard.h 1:45:03 sdcard.org Part1_Physical_Layer_Simplified_Specification_Ver800.pdf r2 response codes 1:48:57 autogenerated SVD generated file bcm2711_ipa.h 1:52:45 sdcard.org Design Guide « Whitepaper » is a pretty cool resource. https://www.sdcard.org/cms/wp-content/uploads/2020/11/SD_Express_Design_Guide.pdf 2:04:00 CM4 Appendix B - ordering codes ( wireless, eMMC, RAM ) 2:06:15 Wrap up - next week Pi Zero on Friday 2:09:35 have a great weekend

NOW PLAYING

Deep Dive w/Scott: Raspberry Pi CircuitPython speedup and SD card

0:00 2:09:44

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

API Intersection Stoplight Building a successful API requires more than just coding. It starts with collaborative design, focuses on creating a great developer experience, and ends with getting your company on board, maintaining consistency, and maximizing your API’s profitability.In the API Intersection, you’ll learn from experienced API practitioners who transformed their organizations, and get tangible advice to build quality APIs with collaborative API-first design.Jason Harmon brings over a decade of industry-recognized REST API experience to discuss topics around API design, governance, identity/auth versioning, and more.They’ll answer listener questions, and discuss best practices on API design (definition, modeling, grammar), Governance (multi-team design, reviewing new API’s), Platform Transformation (culture, internal education, versioning) and more.They’ll also chat with experienced API practitioners from a wide array of industries to draw out practical takeaways and insights you can use.H TV Podcast Industries Chris Jones, Derek O'Neill and John Harrison. TV Podcast Industries TV Podcast Industries is a podcast that provides discussions and reviews of various TV shows, including recent popular series like Alien Earth, The Sandman, The Last of Us, The Boys, and Daredevil Born Again. They also cover shows such as Ironheart, Star Trek: Picard, The Rings of Power, and many more, spanning both Marvel and DC universes, as well as other genres. Heart to Heart Podcast One on One / Next Level Studios In the Heart to Heart Podcast, we talk to some of our favorite & most interesting people in the entertainment industry so you can feel empowered and learn that even in the most challenging of industries, where there’s a will there’s a way.Whether you’re an actor, a writer, a casting director, a talent rep, or just someone interested in the behind the scene happenings of the entertainment industry, this podcast will have something for you. NOW, this isn’t just another How To podcast for actors. Plenty of those shows already exist. In Heart to Heart, every guest will share stories inspired by their sometimes winding path to success on their own terms. Revisionist History Pushkin Industries Revisionist History is Malcolm Gladwell's journey through the overlooked and the misunderstood. Every episode re-examines something from the past—an event, a person, an idea, even a song—and asks whether we got it right the first time. From Pushkin Industries. Because sometimes the past deserves a second chance.To get early access to ad-free episodes and extra content, subscribe to Pushkin+ in Apple Podcasts or at pushkin.fm/plus.iHeartMedia is the exclusive podcast partner of Pushkin Industries.

Frequently Asked Questions

How long is this episode of Adafruit Industries?

This episode is 2 hours and 9 minutes long.

When was this Adafruit Industries episode published?

This episode was published on October 29, 2021.

What is this episode about?

Scott recaps work on the Raspberry Pi running CircuitPython and then continues working on SD card support. Visit the Adafruit shop online - http://www.adafruit.com Chat with me and a lot of others on the Adafruit Discord at...

Can I download this Adafruit Industries episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!