Quantcast
Viewing all articles
Browse latest Browse all 4890

General • Re: Error when Running Pico PIO with USB Serial Output

dmesg gives the following error messages: FAT-fs (sda1): unable to read boot sector to mark fs as dirty
That and the others are not strictly errors but a consequence of the RP2040 unilaterally exiting BOOTSEL mode, rebooting and running the uploaded code. Enumeration and details of the USB configuration of the uploaded code should be shown after that.

That there's nothing there would seem to indicate it hasn't enumerated, which explains the lack of '/dev/ttyACM0', and probably no appearance using 'lsusb'.

The most likely cause of it not enumerating is a missing 'stdio_init_all();' call at the start of your 'main' function, plus related '#include'.

Code:

#include <stdio.h>#include "pico/stdlib.h"int main() {    stdio_init_all();    ... your code here ...}
That's missing from the default 'hello.c' so won't be there unless you added it. I'm betting you didn't.

The other case can be when 'main' doesn't have an infinite or other loop, exits soon after it has started, but that shouldn't be the case here.

Statistics: Posted by hippy — Tue Apr 16, 2024 4:00 pm



Viewing all articles
Browse latest Browse all 4890

Trending Articles