Asset OTA to RP2040

Searched for a mention but not found - has anyone done Asset OTA to a RP2040 co-processor?

It's definitely possible as it's been tried and works, but the code is not in a state suitable for a tutorial and also I can't share the code because it's not mine, and the author no longer works at Particle.

Any clues you can give would be most welcome - [edit] this request didn't elicit much of a response.

More specific questions:

  1. Can I use the USB Serial to direct connect to the USB Serial on the Pico (I am planning to use a module rather than chip down RP2040)?
  2. To get the Pico in to boot loader mode to receive a file - use open SerialUSB (1200 baud), close SerialUSB?
  3. I need to write a script to open and read the UF2 file on the Particle device that has been transferred via Asset OTA and then send this via SerialUSB?

Any guidance would be gratefully received.

That definitely will not work. Particle devices cannot be a USB host. It can only be done with UART serial.

So that means a custom boot loader for UART programming for the Pico and probably a dedicated pin to signal to the pico to wait for new firmware over UART?

What happened to the USBSerial software that got discontinued after 0.6.0?

Correct, custom bootloader, and probably a mode select pin.

USBSerial1? That only worked on STM32 devices, and still wasn't USB host mode. It was a secondary USB CDC port, same direction but a second port over the same physical cable.

What is the maximum baud you could recommend for the UART Serial1, 2 or 3. This will be on pcb track. I am assuming 1Mbit/s.

That will probably work. Most cellular devices use 921600 but have flow control enabled. When using tethering without flow control, the recommended maximum is 460800.

However it's also dependent on how fast the Pi can write to its flash and how big its UART buffer is, so you may need to slow it down if you are not using flow control.

OK - will be more careful and patient!