Skip to content

Commit ae64a66

Browse files
committed
address review comments
1 parent 1e11f27 commit ae64a66

File tree

5 files changed

+17
-26
lines changed

5 files changed

+17
-26
lines changed

ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -213,17 +213,17 @@ void frequencyin_samd51_start_dpll() {
213213
// Will also enable the Lock Bypass due to low-frequency sources causing DPLL unlocks
214214
// as outlined in the Errata (1.12.1)
215215
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
227227
OSCCTRL->Dpll[1].DPLLCTRLA.reg = OSCCTRL_DPLLCTRLA_ENABLE;
228228

229229
while (!(OSCCTRL->Dpll[1].DPLLSTATUS.bit.LOCK || OSCCTRL->Dpll[1].DPLLSTATUS.bit.CLKRDY)) {}

ports/nrf/README.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,13 @@ This is a port of CircuitPython to the Nordic Semiconductor nRF52 series of chip
55
> **NOTE**: There are board-specific READMEs that may be more up to date than the
66
generic board-neutral documentation below.
77

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
169

1710
Some boards have UF2 bootloaders and can simply be flashed in the normal way, by copying
1811
firmware.uf2 to the BOOT drive.
1912

20-
To build and flash issue the following command inside the ports/nrf/ folder:
13+
For some boards, you can use the `flash` target:
2114

22-
make BOARD=pca10056
2315
make BOARD=pca10056 flash
2416

2517
## Segger Targets

ports/nrf/common-hal/_bleio/Adapter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ const nvm_bytearray_obj_t common_hal_bleio_nvm_obj = {
5959
.base = {
6060
.type = &nvm_bytearray_type,
6161
},
62-
.len = CIRCUITPY_BLE_CONFIG_SIZE,
6362
.start_address = (uint8_t*) CIRCUITPY_BLE_CONFIG_START_ADDR,
63+
.len = CIRCUITPY_BLE_CONFIG_SIZE,
6464
};
6565

6666
STATIC void softdevice_assert_handler(uint32_t id, uint32_t pc, uint32_t info) {

ports/nrf/mpconfigport.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,10 @@
8181
// firmware
8282
// internal CIRCUITPY flash filesystem (optional)
8383
// BLE config (bonding info, etc.) (optional)
84-
// microntroller.nvm (optional)
84+
// microcontroller.nvm (optional)
8585
// bootloader (note the MBR at 0x0 redirects to the bootloader here, in high flash)
8686
// bootloader settings
8787

88-
// Bootloader values from https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/master/src/linker/s140_v6.ld
89-
9088
// Define these regions starting up from the bottom of flash:
9189

9290
#define MBR_START_ADDR (0x0)
@@ -101,6 +99,7 @@
10199

102100
// Define these regions starting down from the bootloader:
103101

102+
// Bootloader values from https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/master/src/linker/s140_v6.ld
104103
#define BOOTLOADER_START_ADDR (0x000F4000)
105104
#define BOOTLOADER_SIZE (0xA000) // 40kiB
106105
#define BOOTLOADER_SETTINGS_START_ADDR (0x000FF000)

ports/stm32f4/boards/stm32f412zg_discovery/mpconfigboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
#define FLASH_PAGE_SIZE (0x4000)
3434

3535
#define DEFAULT_I2C_BUS_SCL (&pin_PB10)
36-
#define DEFAULT_I2C_BUS_SDA (&pin_PB09)
36+
#define DEFAULT_I2C_BUS_SDA (&pin_PB09)

0 commit comments

Comments
 (0)