DFU activation 후 App 부팅 시 전원 OFF 처리 추가
This commit is contained in:
@@ -76,6 +76,8 @@ static void dfu_observer(nrf_dfu_evt_type_t evt_type)
|
||||
break;
|
||||
case NRF_DFU_EVT_DFU_STARTED:
|
||||
break;
|
||||
case NRF_DFU_EVT_DFU_COMPLETED:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
+11
@@ -32,6 +32,8 @@ NOTICE: This file has been modified by Nordic Semiconductor ASA.
|
||||
#include "system_nrf52_approtect.h"
|
||||
|
||||
#define __SYSTEM_CLOCK_64M (64000000UL)
|
||||
#define POWER_HOLD_PIN 8UL
|
||||
#define POWER_HOLD_PIN_MASK (1UL << POWER_HOLD_PIN)
|
||||
|
||||
|
||||
#if defined ( __CC_ARM )
|
||||
@@ -89,6 +91,15 @@ void SystemCoreClockUpdate(void)
|
||||
|
||||
void SystemInit(void)
|
||||
{
|
||||
/* Keep the external power latch asserted immediately after reset. */
|
||||
NRF_P0->OUTSET = POWER_HOLD_PIN_MASK;
|
||||
NRF_P0->DIRSET = POWER_HOLD_PIN_MASK;
|
||||
NRF_P0->PIN_CNF[POWER_HOLD_PIN] =
|
||||
(GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos) |
|
||||
(GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos) |
|
||||
(GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) |
|
||||
(GPIO_PIN_CNF_DRIVE_H0H1 << GPIO_PIN_CNF_DRIVE_Pos) |
|
||||
(GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos);
|
||||
/* Enable SWO trace functionality. If ENABLE_SWO is not defined, SWO pin will be used as GPIO (see Product
|
||||
Specification to see which one). */
|
||||
#if defined (ENABLE_SWO) && defined(CLOCK_TRACECONFIG_TRACEMUX_Pos)
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@
|
||||
<LExpSel>0</LExpSel>
|
||||
</OPTXL>
|
||||
<OPTFL>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
|
||||
Reference in New Issue
Block a user