Skip to content

Commit a04ef77

Browse files
committed
asf4-config: Slow down core SDHC clock to 8Mhz
The previous used clock (48Mhz) introduces a lot of noise on the ADC.
1 parent 5a9ca82 commit a04ef77

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

external/asf4-drivers/Config/peripheral_clk_config.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@
340340

341341
// <i> Select the slow clock source.
342342
#ifndef CONF_GCLK_SERCOM5_SLOW_SRC
343-
#define CONF_GCLK_SERCOM5_SLOW_SRC GCLK_PCHCTRL_GEN_GCLK2_Val
343+
#define CONF_GCLK_SERCOM5_SLOW_SRC GCLK_PCHCTRL_GEN_GCLK4_Val
344344
#endif
345345

346346
/**
@@ -356,7 +356,7 @@
356356
* \brief SERCOM5's Slow Clock frequency
357357
*/
358358
#ifndef CONF_GCLK_SERCOM5_SLOW_FREQUENCY
359-
#define CONF_GCLK_SERCOM5_SLOW_FREQUENCY 12000000
359+
#define CONF_GCLK_SERCOM5_SLOW_FREQUENCY 32768
360360
#endif
361361

362362
// <h> SDHC Clock Settings
@@ -389,7 +389,7 @@
389389
// <i> Select the clock source for SDHC.
390390
// <id> sdhc_gclk_selection
391391
#ifndef CONF_GCLK_SDHC0_SRC
392-
#define CONF_GCLK_SDHC0_SRC GCLK_PCHCTRL_GEN_GCLK3_Val
392+
#define CONF_GCLK_SDHC0_SRC GCLK_PCHCTRL_GEN_GCLK5_Val
393393
#endif
394394

395395
// <y> SDHC clock slow source
@@ -430,7 +430,7 @@
430430
* \brief SDHC's Clock frequency
431431
*/
432432
#ifndef CONF_SDHC0_FREQUENCY
433-
#define CONF_SDHC0_FREQUENCY 48000000
433+
#define CONF_SDHC0_FREQUENCY 8000000
434434
#endif
435435

436436
/**

0 commit comments

Comments
 (0)