New firmware for RP2040 "bugs"

Hi team,

I’ve been working with the Raspberry Pi Pico core before the new firmware update, I made by myself the integration of the PDM mic before it was released, and it was working very well for me, uploading audio to Edge Impulse through the CLI and deploying the model back in normal mode, it was missing just continuous mode.

The important thing:
With the new firmware, the upload time of audio to Edge Impulse got slowed down twice, with my firmware uploading 5 seconds of (16khz) audio took 10 seconds, now takes 20 seconds.

I was trying to play with the baud rate but the RP core doesn’t improve the transfer speed even using 921600 bauds, it’s something that you may know. I don’t know what you’ve changed that makes things slower.

This is with the new firmware:
image

This is with my firmware (a modification of the older RP firmware that includes PDM).
image

Also, the continuous mode is very slow (I know it depends on the model), but compared to the ESP32 (I know it’s faster) but umm. Please give it a check.

Thanks,
Christopher

Hi @mcmchris,

Thanks for the report! I will file an issue with the dev team.

Hi, @mcmchris !

  1. About slowdown of transfer - it’s hard to say what could be the reason without looking at the code. If you want, you can share your code, so we can compare.
  2. The goal of continuous mode is to process one chunk of data (part of the whole window) in less time than it takes to record it. This way continuous inference can be achieved. The time it takes to process one chunk of data depends on a) DSP processing b) NN inference. If it takes more time to process DSP + NN for one chunk of data (that can happen depending on your MFCC/MFE parameters and NN size/complexity) than it takes to record that chunk, you should get an error.
    In RP2040 case, as you might have noticed, DSP processing takes much more time than NN inference - that is because Cortex M0+ core does not have FPU (floating point unit). The ESP32 you compared it with has faster core and also FPU. The inference speed on RP2040 is not related to data transfer speed and there are no easy ways to speed it up - the only way is to perform fixed point DSP calculations, which is something that we decided not to support at this point.
2 Likes