Skip to content

Commit ecf8f0d

Browse files
authored
Set the systick value based upon the configured clock rate (#172)
1 parent 6b987eb commit ecf8f0d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

board-support/si91x/support/hal/rsi_hal_mcu_m4.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
#include "rsi_rom_clks.h"
2121
#include "silabs_utils.h"
2222
#include "sl_component_catalog.h"
23+
#ifndef SL_ICD_ENABLED
24+
#include "FreeRTOSConfig.h"
25+
#endif // !defined (SL_ICD_ENABLED)
2326

2427
#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT
2528
#include "sl_si91x_button_pin_config.h"
@@ -51,6 +54,7 @@
5154
void sl_button_on_change(uint8_t btn, uint8_t btnAction);
5255
#endif //SL_CATALOG_SIMPLE_BUTTON_PRESENT
5356

57+
#ifndef SL_ICD_ENABLED
5458
int soc_pll_config(void) {
5559
int32_t status = RSI_OK;
5660

@@ -63,7 +67,7 @@ int soc_pll_config(void) {
6367
// Switch M4 clock to PLL clock for speed operations
6468
RSI_CLK_M4SocClkConfig(M4CLK, M4_SOCPLLCLK, 0);
6569

66-
SysTick_Config(SystemCoreClock / 1000);
70+
SysTick_Config(SystemCoreClock / configTICK_RATE_HZ);
6771
DEBUGINIT();
6872

6973
#ifdef SWITCH_QSPI_TO_SOC_PLL
@@ -80,6 +84,7 @@ int soc_pll_config(void) {
8084
#endif /* SWITCH_QSPI_TO_SOC_PLL */
8185
return 0;
8286
}
87+
#endif // !defined (SL_ICD_ENABLED)
8388

8489
#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT
8590
void sl_si91x_button_isr(uint8_t pin, int8_t state) {

0 commit comments

Comments
 (0)