Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

cpu/nrf5x_common: rework LFCLK source selection #19803

Merged
merged 2 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion boards/common/e104-bt50xxa-tb/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ extern "C" {
* @{
*/
#define CLOCK_HFCLK (1) /* external crystal */
#define CLOCK_LFCLK (0) /* internal RC oscillator */

/* LFCLK Source clock selection:*/
/* - CLOCK_LFCLKSRC_SRC_RC: internal RC oscillator
* - CLOCK_LFCLKSRC_SRC_Xtal: 32.768 kHz crystal
* - CLOCK_LFCLKSRC_SRC_Synth: derived from HFCLK */
#define CLOCK_LFCLK (CLOCK_LFCLKSRC_SRC_RC) /**< LFCLK Source */
/** @} */

/**
Expand Down
8 changes: 5 additions & 3 deletions boards/common/nrf51/include/cfg_clock_16_0.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@
#define CLOCK_HFCLK (16U) /* set to 0: internal RC oscillator
16: 16MHz crystal
32: 32MHz crystal */
#define CLOCK_LFCLK (0) /* set to 0: internal RC oscillator
* 1: 32.768 kHz crystal
* 2: derived from HFCLK */
/* LFCLK Source clock selection:*/
/* - CLOCK_LFCLKSRC_SRC_RC: internal RC oscillator
* - CLOCK_LFCLKSRC_SRC_Xtal: 32.768 kHz crystal
* - CLOCK_LFCLKSRC_SRC_Synth: derived from HFCLK */
#define CLOCK_LFCLK (CLOCK_LFCLKSRC_SRC_RC) /**< LFCLK Source */
/** @} */

#ifdef __cplusplus
Expand Down
8 changes: 5 additions & 3 deletions boards/common/nrf51/include/cfg_clock_16_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@
#define CLOCK_HFCLK (16U) /* set to 0: internal RC oscillator
16: 16MHz crystal
32: 32MHz crystal */
#define CLOCK_LFCLK (1) /* set to 0: internal RC oscillator
* 1: 32.768 kHz crystal
* 2: derived from HFCLK */
/* LFCLK Source clock selection:*/
/* - CLOCK_LFCLKSRC_SRC_RC: internal RC oscillator
* - CLOCK_LFCLKSRC_SRC_Xtal: 32.768 kHz crystal
* - CLOCK_LFCLKSRC_SRC_Synth: derived from HFCLK */
#define CLOCK_LFCLK (CLOCK_LFCLKSRC_SRC_Xtal) /**< LFCLK Source */
/** @} */

#ifdef __cplusplus
Expand Down
8 changes: 5 additions & 3 deletions boards/common/nrf52/include/cfg_clock_32_0.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ extern "C" {
*/
#define CLOCK_HFCLK (32U) /* set to 0: internal RC oscillator
* 32: 32MHz crystal */
#define CLOCK_LFCLK (0) /* set to 0: internal RC oscillator
* 1: 32.768 kHz crystal
* 2: derived from HFCLK */
/* LFCLK Source clock selection:*/
/* - CLOCK_LFCLKSRC_SRC_RC: internal RC oscillator
* - CLOCK_LFCLKSRC_SRC_Xtal: 32.768 kHz crystal
* - CLOCK_LFCLKSRC_SRC_Synth: derived from HFCLK */
#define CLOCK_LFCLK (CLOCK_LFCLKSRC_SRC_RC) /**< LFCLK Source */
/** @} */

#ifdef __cplusplus
Expand Down
8 changes: 5 additions & 3 deletions boards/common/nrf52/include/cfg_clock_32_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ extern "C" {
*/
#define CLOCK_HFCLK (32U) /* set to 0: internal RC oscillator
* 32: 32MHz crystal */
#define CLOCK_LFCLK (1) /* set to 0: internal RC oscillator
* 1: 32.768 kHz crystal
* 2: derived from HFCLK */
/* LFCLK Source clock selection:*/
/* - CLOCK_LFCLKSRC_SRC_RC: internal RC oscillator
* - CLOCK_LFCLKSRC_SRC_Xtal: 32.768 kHz crystal
* - CLOCK_LFCLKSRC_SRC_Synth: derived from HFCLK */
#define CLOCK_LFCLK (CLOCK_LFCLKSRC_SRC_Xtal) /**< LFCLK Source */
/** @} */

#ifdef __cplusplus
Expand Down
9 changes: 7 additions & 2 deletions boards/nrf5340dk-app/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern "C" {
#define CLOCK_CORECLOCK MHZ(128)

/**
* @name HF Clock configuration
* @name Clock configuration
*
*
* @{
Expand All @@ -40,7 +40,12 @@ extern "C" {
/* CLOCK_HFCLKSRC_SRC_HFXO to use external 32MHz crystal
* CLOCK_HFCLKSRC_SRC_HFINT to use internal crystal */
#define CLOCK_HFCLK (CLOCK_HFCLKSRC_SRC_HFXO) /**< HFCLK Source selection */
#define CLOCK_LFCLK (3) /**< LFCLK Source selection */

/* LFCLK Source clock selection:*/
/* - CLOCK_LFCLKSRC_SRC_LFRC: 32.768 kHz RC oscillator
* - CLOCK_LFCLKSRC_SRC_LFXO: 32.768 kHz crystal oscillator
* - CLOCK_LFCLKSRC_SRC_LFSYNT: 32.768 kHz synthesized from HFCLK*/
#define CLOCK_LFCLK (CLOCK_LFCLKSRC_SRC_LFXO) /**< LFCLK Source */
/** @} */

/**
Expand Down
6 changes: 4 additions & 2 deletions boards/nrf9160dk/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ extern "C" {
*/
#define CLOCK_HFCLK (32U) /**< set to 0: internal RC oscillator
* 32: 32MHz crystal */
#define CLOCK_LFCLK (3) /**< set to 0: internal RC oscillator
* 3: High Accuracy oscillator */
/* LFCLK Source clock selection:*/
/* - CLOCK_LFCLKSRC_SRC_LFRC: 32.768 kHz RC oscillator
* - CLOCK_LFCLKSRC_SRC_LFXO: 32.768 kHz crystal oscillator */
#define CLOCK_LFCLK (CLOCK_LFCLKSRC_SRC_LFXO) /**< LFCLK Source */
/** @} */

/**
Expand Down