Hello,
I am writing a program for the Pico W, which runs on three AA batteries, that alters its behavior when connected to a host PC via USB. Standard Pico recognises USB connections and disconnections as expected. However, the Pico W and USB Type-C cable combination does not initiate USB communication when connected in the following order:
1. connect the USB cable to the micro USB connector on the Pico W
2. connect the USB cable to the Type-C connector of the host PC.
The reverse procedure does not cause the problem. Using the Type-A cable does not cause the problem. Even more interestingly, this problem does not occur with standard Pico.
The easiest way to reproduce this is to check if the RPI RP2 disk is mounted in BOOTSEL mode.
1. supply power to the VSYS while pressing the BOOTSEL button.
2. connect the micro USB cable to the device.
3. connect to the host PC via USB Type-C.
For Pico, the RPI RP2 disk is mounted on the host PC, but for Pico W nothing happens.
Tested with MacBook Air (M2, 2022) macos 14.4.1, SurfacePro7 Windows 11 Home and several cables including the Raspberry Pi Debug Prove included cable. Insert a Schottky diode between the VSYS and the power supply, referring to the Pico W datasheet.
A program to check the USB connection status of Pico and Pico W has been placed in the Github repository:
https://github.com/oyama/pico-w-usb-failures
This program checks the USB connection status in three ways and outputs it to the UART every second:
- GPIOs connected to the VBUS (GPIO24 for Pico, LW_GPIO02 for Pico W)
- USBCTRL_REGS on the RP2040 chip
- TinyUSB's tud_ready() function
For Pico, the status changes as follows when connected to the host PC.
Initially I assumed it was a PicoW problem and investigated, but just before I went to bed this morning I realised that the order in which the PicoW and Type-C cables were connected triggered the problem.
Should I continue my journey to find a cable? Or is there any solution? Or am I missing something or making a mistake?
Regards,
I am writing a program for the Pico W, which runs on three AA batteries, that alters its behavior when connected to a host PC via USB. Standard Pico recognises USB connections and disconnections as expected. However, the Pico W and USB Type-C cable combination does not initiate USB communication when connected in the following order:
1. connect the USB cable to the micro USB connector on the Pico W
2. connect the USB cable to the Type-C connector of the host PC.
The reverse procedure does not cause the problem. Using the Type-A cable does not cause the problem. Even more interestingly, this problem does not occur with standard Pico.
The easiest way to reproduce this is to check if the RPI RP2 disk is mounted in BOOTSEL mode.
1. supply power to the VSYS while pressing the BOOTSEL button.
2. connect the micro USB cable to the device.
3. connect to the host PC via USB Type-C.
For Pico, the RPI RP2 disk is mounted on the host PC, but for Pico W nothing happens.
Tested with MacBook Air (M2, 2022) macos 14.4.1, SurfacePro7 Windows 11 Home and several cables including the Raspberry Pi Debug Prove included cable. Insert a Schottky diode between the VSYS and the power supply, referring to the Pico W datasheet.
A program to check the USB connection status of Pico and Pico W has been placed in the Github repository:
https://github.com/oyama/pico-w-usb-failures
This program checks the USB connection status in three ways and outputs it to the UART every second:
- GPIOs connected to the VBUS (GPIO24 for Pico, LW_GPIO02 for Pico W)
- USBCTRL_REGS on the RP2040 chip
- TinyUSB's tud_ready() function
For Pico, the status changes as follows when connected to the host PC.
However, for Pico W, the status does not change even if the host PC's Type-C cable is connected.Waiting for USB connection
BOARD=pico, TinyUSB not ready, USBCTRL_REG(value=0x00000015) disconnect, VBUS low
BOARD=pico, TinyUSB not ready, USBCTRL_REG(value=0x00000015) disconnect, VBUS low
BOARD=pico, TinyUSB not ready, USBCTRL_REG(value=0x00000015) disconnect, VBUS low
BOARD=pico, TinyUSB ready, USBCTRL_REG(value=0x40050005) connect, VBUS high
BOARD=pico, TinyUSB ready, USBCTRL_REG(value=0x40050005) connect, VBUS high
BOARD=pico, TinyUSB ready, USBCTRL_REG(value=0x40050005) connect, VBUS high
Waiting for USB connection
BOARD=pico_w, TinyUSB not ready, USBCTRL_REG(value=0x40050015) disconnect, VBUS low
BOARD=pico_w, TinyUSB not ready, USBCTRL_REG(value=0x40050015) disconnect, VBUS low
BOARD=pico_w, TinyUSB not ready, USBCTRL_REG(value=0x40050015) disconnect, VBUS low
BOARD=pico_w, TinyUSB not ready, USBCTRL_REG(value=0x40050015) disconnect, VBUS low
BOARD=pico_w, TinyUSB not ready, USBCTRL_REG(value=0x40050015) disconnect, VBUS low
BOARD=pico_w, TinyUSB not ready, USBCTRL_REG(value=0x40050015) disconnect, VBUS low
Initially I assumed it was a PicoW problem and investigated, but just before I went to bed this morning I realised that the order in which the PicoW and Type-C cables were connected triggered the problem.
Should I continue my journey to find a cable? Or is there any solution? Or am I missing something or making a mistake?
Regards,
Statistics: Posted by 0yama — Mon May 06, 2024 10:25 am