Deep Dive w/Scott: More USB Host API episode artwork

EPISODE · Feb 25, 2022 · 2H 11M

Deep Dive w/Scott: More USB Host API

from Adafruit Industries · host Adafruit Industries

Join Scott as he answers questions and further discusses the USB Host API for CircuitPython. Next week will be on Friday at 2pm Pacific and be the last stream with Scott as host for a while. Foamyguy will stream in the time slot starting in two weeks. Join the Discord at https://adafru.it/discord All notes for Deep Dives are available at https://github.com/adafruit/deep-dive-notes 0:00 Getting Started 6:15 Let’s get the show on the road… 8:22 next week - last deep dive before taking leave / foamyguy 9:20 deep dive notes on github https://github.com/adafruit/deep-dive-notes/ 12:00 rock climbing shirt discussion 13:32 examples of interrupt usage in CircPy? 14:55 async io enabled in recent CP 16:50 let’s talk usbhost 18:00 Desktop notes from last week 21:15 Last weeks Ben Eater USB videos very helpful 22:00 Usb Host vs. Peripheral and TinyUSB TUD vs TUH D)evice, H)ost 24:27 So how does collision detection work on a USB bus? Do the devices just not communicate until the host asks it for a data packet? 26:06 speed - see Jan Axelson’s USB Complete book 29:00 Linux can do USB host / look at python for API ideas 30:00 PyUsb on github 33:06 "USB 3.0 suspends device polling, which is replaced by interrupt-driven protocol." 35:03 return to the Python USB api 35:40 SparkFun has a power delivery dev board. 36:00 pyOCD github ( uses pyUSB ) 36:30 pyDFU ( uses usb.core and usb.util ) 38:30 Chip Shortage is real :-( 38:56 Usb in a nutshell discussion https://www.beyondlogic.org/usbnutshell/usb4.shtml 41:10 blinka is also using pyusb (via pyftdi) 42:20 https://rpilocator.com/ and Octapart 43:50 endpoints vs. hubs 44:50 pyusb tutorial.rst on github 46:32 port.c shared-bindings / sublime merge diff 47:55 usb_host diffs PyUSB API compiles 51:05 circuitpy_defns.mk rules 52:58 __init__.c in shared-bindings/usb 53:35 Device.c 55:20 read size_or_buffer argument 56:04 shared bindings circuit python stub special processing “//|” prefix 57:25 added some type annotations and documentation near implementation 58:03 diff tools for mac users / sublime merge is supported on mac 59:48 https://www.git-tower.com/blog/diff-tools-mac/ 1:01:32 back to the api usb_core_device_read to common_hal_usb_core_device_read 1:05:16 ctrl_transfer - either direction 1:08:10 mention of doxygen - “doxygen is used on all of our Arduino documentation. Sphinx on all the CP.” 1:09:07 detach_kernel_driver 1:10:12 still in Devie. Locals dict table 1:11:50 just found an IBM presentation called Documentation in the modern age that has a slide titled "Cool kids do Sphinx" and another titled "Cool kids used to do Doxygen" 1:13:20 shared modules - stubs 1:16:05 CP Pre-commit auto formatting 1:18:20 shell window - load code imx1060 dev board 1:20:03 get CP running on the dev board 1:21:40 Makefile for imx, compare to tinyUSB 1:28:52 pyocd prompts - ( after inition make -j 32 ) 1:31:04 plug in another usb device - connect vi “tio” 1:32:25 import usb_host 1:32:50 dir(board) 1:34:35 nxp.com i.MX. RT1170 clocked at 1Ghz 1:36:31 i.MX RT Crossover MCUs 1:37:15 ​teensy 4.1 has a header for the second USB port 1:37:35 USB Host Cable 1:39:49 question about the new esp32 board 1:40:31 teensy 4.0 board has usb ports broken out on pads 1:41:16 i.MX RT1060 Evaluation Kit image of the “B” version (EVK vs EVKB) 1:42:25 regarding your keep host initialized on reboot: would the endpoints/pipes need to be re-initialized on reboot or would remain the state too? 1:43:30 Design resources / design files 1:44:25 download and look at sch-31358_a3 schematic / pinout 1:46:18 USB OTG2 1:46:28 pins.c USB_DP1, USB_DM1 (and DP2) pins 1:49:45 dm or dn? (pin names) 1:50:20 back to datasheet 1:51:05 Data Sheet ( also has 3522 page reference manuals ) 1:52:20 looking for the “pad” name - try to match the data sheet 1:53:00 ​EVKB adds an M.2 connector for radios and other headers for audio and other expansion 1:54:30 I guess my question on pyusb is can we write a driver for the IntelliKeys that sends that EZUSB firmware at startup and then reads/writes like the driver GDSports wrote for Arduino on the M0? 1:55:05 How do we add a custom device? 1:55:52 ATMakers USB Host Mode conversation (youtube ) 1:57:17 For the record, GDSports on GitHub did most of the USB Host work (I just got the original driver open sourced) There is a great teardown by @scanlime as well 1:58:30 OTG1_DN, DP name to match reference manual 1:59:11 what would happen if you connected a hub? 2:01:07 pin object on imx ( mcu_pin_obj_t ): 2:02:37 So, just to setup my weekend do you think if I get the IntelliKeys driver ported to CPython/pyusb I'll be on a useful path? 2:05:20 ​if the pins were not defined for device mode, why add them for host mode? 2:07:39 wrap up / next week with Scott, then foamyguy taking over 2:10:48 Pet the cat 2:11:34 have a good weekend everyone Visit the Adafruit shop online - http://www.adafruit.com

Join Scott as he answers questions and further discusses the USB Host API for CircuitPython. Next week will be on Friday at 2pm Pacific and be the last stream with Scott as host for a while. Foamyguy will stream in the time slot starting in two weeks. Join the Discord at https://adafru.it/discord All notes for Deep Dives are available at https://github.com/adafruit/deep-dive-notes 0:00 Getting Started 6:15 Let’s get the show on the road… 8:22 next week - last deep dive before taking leave / foamyguy 9:20 deep dive notes on github https://github.com/adafruit/deep-dive-notes/ 12:00 rock climbing shirt discussion 13:32 examples of interrupt usage in CircPy? 14:55 async io enabled in recent CP 16:50 let’s talk usbhost 18:00 Desktop notes from last week 21:15 Last weeks Ben Eater USB videos very helpful 22:00 Usb Host vs. Peripheral and TinyUSB TUD vs TUH D)evice, H)ost 24:27 So how does collision detection work on a USB bus? Do the devices just not communicate until the host asks it for a data packet? 26:06 speed - see Jan Axelson’s USB Complete book 29:00 Linux can do USB host / look at python for API ideas 30:00 PyUsb on github 33:06 "USB 3.0 suspends device polling, which is replaced by interrupt-driven protocol." 35:03 return to the Python USB api 35:40 SparkFun has a power delivery dev board. 36:00 pyOCD github ( uses pyUSB ) 36:30 pyDFU ( uses usb.core and usb.util ) 38:30 Chip Shortage is real :-( 38:56 Usb in a nutshell discussion https://www.beyondlogic.org/usbnutshell/usb4.shtml 41:10 blinka is also using pyusb (via pyftdi) 42:20 https://rpilocator.com/ and Octapart 43:50 endpoints vs. hubs 44:50 pyusb tutorial.rst on github 46:32 port.c shared-bindings / sublime merge diff 47:55 usb_host diffs PyUSB API compiles 51:05 circuitpy_defns.mk rules 52:58 __init__.c in shared-bindings/usb 53:35 Device.c 55:20 read size_or_buffer argument 56:04 shared bindings circuit python stub special processing “//|” prefix 57:25 added some type annotations and documentation near implementation 58:03 diff tools for mac users / sublime merge is supported on mac 59:48 https://www.git-tower.com/blog/diff-tools-mac/ 1:01:32 back to the api usb_core_device_read to common_hal_usb_core_device_read 1:05:16 ctrl_transfer - either direction 1:08:10 mention of doxygen - “doxygen is used on all of our Arduino documentation. Sphinx on all the CP.” 1:09:07 detach_kernel_driver 1:10:12 still in Devie. Locals dict table 1:11:50 just found an IBM presentation called Documentation in the modern age that has a slide titled "Cool kids do Sphinx" and another titled "Cool kids used to do Doxygen" 1:13:20 shared modules - stubs 1:16:05 CP Pre-commit auto formatting 1:18:20 shell window - load code imx1060 dev board 1:20:03 get CP running on the dev board 1:21:40 Makefile for imx, compare to tinyUSB 1:28:52 pyocd prompts - ( after inition make -j 32 ) 1:31:04 plug in another usb device - connect vi “tio” 1:32:25 import usb_host 1:32:50 dir(board) 1:34:35 nxp.com i.MX. RT1170 clocked at 1Ghz 1:36:31 i.MX RT Crossover MCUs 1:37:15 ​teensy 4.1 has a header for the second USB port 1:37:35 USB Host Cable 1:39:49 question about the new esp32 board 1:40:31 teensy 4.0 board has usb ports broken out on pads 1:41:16 i.MX RT1060 Evaluation Kit image of the “B” version (EVK vs EVKB) 1:42:25 regarding your keep host initialized on reboot: would the endpoints/pipes need to be re-initialized on reboot or would remain the state too? 1:43:30 Design resources / design files 1:44:25 download and look at sch-31358_a3 schematic / pinout 1:46:18 USB OTG2 1:46:28 pins.c USB_DP1, USB_DM1 (and DP2) pins 1:49:45 dm or dn? (pin names) 1:50:20 back to datasheet 1:51:05 Data Sheet ( also has 3522 page reference manuals ) 1:52:20 looking for the “pad” name - try to match the data sheet 1:53:00 ​EVKB adds an M.2 connector for radios and other headers for audio and other expansion 1:54:30 I guess my question on pyusb is can we write a driver for the IntelliKeys that sends that EZUSB firmware at startup and then reads/writes like the driver GDSports wrote for Arduino on the M0? 1:55:05 How do we add a custom device? 1:55:52 ATMakers USB Host Mode conversation (youtube ) 1:57:17 For the record, GDSports on GitHub did most of the USB Host work (I just got the original driver open sourced) There is a great teardown by @scanlime as well 1:58:30 OTG1_DN, DP name to match reference manual 1:59:11 what would happen if you connected a hub? 2:01:07 pin object on imx ( mcu_pin_obj_t ): 2:02:37 So, just to setup my weekend do you think if I get the IntelliKeys driver ported to CPython/pyusb I'll be on a useful path? 2:05:20 ​if the pins were not defined for device mode, why add them for host mode? 2:07:39 wrap up / next week with Scott, then foamyguy taking over 2:10:48 Pet the cat 2:11:34 have a good weekend everyone Visit the Adafruit shop online - http://www.adafruit.com

NOW PLAYING

Deep Dive w/Scott: More USB Host API

0:00 2:11:32

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. The Learning Future Podcast with Louka Parry The Learning Future The world has never been changing more rapidly, dislocating the ways we work, learn and live. On The Learning Future Podcast we discuss the knowledge, skills and dispositions we all need for our learning future, exploring insights through interviews with world-class educators, researchers, policy makers, and leaders from across industries and across the world.

Frequently Asked Questions

How long is this episode of Adafruit Industries?

This episode is 2 hours and 11 minutes long.

When was this Adafruit Industries episode published?

This episode was published on February 25, 2022.

What is this episode about?

Join Scott as he answers questions and further discusses the USB Host API for CircuitPython. Next week will be on Friday at 2pm Pacific and be the last stream with Scott as host for a while. Foamyguy will stream in the time slot starting in two...

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!