fix issue with dfu startup on nrf52832, change to adafruit-nrfutil
clean up dfu startup
This commit is contained in:
@ -61,6 +61,9 @@ uint16_t _pwm_blue_seq[PWM_CHANNEL_NUM] = { PWM_MAXCOUNT/2, 0, 0 , 0 };
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
NRF_CLOCK->LFCLKSRC = (uint32_t)((CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos) & CLOCK_LFCLKSRC_SRC_Msk);
|
||||
NRF_CLOCK->TASKS_LFCLKSTART = 1UL;
|
||||
|
||||
// stop WDT if started by application, when jumping from application using BLE DFU
|
||||
if ( NRF_WDT->RUNSTATUS )
|
||||
{
|
||||
|
130
src/sdk_config.h
130
src/sdk_config.h
@ -252,136 +252,6 @@
|
||||
// </e>
|
||||
|
||||
|
||||
// <e> PWM_ENABLED - nrf_drv_pwm - PWM peripheral driver
|
||||
//==========================================================
|
||||
#ifndef PWM_ENABLED
|
||||
#define PWM_ENABLED 0
|
||||
#endif
|
||||
// <o> PWM_DEFAULT_CONFIG_OUT0_PIN - Out0 pin <0-31>
|
||||
|
||||
|
||||
#ifndef PWM_DEFAULT_CONFIG_OUT0_PIN
|
||||
#define PWM_DEFAULT_CONFIG_OUT0_PIN 31
|
||||
#endif
|
||||
|
||||
// <o> PWM_DEFAULT_CONFIG_OUT1_PIN - Out1 pin <0-31>
|
||||
|
||||
|
||||
#ifndef PWM_DEFAULT_CONFIG_OUT1_PIN
|
||||
#define PWM_DEFAULT_CONFIG_OUT1_PIN 31
|
||||
#endif
|
||||
|
||||
// <o> PWM_DEFAULT_CONFIG_OUT2_PIN - Out2 pin <0-31>
|
||||
|
||||
|
||||
#ifndef PWM_DEFAULT_CONFIG_OUT2_PIN
|
||||
#define PWM_DEFAULT_CONFIG_OUT2_PIN 31
|
||||
#endif
|
||||
|
||||
// <o> PWM_DEFAULT_CONFIG_OUT3_PIN - Out3 pin <0-31>
|
||||
|
||||
|
||||
#ifndef PWM_DEFAULT_CONFIG_OUT3_PIN
|
||||
#define PWM_DEFAULT_CONFIG_OUT3_PIN 31
|
||||
#endif
|
||||
|
||||
// <o> PWM_DEFAULT_CONFIG_BASE_CLOCK - Base clock
|
||||
|
||||
// <0=> 16 MHz
|
||||
// <1=> 8 MHz
|
||||
// <2=> 4 MHz
|
||||
// <3=> 2 MHz
|
||||
// <4=> 1 MHz
|
||||
// <5=> 500 kHz
|
||||
// <6=> 250 kHz
|
||||
// <7=> 125 kHz
|
||||
|
||||
#ifndef PWM_DEFAULT_CONFIG_BASE_CLOCK
|
||||
#define PWM_DEFAULT_CONFIG_BASE_CLOCK 4
|
||||
#endif
|
||||
|
||||
// <o> PWM_DEFAULT_CONFIG_COUNT_MODE - Count mode
|
||||
|
||||
// <0=> Up
|
||||
// <1=> Up and Down
|
||||
|
||||
#ifndef PWM_DEFAULT_CONFIG_COUNT_MODE
|
||||
#define PWM_DEFAULT_CONFIG_COUNT_MODE 0
|
||||
#endif
|
||||
|
||||
// <o> PWM_DEFAULT_CONFIG_TOP_VALUE - Top value
|
||||
#ifndef PWM_DEFAULT_CONFIG_TOP_VALUE
|
||||
#define PWM_DEFAULT_CONFIG_TOP_VALUE 1000
|
||||
#endif
|
||||
|
||||
// <o> PWM_DEFAULT_CONFIG_LOAD_MODE - Load mode
|
||||
|
||||
// <0=> Common
|
||||
// <1=> Grouped
|
||||
// <2=> Individual
|
||||
// <3=> Waveform
|
||||
|
||||
#ifndef PWM_DEFAULT_CONFIG_LOAD_MODE
|
||||
#define PWM_DEFAULT_CONFIG_LOAD_MODE 0
|
||||
#endif
|
||||
|
||||
// <o> PWM_DEFAULT_CONFIG_STEP_MODE - Step mode
|
||||
|
||||
// <0=> Auto
|
||||
// <1=> Triggered
|
||||
|
||||
#ifndef PWM_DEFAULT_CONFIG_STEP_MODE
|
||||
#define PWM_DEFAULT_CONFIG_STEP_MODE 0
|
||||
#endif
|
||||
|
||||
// <o> PWM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority
|
||||
|
||||
|
||||
// <i> Priorities 0,1,4,5 (nRF52) are reserved for SoftDevice
|
||||
// <0=> 0 (highest)
|
||||
// <1=> 1
|
||||
// <2=> 2
|
||||
// <3=> 3
|
||||
// <4=> 4
|
||||
// <5=> 5
|
||||
// <6=> 6
|
||||
// <7=> 7
|
||||
|
||||
#ifndef PWM_DEFAULT_CONFIG_IRQ_PRIORITY
|
||||
#define PWM_DEFAULT_CONFIG_IRQ_PRIORITY 7
|
||||
#endif
|
||||
|
||||
// <q> PWM0_ENABLED - Enable PWM0 instance
|
||||
|
||||
|
||||
#ifndef PWM0_ENABLED
|
||||
#define PWM0_ENABLED 0
|
||||
#endif
|
||||
|
||||
// <q> PWM1_ENABLED - Enable PWM1 instance
|
||||
|
||||
|
||||
#ifndef PWM1_ENABLED
|
||||
#define PWM1_ENABLED 0
|
||||
#endif
|
||||
|
||||
// <q> PWM2_ENABLED - Enable PWM2 instance
|
||||
|
||||
|
||||
#ifndef PWM2_ENABLED
|
||||
#define PWM2_ENABLED 0
|
||||
#endif
|
||||
|
||||
// <q> PWM3_ENABLED - Enable PWM3 instance
|
||||
|
||||
|
||||
#ifndef PWM3_ENABLED
|
||||
#define PWM3_ENABLED 0
|
||||
#endif
|
||||
|
||||
// </e>
|
||||
|
||||
|
||||
// <e> RTC_ENABLED - nrf_drv_rtc - RTC peripheral driver
|
||||
//==========================================================
|
||||
#ifndef RTC_ENABLED
|
||||
|
Reference in New Issue
Block a user