Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8380

General • Re: Battery-Powered Pico W and USB Type-C Connection Issue

$
0
0
That is interesting. There are two questions I would ask; what does 'dmesg' show, and do you have some simple code to show the issue ?

Good news - When the Raspberry Pi 4B's Type-C connector was set to host mode and the Pico W was connected, this problem did not occur and the Pi 4B recognised the Pico-W correctly as a USB device:

Code:

[  504.594721] usb 3-1: USB disconnect, device number 3[  515.114794] usb 3-1: new full-speed USB device number 4 using dwc2[  515.323539] usb 3-1: New USB device found, idVendor=2e8a, idProduct=000a, bcdDevice= 1.00[  515.323547] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3[  515.323551] usb 3-1: Product: Pico[  515.323554] usb 3-1: Manufacturer: Raspberry Pi[  515.323557] usb 3-1: SerialNumber: E661640843564229[  515.324384] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
The following instructions were added to /boot/firmware/config.txt on the bookworm Raspberry Pi 4B to boot it up:
dtoverlay=dwc2,dr_mode=host
And the code used is the following:

Code:

#include <pico/stdlib.h>#include <stdio.h>#include <tusb.h>int main(void) {    stdio_init_all();    /*     * This GPIO configuration may cause problems with the recognition     * of USB devices when a standard Pico is connected to a host PC     * with a Type-C cable.     */    gpio_init(24);    gpio_set_dir(24, GPIO_OUT);    gpio_put(24, 1);    printf("Waiting for USB connection\n");    while (true) {        printf("TinyUSB %s\n", (tud_ready() ? "ready" : "not ready"));        sleep_ms(1000);    }}

I need to find a non-Raspberry Pi Linux machine from somewhere.

Statistics: Posted by 0yama — Wed May 08, 2024 2:19 am



Viewing all articles
Browse latest Browse all 8380

Trending Articles