Skip to content

Commit bb6407b

Browse files
authored
Merge pull request #22295 from basilfx/feature/efm32_fix_hfxo_clock
boards/xg23-pk6068a: remove HFXO_FREQ and LFXO_FREQ
2 parents eb641dc + dc9133c commit bb6407b

4 files changed

Lines changed: 18 additions & 6 deletions

File tree

boards/xg23-pk6068a/doc.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,23 @@ PIN 1 is the bottom-left contact when the header faces you horizontally.
9898
| LCD driver | LS013B7DH03 | yes | Sharp Low Power Memory LCD via the U8g2 package |
9999
| Temperature + humidity sensor | Si7021 | yes | Silicon Labs Temperature + Humidity sensor |
100100

101+
## Board configuration
102+
103+
### Clock selection
104+
There are several clock sources that are available for the different
105+
peripherals. You are advised to read [AN0004.0](https://www.silabs.com/documents/public/application-notes/an0004.0-efm32-cmu.pdf)
106+
to get familiar with the different clocks.
107+
108+
| Source | Internal | Speed | Comments |
109+
|--------|----------|------------|------------------------------------|
110+
| HFXO | No | 39 MHz | |
111+
| LFXO | No | 32.768 kHz | |
112+
113+
It is important that the clock speeds are known to the code, for proper
114+
calculations of speeds and baud rates. If the HFXO or LFXO are different from
115+
the speeds above, ensure to pass `HFXO_FREQ=freq_in_hz` and
116+
`LFXO_FREQ=freq_in_hz` to your compiler defines.
117+
101118
## Flashing the device
102119

103120
To flash, [SEGGER JLink](https://www.segger.com/jlink-software.html) is

boards/xg23-pk6068a/include/board.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extern "C" {
3636
* @{
3737
*/
3838
#define CONFIG_ZTIMER_LPTIMER_DEV TIMER_DEV(1)
39-
#define CONFIG_ZTIMER_LPTIMER_FREQ LFXO_FREQ
39+
#define CONFIG_ZTIMER_LPTIMER_FREQ (32768UL)
4040
#define CONFIG_ZTIMER_LPTIMER_WIDTH 24
4141
#define CONFIG_ZTIMER_LPTIMER_BLOCK_PM_MODE EFM32_PM_MODE_EM3
4242
/** @} */

boards/xg23-pk6068a/include/periph_conf.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ extern "C" {
2828
* @name Clock configuration
2929
* @{
3030
*/
31-
#define HFXO_FREQ (39000000UL)
3231
#define CMU_HFXOINIT CMU_HFXOINIT_DEFAULT
33-
34-
#define LFXO_FREQ (32768UL)
3532
#define CMU_LFXOINIT CMU_LFXOINIT_DEFAULT
3633

3734
static const clk_mux_t clk_mux_config[] = {

dist/tools/doccheck/exclude_simple

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2597,7 +2597,6 @@ warning: Member HDC1000_TRES_MSK (macro definition) of file hdc1000_regs.h is no
25972597
warning: Member HDC1010_PARAM_ADDR (macro definition) of file board.h is not documented.
25982598
warning: Member HDC1010_PARAM_I2C (macro definition) of file board.h is not documented.
25992599
warning: Member HDC1010_PIN_DRDY (macro definition) of file board.h is not documented.
2600-
warning: Member HFXO_FREQ (macro definition) of file periph_conf.h is not documented.
26012600
warning: Member HMC5883L_PARAM_DEV (macro definition) of file hmc5883l_params.h is not documented.
26022601
warning: Member HMC5883L_PARAM_DOR (macro definition) of file hmc5883l_params.h is not documented.
26032602
warning: Member HMC5883L_PARAM_GAIN (macro definition) of file hmc5883l_params.h is not documented.
@@ -3084,7 +3083,6 @@ warning: Member LED_RED_OFF (macro definition) of file board.h is not documented
30843083
warning: Member LED_RED_ON (macro definition) of file board.h is not documented.
30853084
warning: Member LED_RED_PIN (macro definition) of file board.h is not documented.
30863085
warning: Member LED_RED_TOGGLE (macro definition) of file board.h is not documented.
3087-
warning: Member LFXO_FREQ (macro definition) of file periph_conf.h is not documented.
30883086
warning: Member LINEFILL (macro definition) of file ColorTextColors.h is not documented.
30893087
warning: Member LIS2DH12_CLICK_THS_LIR (macro definition) of file lis2dh12_registers.h is not documented.
30903088
warning: Member LIS2DH12_CTRL_REG2_FDS (macro definition) of file lis2dh12_registers.h is not documented.

0 commit comments

Comments
 (0)