Raspberry Pi Pico and RP2040 - The Deep Dive

ARM Assembly, PIO, and System Architecture - An intense Microcontroller Internals Course

Instructors Uri ShakedUri Shaked
Wednesday, May 5, 2021 02:00 pm EDT - Wednesday, June 2, 2021 02:00 pm EDT Local time zone:
Similar projects worth following

Course Start Date: May 5th, 2021 - Ticket
Classes are Wednesdays 2:00-3:30pm EDT

About the Instructor

Uri is a maker who loves voiding warranties; Currently building RP2040js, an open source Raspberry Pi Pico emulator in JavaScript, and working on Wokwi, an online Arduino simulation platform. Uri also instructed the AVR internals course in the previous session of HackadayU.

Course Overview

The Raspberry Pi Pico is a capable 4$ microcontroller board. It comes with a set of features that make it a great choice for many maker projects, including the programmable I/O (PIO), which makes it possible to support new protocols and implement custom peripherals.

This course will take you on a journey to explore the internals of the RP2040 chip, the brains of the Pico. We'll learn about the system architecture, hardware peripheral registers, and even the basics of the ARM assembly language.

The course will be intense, and will walk you through the core principles behind the RP2040 chip. While we can't cover everything in a 5 hours course, you'll get the essential knowledge and links to resources that will help you keep rolling on your own. Expect to spend some time digging into the microcontroller's datasheet! 📚

Prerequisites / Resources

  • Bitwise Math (and for the visual learners, also Bitwise GIFs)
  • Fluency with Arduino / microcontroller programming. I.e. being familiar with terms such as GPIO, SPI, I2C, etc.
  • Basic understanding of electronics (e.g. you should know how to use a breadboard, what an LED is and how to properly wire to a microcontroller, etc).

Software Requirements

Modern web browser (Chrome, Firefox, etc.). We'll use the online simulator at

Optional: If you want to build the code on your machine then install the Pico SDK and get a fresh copy of pico-examples. You can find the installation instructions in Chapter 2 of the Getting Started Guide.

Hardware Requirements (optional):

The hardware is optional. We'll use the emulator during the course. But if you want to try things on the actual hardware (because it's always more fun!), here's what you need:

  • A Raspberry Pi Pico board.
  • For debugging over SWD with GDB: either a second Pi Pico or a Raspberry Pi 3 / 4. You'll also need a dupont wires and the ability to solder. Consult sections 5, 6, and Appendix A of the Getting Started Guide.


Class 1 - The Big Picture

We'll learn how the memory space is organized, explore the RP2040 bus fabric, become friends with the RP2040 datasheet, talk about the AHB-Lite bus and the APB bridge, and see how our C code can interact with the on-chip peripherals (such as GPIO and UART) by directly accessing the hardware registers.

Class 2 - Spiralling Deeper

We'll cover hardware and software interrupts, talk about the Pico's bootrom and the boot process, discuss multi-core operation and take a look at the IOPORT/SIO, and of course - get our hands dirty writing some C code to demonstrate these concepts.

Class 3 - Introduction to ARM Assembly

We'll learn the basics of the ARM assembly language, and write our first assembly routine together! 

Class 4 - Under the hood with GDB

We'll continue exploring the ARM Cortex M0+ instruction set as we take a look at the assembly code generated by the gcc compiler. We'll also take a glance at GDB, the GNU Debugger, and see how we can harness its power when reverse engineering a project.

Class 5 - Hello, PIO

The Programmable Input/Output (PIO) is a unique feature of the RP2040 chip. It enables the creation of additional hardware interfaces, even ones that are not natively supported by the chip (WS2812B, I'm looking at you!). We'll learn how the PIO state machine works and see an example of programming it.

Adobe Portable Document Format - 36.28 MB - 04/03/2021 at 19:57


Adobe Portable Document Format - 29.77 MB - 04/03/2021 at 19:57


Enjoy this course?



Does this project spark your interest?

Become a member to follow this project and never miss any updates