Skip to content

Add reset interface to multi CDC example#694

Open
will-v-pi wants to merge 6 commits into
raspberrypi:developfrom
will-v-pi:multi-cdc-reset
Open

Add reset interface to multi CDC example#694
will-v-pi wants to merge 6 commits into
raspberrypi:developfrom
will-v-pi:multi-cdc-reset

Conversation

@will-v-pi
Copy link
Copy Markdown
Contributor

@will-v-pi will-v-pi commented Aug 14, 2025

This depends on raspberrypi/pico-sdk#2629 which has now been merged

This adds a reset interface to the dev_multi_cdc example, along with other improvements to the responsiveness and structure

@mtfurlan
Copy link
Copy Markdown

This allows picotool to put the board in BOOTSEL mode, but the serial numbers of the example and the bootloader don't match so picotool can't find it.

$ picotool info --vid 0xcafe --pid 0x4102 -f
Tracking device serial number DF609C8067295728 for reboot
The device was asked to reboot into BOOTSEL mode so the command can be executed.
Waiting for device to reboot.........

Despite the reboot attempt, no accessible RP-series devices in BOOTSEL mode were found found with serial number DF609C8067295728. It is possible the device is not responding, and will have to be manually entered into BOOTSEL mode.
[  +0.252727] usb 9-1.4: new full-speed USB device number 104 using xhci-pci-renesas
[  +8.606144] usb 9-1.4: New USB device found, idVendor=cafe, idProduct=4102, bcdDevice= 1.00
[  +0.000020] usb 9-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0.000010] usb 9-1.4: Product: Pico (2)
[  +0.000008] usb 9-1.4: Manufacturer: Raspberry Pi
[  +0.000007] usb 9-1.4: SerialNumber: DF609C8067295728
[  +0.025451] cdc_acm 9-1.4:1.0: ttyACM1: USB ACM device
[  +0.003981] cdc_acm 9-1.4:1.2: ttyACM2: USB ACM device
[ +12.616681] usb 9-1.4: USB disconnect, device number 104
[  +0.256015] usb 9-1.4: new full-speed USB device number 105 using xhci-pci-renesas
[  +0.141344] usb 9-1.4: New USB device found, idVendor=2e8a, idProduct=0003, bcdDevice= 1.00
[  +0.000022] usb 9-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0.000010] usb 9-1.4: Product: RP2 Boot
[  +0.000008] usb 9-1.4: Manufacturer: Raspberry Pi
[  +0.000007] usb 9-1.4: SerialNumber: E0C912952D54

Comment thread usb/device/dev_multi_cdc/usb_descriptors.c Outdated
Comment thread usb/device/dev_multi_cdc/CMakeLists.txt Outdated
@will-v-pi will-v-pi marked this pull request as ready for review May 28, 2026 14:57
@will-v-pi will-v-pi requested a review from kilograham May 28, 2026 15:54
@kilograham kilograham added this to the 2.2.1 milestone Jun 1, 2026

// TinyUSB device task must be called regularly, so we use a repeating timer
struct repeating_timer timer;
add_repeating_timer_ms(1, tud_task_callback, NULL, &timer);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a bad idea - there is no locking on the called tud_task(), so may interfere with the tasks in the loop below - perhaps the example should just use the task from the loop as before, but do something less silly (i.e. use a state machine rather than a sleep) in custom_cdc_task() - not really sure that custom_cdc_task is very interesting as is anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants