Support resetting Picoprobe board using USB RESET interface (RP2040)#108
Support resetting Picoprobe board using USB RESET interface (RP2040)#108qdotme wants to merge 1 commit intoraspberrypi:masterfrom
Conversation
… USB_RESET interface
P33M
left a comment
There was a problem hiding this comment.
Thanks for the PR - I have left review comments below.
| #define PROBE_PRODUCT_STRING "Picoprobe (CMSIS-DAP)" | ||
|
|
||
| // Host Reset Config | ||
| #define PICOPROBE_RESET_CAPABLE 1 |
There was a problem hiding this comment.
I would prefer disabled by default. I would guess that for other users the feature would aid remote development of the probe firmware itself, but the vast majority will be doing uf2 drag-and-drop with a Pico or a Debug Probe and a standard release.
So, please move this definition to include/board_example_config.h with a suitable description.
| #if PICOPROBE_RESET_CAPABLE | ||
| if (request->wIndex == 3) { | ||
| if (request->bRequest == RESET_REQUEST_BOOTSEL) { | ||
| reset_usb_boot(0, (request->wValue & 0x7f) | 0); |
There was a problem hiding this comment.
Superfluous bitwise OR with zero
| @@ -0,0 +1,28 @@ | |||
| /* | |||
There was a problem hiding this comment.
Can the reset interface definitions be included with a Cmake library linkage instead of a repeat inclusion of the sdk header?
|
This is superseded by #178, but requires an additional SDK commit that is yet to be merged. Closing in favour of the newer PR. |
We have a use-case involving reusing RP2040 supervisor as an SWD debug interface during initial testing. This implements standard Pico SDK C++ usb reset endpoints to interoperate with appropriately patched picotool. The patch enables this functionality by default, but it can be disabled with a config switch to avoid accidentally rebooting the incorrect RP2040 device.
raspberrypi/picotool@master...FarProbe:picotool:master