Skip to content

Commit 8d0d425

Browse files
committed
Set NANO130 CLK as 48 MHz for USBD support
1 parent 3298816 commit 8d0d425

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

targets/TARGET_NUVOTON/TARGET_NANO100/mbed_overrides.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void mbed_sdk_init(void)
6464
* T2. <1 ms with HIRC-clocked PLL as HCLK clock source
6565
* T1 will fail Greentea test which requires max 10 ms wake-up time.
6666
*
67-
* If we just call CLK_SetCoreClock(FREQ_42MHZ) to configure HCLK to 42 MHz,
67+
* If we just call CLK_SetCoreClock(FREQ_48MHZ) to configure HCLK to 48 MHz,
6868
* it will go T1 with HXT already enabled in front. So we manually configure
6969
* it to choose HXT/HIRC-clocked PLL.
7070
*/
@@ -76,10 +76,10 @@ void mbed_sdk_init(void)
7676
#endif
7777

7878
#if (NU_CLOCK_PLL == NU_HXT_PLL)
79-
CLK_EnablePLL(CLK_PLLCTL_PLL_SRC_HXT, FREQ_42MHZ*2);
79+
CLK_EnablePLL(CLK_PLLCTL_PLL_SRC_HXT, FREQ_48MHZ*2);
8080
CLK_SetHCLK(CLK_CLKSEL0_HCLK_S_PLL, CLK_HCLK_CLK_DIVIDER(2));
8181
#elif (NU_CLOCK_PLL == NU_HIRC_PLL)
82-
CLK_EnablePLL(CLK_PLLCTL_PLL_SRC_HIRC, FREQ_42MHZ*2);
82+
CLK_EnablePLL(CLK_PLLCTL_PLL_SRC_HIRC, FREQ_48MHZ*2);
8383
CLK_SetHCLK(CLK_CLKSEL0_HCLK_S_PLL, CLK_HCLK_CLK_DIVIDER(2));
8484
#endif
8585

0 commit comments

Comments
 (0)