Skip to content

Commit 3a303ba

Browse files
committed
[chore][rtos][rtthread] Use HAL_RCC_HCPU_SetTickDiv
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
1 parent b3334f5 commit 3a303ba

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

rtos/rtthread/bsp/sifli/drivers/drv_common.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ __ROM_USED void rt_hw_systick_init(void)
131131
HAL_RCC_HCPU_ClockSelect(RCC_CLK_MOD_HP_TICK, RCC_CLK_TICK_HRC48);
132132
/* workaround: add delay to avoid systick config failure in some chips due to known reason */
133133
HAL_Delay_us(200);
134-
MODIFY_REG(hwp_hpsys_rcc->CFGR, HPSYS_RCC_CFGR_TICKDIV_Msk,
135-
MAKE_REG_VAL(60, HPSYS_RCC_CFGR_TICKDIV_Msk, HPSYS_RCC_CFGR_TICKDIV_Pos));
134+
HAL_RCC_HCPU_SetTickDiv(60);
136135
HAL_SYSTICK_Config(800000 / RT_TICK_PER_SECOND);
137136
HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK_DIV8);
138137

0 commit comments

Comments
 (0)