Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions arch/arm/src/rp2040/rp2040_rom.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@
****************************************************************************/

typedef void *(*rom_table_lookup_fn)(uint16_t *table, uint32_t code);
typedef void (*rom_reset_usb_boot_fn)(uint32_t usb_activity_gpio_pin_mask,
uint32_t disable_interface_mask);
17 changes: 16 additions & 1 deletion boards/arm/rp2040/common/src/rp2040_reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
#include <nuttx/board.h>
#include <nuttx/arch.h>

#include <sys/boardctl.h>

#include "rp2040_rom.h"

#ifdef CONFIG_BOARDCTL_RESET

/****************************************************************************
Expand Down Expand Up @@ -56,7 +60,18 @@

int board_reset(int status)
{
up_systemreset();
if (status == BOARDIOC_SOFTRESETCAUSE_ENTER_BOOTLOADER)
{
rom_reset_usb_boot_fn reset_usb_boot;

reset_usb_boot = (rom_reset_usb_boot_fn)ROM_LOOKUP(ROM_RESET_USB_BOOT);
reset_usb_boot(0, 0);
}
else
{
up_systemreset();
}

return 0;
}

Expand Down
Loading