File tree Expand file tree Collapse file tree 5 files changed +17
-26
lines changed
atmel-samd/common-hal/frequencyio
stm32f4/boards/stm32f412zg_discovery Expand file tree Collapse file tree 5 files changed +17
-26
lines changed Original file line number Diff line number Diff line change @@ -213,17 +213,17 @@ void frequencyin_samd51_start_dpll() {
213
213
// Will also enable the Lock Bypass due to low-frequency sources causing DPLL unlocks
214
214
// as outlined in the Errata (1.12.1)
215
215
OSCCTRL -> Dpll [1 ].DPLLRATIO .reg = OSCCTRL_DPLLRATIO_LDRFRAC (0 ) | OSCCTRL_DPLLRATIO_LDR (2999 );
216
- if ( BOARD_HAS_CRYSTAL ) { // we can use XOSC32K directly as the source
217
- OSC32KCTRL -> XOSC32K . bit . EN32K = 1 ;
218
- OSCCTRL -> Dpll [ 1 ]. DPLLCTRLB . reg = OSCCTRL_DPLLCTRLB_REFCLK ( 1 ) |
219
- OSCCTRL_DPLLCTRLB_LBYPASS ;
220
- } else {
221
- // can't use OSCULP32K directly; need to setup a GCLK as a reference,
222
- // which must be done in samd/clocks.c to avoid waiting for sync
223
- return ;
224
- //OSC32KCTRL->OSCULP32K.bit.EN32K = 1;
225
- //OSCCTRL->Dpll[1].DPLLCTRLB.reg = OSCCTRL_DPLLCTRLB_REFCLK(0);
226
- }
216
+ # if BOARD_HAS_CRYSTAL
217
+ // we can use XOSC32K directly as the source
218
+ OSC32KCTRL -> XOSC32K . bit . EN32K = 1 ;
219
+ OSCCTRL -> Dpll [ 1 ]. DPLLCTRLB . reg = OSCCTRL_DPLLCTRLB_REFCLK ( 1 ) | OSCCTRL_DPLLCTRLB_LBYPASS ;
220
+ # else
221
+ // can't use OSCULP32K directly; need to setup a GCLK as a reference,
222
+ // which must be done in samd/clocks.c to avoid waiting for sync
223
+ return ;
224
+ //OSC32KCTRL->OSCULP32K.bit.EN32K = 1;
225
+ //OSCCTRL->Dpll[1].DPLLCTRLB.reg = OSCCTRL_DPLLCTRLB_REFCLK(0);
226
+ #endif
227
227
OSCCTRL -> Dpll [1 ].DPLLCTRLA .reg = OSCCTRL_DPLLCTRLA_ENABLE ;
228
228
229
229
while (!(OSCCTRL -> Dpll [1 ].DPLLSTATUS .bit .LOCK || OSCCTRL -> Dpll [1 ].DPLLSTATUS .bit .CLKRDY )) {}
Original file line number Diff line number Diff line change @@ -5,21 +5,13 @@ This is a port of CircuitPython to the Nordic Semiconductor nRF52 series of chip
5
5
> ** NOTE** : There are board-specific READMEs that may be more up to date than the
6
6
generic board-neutral documentation below.
7
7
8
- ## Compile and Flash
9
-
10
- Prerequisite steps for building the nrf port:
11
-
12
- git clone <URL>.git circuitpython
13
- cd circuitpython
14
- git submodule update --init --recursive
15
- make -C mpy-cross
8
+ ## Flash
16
9
17
10
Some boards have UF2 bootloaders and can simply be flashed in the normal way, by copying
18
11
firmware.uf2 to the BOOT drive.
19
12
20
- To build and flash issue the following command inside the ports/nrf/ folder :
13
+ For some boards, you can use the ` flash ` target :
21
14
22
- make BOARD=pca10056
23
15
make BOARD=pca10056 flash
24
16
25
17
## Segger Targets
Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ const nvm_bytearray_obj_t common_hal_bleio_nvm_obj = {
59
59
.base = {
60
60
.type = & nvm_bytearray_type ,
61
61
},
62
- .len = CIRCUITPY_BLE_CONFIG_SIZE ,
63
62
.start_address = (uint8_t * ) CIRCUITPY_BLE_CONFIG_START_ADDR ,
63
+ .len = CIRCUITPY_BLE_CONFIG_SIZE ,
64
64
};
65
65
66
66
STATIC void softdevice_assert_handler (uint32_t id , uint32_t pc , uint32_t info ) {
Original file line number Diff line number Diff line change 81
81
// firmware
82
82
// internal CIRCUITPY flash filesystem (optional)
83
83
// BLE config (bonding info, etc.) (optional)
84
- // microntroller .nvm (optional)
84
+ // microcontroller .nvm (optional)
85
85
// bootloader (note the MBR at 0x0 redirects to the bootloader here, in high flash)
86
86
// bootloader settings
87
87
88
- // Bootloader values from https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/master/src/linker/s140_v6.ld
89
-
90
88
// Define these regions starting up from the bottom of flash:
91
89
92
90
#define MBR_START_ADDR (0x0)
101
99
102
100
// Define these regions starting down from the bootloader:
103
101
102
+ // Bootloader values from https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/master/src/linker/s140_v6.ld
104
103
#define BOOTLOADER_START_ADDR (0x000F4000)
105
104
#define BOOTLOADER_SIZE (0xA000) // 40kiB
106
105
#define BOOTLOADER_SETTINGS_START_ADDR (0x000FF000)
Original file line number Diff line number Diff line change 33
33
#define FLASH_PAGE_SIZE (0x4000)
34
34
35
35
#define DEFAULT_I2C_BUS_SCL (&pin_PB10)
36
- #define DEFAULT_I2C_BUS_SDA (&pin_PB09)
36
+ #define DEFAULT_I2C_BUS_SDA (&pin_PB09)
You can’t perform that action at this time.
0 commit comments