Skip to content

Commit

Permalink
lpc4322_hic: make use of OS_CLOCK defined in yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Negreanu committed Jan 6, 2022
1 parent 10103f1 commit da0afc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions source/hic_hal/nxp/lpc4322/board_LPC43xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

void sdk_init(void)
{
/* Set core clock to 120MHz */
CGU_Init(120000000);
/* Set core clock */
CGU_Init(OS_CLOCK);
/* Set up USB0 clock */
/* Disable PLL first */
CGU_EnableEntity(CGU_CLKSRC_PLL0, DISABLE);
Expand Down
2 changes: 1 addition & 1 deletion source/hic_hal/nxp/lpc4322/lpc43xx_cgu.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ uint32_t CGU_Init(uint32_t wantedFreq)
// Setup PLL1 to 204MHz
// 0. Select IRC as BASE_M4_CLK source
CGU_EntityConnect(CGU_CLKSRC_IRC, CGU_BASE_M4);
SystemCoreClock = 120000000;
SystemCoreClock = OS_CLOCK;
// 1. Enable the crystal oscillator
CGU_SetXTALOSC(12000000);
CGU_EnableEntity(CGU_CLKSRC_XTAL_OSC, ENABLE);
Expand Down

0 comments on commit da0afc7

Please sign in to comment.