git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4833 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2012-11-19 13:45:34 +00:00
parent d090b9342e
commit 4fa5db982c
1 changed files with 6 additions and 2 deletions

View File

@ -116,6 +116,10 @@ void spc_clock_init(void) {
while (!ME.GS.B.S_FIRC)
;
/* Oscillators dividers setup.*/
CGM.FIRC_CTL.B.RCDIV = SPC5_IRCDIV_VALUE - 1;
CGM.FXOSC_CTL.B.OSCDIV = SPC5_XOSCDIV_VALUE - 1;
#if !SPC5_NO_INIT
#if defined(SPC5_OSC_BYPASS)
@ -126,8 +130,8 @@ void spc_clock_init(void) {
/* Initialization of the FMPLLs settings.*/
CGM.FMPLL_CR.R = SPC5_FMPLL0_ODF |
((SPC5_FMPLL0_IDF_VALUE - 1) << 26) |
(SPC5_FMPLL0_NDIV_VALUE << 16);
((SPC5_FMPLL0_IDF_VALUE - 1) << 26) |
(SPC5_FMPLL0_NDIV_VALUE << 16);
CGM.FMPLL_MR.R = 0; /* TODO: Add a setting. */
/* Run modes initialization.*/