Pico Serial Bootloader (2021)
blog.usedbytes.com
blog.usedbytes.com
Don’t get me wrong the RP2040 is a fantastic chip. But the ESP32 is a dual core MCU running at 240MHz!
Edit to add - you can also flash the ESP32 wirelessly with an OTA update.
While a great chip ESP32 doesn't come close matching RP2040 PIO's power in this aspect.
The Pi Wars rules state:
"The core controller of the robot should be a Raspberry Pi. This includes all microcomputer models of the Pi (such as the Pi 3, Pi 4, Pi Zero, Compute Module) and also the Raspberry Pi Pico."
and
"Additional Microcontrollers, such as Arduinos, micro:bits etc may be used on the robot but the Raspberry Pi must be in overall control"
Something like 2x or 4x RP2040 with an unified bus in the same chip. Twice or four times more I/O as well.
And just few common hardware blocks, PIOs are nice and all but I'd love some nice and featureful hardware timers
For applications where Bluetooth or WiFi are needed, the ESP32 is obviously a way better chip. But the RP2040 is also a dual core MCU, its speed at 133MHz isn't anything to scoff at either, and it is genuinely a pleasure to work with. I'd take the RP2040 over the ESP32 any day of the week.
With that in mind, what would make ESP32 a better chip if using WiFi / Bluetooth? (apart from cpu clock)
Any particular features that make ESP32 or Pico W stand out for <insert application here> ?
What I mean to say: with the RP2040 being an excellent chip to design with, and the Pico W flavour adding WiFi + Bluetooth, what reason(s) if any to add ESP32 to that?
(I could understand ESP32 may better suit some applications stand-alone, for ...reasons)
Additionally, I've learned that when it comes to part choices, especially microcontrollers, just because another part is "more right" it doesn't make your choice wrong.
2) Doesn't require dealing with the madness that is ESP-IDF (terrible build system, runtime interrupt allocation, ...)
3) Simpler and cheaper.
For another project, the ESP32 family unfortunately doesn’t have a model that has both Bluetooth Classic (only the original ESP32 does) and USB host/device modes (only ESP32-S2 and ESP32-S3 do), so I’m thinking I’ll use the RP2040 as the main processor, with USB, and an ESP32 coprocessor. I really would rather just use a single ESP32, but that isn’t looking like an option here.
You should either:
* have a timer triggering interrupt that reads the data
* have a timer triggering DMA from the input port (if it was whole 8/16 bit) directly to memory
* trigger an interrupt with microprocessor's clock bus and read it directly.
Technically the 2nd one should have zero jitter (aside from clock itself).
Busy loop is the worst case on a microprocessor running RTOS to do the other stuff.
No idea if ESP32 DMA engine can do it but common trick to get either constant rate input or output was just setting DMA engine to copy data from/to IO port to/from memory at constant rate.
I remember someone using it to drive some ridiculus number of RGB LEDs by basically using DMA to bitbang multiple chains of them at once
But yeah, using a simpler MCU as basically IO co-processor is usually simpler. I wish there was some kind of low pin bus that allowed to say directly map a part of memory to the chip on other side, akin to what RDMA does.
I needed to detect writes to a bus that could happen at 1MHz, which involved reading the state of the bus multiple times per microsecond (based on the timing of the various signals). The jitter in the worst case was multiple microseconds (causing missed accesses), no matter what I tried.
I wasn’t able to use DMA on the ESP32 to help— perhaps it could have if I had tried to massage the problem a little bit more though.
I wanted to love the ESP32 because it seemed objectively better, but despite trying, I couldn’t get my tool chain and process to be reliable and productive. Admittedly, part of that is probably due to working on a Mac. That hasn’t been an issue with the RP2040 though, and neither has anything else, really.
I sometimes feel silly using either of them because the stuff I make could work fine with even less power and certainly less IO. We’re spoiled these days. In my case though, I’d be fine with plenty of boards; the nicest development experience just happened to be on the pi.
Having certain peripherals can make some projects go from hard to easy. Power usage can also be huge factor, althought of course if you already have ESP32 on board those aren't exactly great for that.
Like, if you're making motor driver, you probably gonna want some featureful counters with good PWM options, maybe even some floating point instructions if you do something fancy. Probably also good ADCs.
But that needs to be often run realtime or near-realtime so having Wifi/BT stack can add you some headache, both in analog (interference) and digital domain (making sure wifi interrupt wont break timings on rest of your code).
Lastly division of responsibilities is easier to code. ESP32 part for example can focus entirely on wifi/UI/APIs, while the controlled MCU can do just the control and talking with ESP32.
> From https://www.cnx-software.com/2023/02/11/raspberry-pi-pico-w-... :
>> The Raspberry Pi Pico W board was launched with a WiFi 4 and Bluetooth 5.2 module based on the Infineon CYW43439 wireless chip in June 2022
> bluekitchen/btstack is the basis for the Bluetooth support in Pi Pico SDK 1.5.0+: https://github.com/bluekitchen/btstack
https://github.com/raspberrypi/pico-sdk/tree/master/lib /btstack
> /? "pi pico" bluetooth 5.2 [BLE] https://www.google.com/search?q=%22pi+pico%22+bluetooth+5.2