Skip to content

Commit 98dd419

Browse files
committed
[MAX32620HSP] Reduced system clock speed due to SPI issue.
1 parent d535180 commit 98dd419

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

targets/TARGET_Maxim/TARGET_MAX32620/device/system_max32620.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static uint8_t running;
5353
// NOTE: Setting the CMSIS SystemCoreClock value to the actual value it will
5454
// be AFTER SystemInit() runs. This is required so the hal drivers will have
5555
// the correct value when the DATA sections are initialized.
56-
uint32_t SystemCoreClock = RO_FREQ;
56+
uint32_t SystemCoreClock = RO_FREQ / 2;
5757

5858
void SystemCoreClockUpdate(void)
5959
{
@@ -147,10 +147,9 @@ void SystemInit(void)
147147

148148
low_level_init();
149149

150-
// Select 96MHz ring oscillator as clock source
150+
// Select 48MHz ring oscillator as clock source
151151
uint32_t reg = MXC_CLKMAN->clk_ctrl;
152152
reg &= ~MXC_F_CLKMAN_CLK_CTRL_SYSTEM_SOURCE_SELECT;
153-
reg |= 1 << MXC_F_CLKMAN_CLK_CTRL_SYSTEM_SOURCE_SELECT_POS;
154153
MXC_CLKMAN->clk_ctrl = reg;
155154

156155
// Copy trim information from shadow registers into power manager registers

targets/TARGET_Maxim/mbed_rtx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
#define OS_MAINSTKSIZE 256
6060
#endif
6161
#ifndef OS_CLOCK
62-
#define OS_CLOCK 96000000
62+
#define OS_CLOCK 48000000
6363
#endif
6464

6565
#endif

0 commit comments

Comments
 (0)