diff --git a/platforms/nuttx/src/px4/nxp/imxrt/board_reset/board_reset.cpp b/platforms/nuttx/src/px4/nxp/imxrt/board_reset/board_reset.cpp index 85236a00e6..632180f412 100644 --- a/platforms/nuttx/src/px4/nxp/imxrt/board_reset/board_reset.cpp +++ b/platforms/nuttx/src/px4/nxp/imxrt/board_reset/board_reset.cpp @@ -65,9 +65,13 @@ static int board_reset_enter_bootloader() { +#ifdef BOARD_HAS_TEENSY_BOOTLOADER + asm("BKPT #251"); /* Enter Teensy MKL02 bootloader */ +#else uint32_t regvalue = BOOT_RTC_SIGNATURE; modifyreg32(IMXRT_SNVS_LPCR, 0, SNVS_LPCR_GPR_Z_DIS); putreg32(regvalue, PX4_IMXRT_RTC_REBOOT_REG_ADDRESS); +#endif return OK; } @@ -78,9 +82,7 @@ int board_reset(int status) } else if (status == REBOOT_TO_ISP) { -#ifdef BOARD_HAS_TEENSY_BOOTLOADER - asm("BKPT #251"); /* Enter Teensy MKL02 bootloader */ -#elif defined(BOARD_HAS_ISP_BOOTLOADER) +#ifdef BOARD_HAS_ISP_BOOTLOADER uint32_t arg = 0xeb100000; ROM_API_Init(); ROM_RunBootloader(&arg);