Going Dual Core With the Raspberry Pi RP2040
Elektor TV Elektor TV
29K subscribers
12,204 views
0

 Published On Jul 2, 2021

The RP2040 microcontroller by Raspberry Pi is an interesting device. It differs a bit from other microcontrollers as is has two cores. There are other dual-core controllers on the market, but these usually combine two different cores where each core is intended for special tasks. The RP2040, on the other hand, has two identical ARM Cortex-M0+ cores.

The design of the RP2040 is symmetric. Its two cores occupy the same position in the architecture, and both have access to everything. They can access all the memory and all the peripherals in the same way.

Two questions now arise: why would you need two cores and how do you use them? This video tries to answer these questions.

Contents

0:00 Intro
0:15 RP2040 dual-core programming
1:25 Why use two cores?
3:03 PIO blocks
3:48 Using the Arduino IDE
4:31 setup1 & loop1
4:44 Shared memory
5:19 Shared flash memory
5:45 Shared peripherals & spin locks
6:22 Core-to-core message FIFOs
6:58 Interrupts
7:40 Debugging
8:13 Wrapping up
8:46 Thank you for watching

Resources

* Example dual-core sketch using FIFOs: https://github.com/ClemensAtElektor/R...
* Example dual-core sketch using pin interrupt: https://github.com/ClemensAtElektor/R...
* Earle Philhower III’s Arduino Pico/RP204 Boards Package: https://github.com/earlephilhower/ard...
* Buy an RP2040-based Raspberry Pi Pico: https://www.elektor.com/raspberry-pi-...

Check out our YouTube offers: https://www.elektor.com/youtube
Subscribe to our Newsletter: https://www.elektormagazine.com/pages...

show more

Share/Embed