mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 17:33:34 +08:00
v6x-rt: Add reboot to isp support
This commit is contained in:
committed by
David Sidrane
parent
5d7cb99204
commit
e79f6b2ac1
@@ -540,6 +540,8 @@
|
||||
|
||||
/* This board provides the board_on_reset interface */
|
||||
|
||||
#define BOARD_HAS_ISP_BOOTLOADER 1
|
||||
|
||||
#define BOARD_HAS_ON_RESET 1
|
||||
|
||||
#define PX4_GPIO_INIT_LIST { \
|
||||
|
||||
@@ -35,6 +35,8 @@ px4_add_library(arch_board_reset
|
||||
board_reset.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(arch_board_reset PRIVATE arch_board_romapi)
|
||||
|
||||
# up_systemreset
|
||||
if (NOT DEFINED CONFIG_BUILD_FLAT)
|
||||
target_link_libraries(arch_board_reset PRIVATE nuttx_karch)
|
||||
|
||||
@@ -44,6 +44,10 @@
|
||||
#include <arm_internal.h>
|
||||
#include <hardware/rt117x/imxrt117x_snvs.h>
|
||||
|
||||
|
||||
#include <px4_arch/imxrt_flexspi_nor_flash.h>
|
||||
#include <px4_arch/imxrt_romapi.h>
|
||||
|
||||
#define BOOT_RTC_SIGNATURE 0xb007b007
|
||||
#define PX4_IMXRT_RTC_REBOOT_REG 3
|
||||
#define PX4_IMXRT_RTC_REBOOT_REG_ADDRESS IMXRT_SNVS_LPGPR3
|
||||
@@ -64,6 +68,11 @@ int board_reset(int status)
|
||||
{
|
||||
if (status == REBOOT_TO_BOOTLOADER) {
|
||||
board_reset_enter_bootloader();
|
||||
|
||||
} else if (status == REBOOT_TO_ISP) {
|
||||
uint32_t arg = 0xeb100000;
|
||||
ROM_API_Init();
|
||||
ROM_RunBootloader(&arg);
|
||||
}
|
||||
|
||||
#if defined(BOARD_HAS_ON_RESET)
|
||||
|
||||
Reference in New Issue
Block a user