Exploring the RP2350’s UART-Bootloader

The RP2350 has a few advantages over its predecessor, one of which is the ability to load firmware remotely via UART, as [Thomas Pfilser] has documented on his blog and …read more

May 11, 2025 - 16:54
 0
Exploring the RP2350’s UART-Bootloader

The RP2350 has a few advantages over its predecessor, one of which is the ability to load firmware remotely via UART, as [Thomas Pfilser] has documented on his blog and in the video below.

[Thomas] had a project that needed more PWM than the RP2350 could provide, and hit upon the idea of using a second RP2350 as a port expander. Now, one could hard-code this, but dealing with two sets of firmware on one board can be annoying. That’s where the UART bootloader comes in: it will allow [Thomas] to program the port-expander RP2350 using the main microcontroller. Thus he only has to worry about one firmware, speeding up development.

There are limits to this technique: for one, your code must fit into the RP2350’s RAM– but the chip has 512 kB. While 640 kB should be enough for anyone, 512 kB is plenty for the port-expander [Thomas] is working on. The second drawback is that your device now has a boot time of a second or so, since the UART connection is not exactly high-bandwidth. Third, using UART on the same pins as the bootloader within the program is a bit tricky, though [Thomas] found a solution that may soon be in the SDK.

[Thomas] also wanted to be able to perform this trick remotely, which isn’t exactly UART’s forte. RS-485 comes to the rescue, via TI’s THVD1450. That worked reliably at the 10m cable length used for the test. [Thomas] sees no reason it could not work over much longer distances. ([Thomas] suggests up to 100 m, but the baud rate is fairly low, so we wouldn’t be surprised if you could push it quite a bit further than that. The standard is good out to a kilometer, after all.) For all the wrinkles and links to tips and solutions, plus of course [Thomas]’s code, check out the blog. If you want to listen to the information, you can check out the video below.

We’re grateful to [Thomas] for letting us know about his project via the tip line, like we are to everyone who drops us a tip. Hint, hint.

Given that it is the new chip on the block, we haven’t seen too many hacks with the RP2350 yet, but they’re starting to trickle in. While a UART bootloader is a nice feature to have, it can also introduce a security risk, which is always something to keep in mind.