DFU activation 후 App 부팅 시 전원 OFF 처리 추가
This commit is contained in:
@@ -64,6 +64,7 @@ static volatile bool m_flash_write_done;
|
||||
|
||||
#define SCHED_QUEUE_SIZE 32 /**< Maximum number of events in the scheduler queue. */
|
||||
#define SCHED_EVENT_DATA_SIZE NRF_DFU_SCHED_EVENT_DATA_SIZE /**< Maximum app_scheduler event size. */
|
||||
#define POST_DFU_APP_BOOT_GPREGRET2_MASK 0x02U
|
||||
|
||||
#if !(defined(NRF_BL_DFU_ENTER_METHOD_BUTTON) && \
|
||||
defined(NRF_BL_DFU_ENTER_METHOD_PINRESET) && \
|
||||
@@ -470,6 +471,7 @@ ret_code_t nrf_bootloader_init(nrf_dfu_observer_t observer)
|
||||
break;
|
||||
|
||||
case ACTIVATION_SUCCESS:
|
||||
nrf_power_gpregret2_set(nrf_power_gpregret2_get() | POST_DFU_APP_BOOT_GPREGRET2_MASK);
|
||||
bootloader_reset(true);
|
||||
NRF_LOG_ERROR("Unreachable");
|
||||
return NRF_ERROR_INTERNAL; // Should not reach this.
|
||||
|
||||
Reference in New Issue
Block a user