add rom_reset_usb_boot_extra which supports >32 pins and ACTIVE_LOW #2084
No reviewers
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk!2084
Loading…
Reference in a new issue
No description provided.
Delete branch "reset_usb_boot_upgrades"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I noticed this in passing - this change also adds relevant PICO_CONFIG to specify the ACTIVE_LOW default (note if the ACTIVITY_LED is not specified, the OTP defaults will be used on RP2350)
Seems to work!
@ -240,0 +244,4 @@* This function reboots the device into the BOOTSEL mode ('usb boot").** Facilities are provided to enable an "activity light" via GPIO attached LED for the USB Mass Storage Device,* and to limit the USB interfaces exposed.This chunk of doxygen is identical to that for
rom_reset_usb_boot, which will probably look pretty confusing in the rendered Doxygen output? (both https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-c-sdk.pdf and https://www.raspberrypi.com/documentation/pico-sdk/ )Is the addition of active_low the only difference between
rom_reset_usb_bootandrom_reset_usb_boot_extra?EDIT: Ah, according to the PR's title
rom_reset_usb_boot_extraalso supports more than 32 pins 😂@ -240,0 +254,4 @@* - 2 To disable the USB PICOBOOT Interface* \param usb_activity_gpio_pin_active_low Activity GPIO is active low (ignored on RP2040)*/void __attribute__((noreturn)) rom_reset_usb_boot_extra(int usb_activity_gpio_pin, uint32_t disable_interface_mask, bool usb_activity_gpio_pin_active_low);rom_reset_usb_boothasuint32_t usb_activity_gpio_pin_mask, whereasrom_reset_usb_boot_extrahasint usb_activity_gpio_pin. This might be a stupid question, but given the similarity of these two functions, would it make sense to modifyrom_reset_usb_boot_extrato accept apin_maskvalue too?@ -240,0 +244,4 @@* This function reboots the device into the BOOTSEL mode ('usb boot").** Facilities are provided to enable an "activity light" via GPIO attached LED for the USB Mass Storage Device,* and to limit the USB interfaces exposed.It doesn't use a mask
Given that the OTP
BOOTSEL_LED_CFGhas bothPINandACTIVELOWfields, should we makePICO_BOOTSEL_VIA_DOUBLE_RESET_ACTIVITY_LED_ACTIVE_LOWandPICO_STDIO_USB_RESET_BOOTSEL_FIXED_ACTIVITY_LED_ACTIVE_LOWoptional-and-unset-by-default (just like their_ACTIVITY_LEDcounterparts), rather than forcing them to default to 0 ?they are only used when the corresponding PIN define is set
@ -75,1 +75,4 @@// PICO_CONFIG: PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED_ACTIVE_LOW, Whether pin to use as bootloader activity LED when BOOTSEL mode is entered via USB (either VIA_BAUD_RATE or VIA_VENDOR_INTERFACE) is active low, type=bool, default=0, group=pico_stdio_usb#ifndef PICO_STDIO_USB_RESET_BOOTSEL_FIXED_ACTIVITY_LED_ACTIVE_LOW#define PICO_STDIO_USB_RESET_BOOTSEL_FIXED_ACTIVITY_LED_ACTIVE_LOW 0This should have been
PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED_ACTIVE_LOW(i.e. noFIXED) - #2096 fixes that.