diff --git a/boards/pic32cz_curiosity_ultra/wolfHAL_board.h b/boards/pic32cz_curiosity_ultra/wolfHAL_board.h index 8b9e282..c6ab32e 100644 --- a/boards/pic32cz_curiosity_ultra/wolfHAL_board.h +++ b/boards/pic32cz_curiosity_ultra/wolfHAL_board.h @@ -86,7 +86,7 @@ extern volatile uint32_t g_tick; .base = WHAL_CORTEX_M7_SYSTICK_BASE, \ /* .driver: direct API mapping */ \ .cfg = (void *)&(const whal_SysTick_Cfg){ \ - .cyclesPerTick = 300000000 / 1000, \ + .cyclesPerTick = (300000000 / 1000) - 1, /* SysTick reloads every LOAD+1 cycles */ \ .clkSrc = WHAL_SYSTICK_CLKSRC_SYSCLK, \ .tickInt = WHAL_SYSTICK_TICKINT_ENABLED, \ }, \ diff --git a/boards/stm32c031_nucleo/wolfHAL_board.h b/boards/stm32c031_nucleo/wolfHAL_board.h index 919067b..0413056 100644 --- a/boards/stm32c031_nucleo/wolfHAL_board.h +++ b/boards/stm32c031_nucleo/wolfHAL_board.h @@ -112,7 +112,7 @@ enum { .base = WHAL_CORTEX_M0PLUS_SYSTICK_BASE, \ /* .driver: direct API mapping */ \ .cfg = (void *)&(const whal_SysTick_Cfg){ \ - .cyclesPerTick = 48000000 / 1000, \ + .cyclesPerTick = (48000000 / 1000) - 1, /* SysTick reloads every LOAD+1 cycles */ \ .clkSrc = WHAL_SYSTICK_CLKSRC_SYSCLK, \ .tickInt = WHAL_SYSTICK_TICKINT_ENABLED, \ }, \ diff --git a/boards/stm32f091rc_nucleo/wolfHAL_board.h b/boards/stm32f091rc_nucleo/wolfHAL_board.h index bedc7c8..262acde 100644 --- a/boards/stm32f091rc_nucleo/wolfHAL_board.h +++ b/boards/stm32f091rc_nucleo/wolfHAL_board.h @@ -156,7 +156,7 @@ enum { .base = WHAL_CORTEX_M0_SYSTICK_BASE, \ /* .driver: direct API mapping */ \ .cfg = (void *)&(const whal_SysTick_Cfg){ \ - .cyclesPerTick = 48000000 / 1000, \ + .cyclesPerTick = (48000000 / 1000) - 1, /* SysTick reloads every LOAD+1 cycles */ \ .clkSrc = WHAL_SYSTICK_CLKSRC_SYSCLK, \ .tickInt = WHAL_SYSTICK_TICKINT_ENABLED, \ }, \ diff --git a/boards/stm32f302r8_nucleo/wolfHAL_board.h b/boards/stm32f302r8_nucleo/wolfHAL_board.h index 3b37980..eaae367 100644 --- a/boards/stm32f302r8_nucleo/wolfHAL_board.h +++ b/boards/stm32f302r8_nucleo/wolfHAL_board.h @@ -158,7 +158,7 @@ enum { .base = WHAL_CORTEX_M4_SYSTICK_BASE, \ /* .driver: direct API mapping */ \ .cfg = (void *)&(const whal_SysTick_Cfg){ \ - .cyclesPerTick = 48000000 / 1000, \ + .cyclesPerTick = (48000000 / 1000) - 1, /* SysTick reloads every LOAD+1 cycles */ \ .clkSrc = WHAL_SYSTICK_CLKSRC_SYSCLK, \ .tickInt = WHAL_SYSTICK_TICKINT_ENABLED, \ }, \ diff --git a/boards/stm32f411_blackpill/wolfHAL_board.h b/boards/stm32f411_blackpill/wolfHAL_board.h index 2e97906..6fd9d1b 100644 --- a/boards/stm32f411_blackpill/wolfHAL_board.h +++ b/boards/stm32f411_blackpill/wolfHAL_board.h @@ -119,7 +119,7 @@ extern const whal_Stm32f4_Flash_Sector g_flashSectors[FLASH_SECTOR_COUNT]; .base = WHAL_CORTEX_M4_SYSTICK_BASE, \ /* .driver: direct API mapping */ \ .cfg = (void *)&(const whal_SysTick_Cfg){ \ - .cyclesPerTick = 100000000 / 1000, \ + .cyclesPerTick = (100000000 / 1000) - 1, /* SysTick reloads every LOAD+1 cycles */ \ .clkSrc = WHAL_SYSTICK_CLKSRC_SYSCLK, \ .tickInt = WHAL_SYSTICK_TICKINT_ENABLED, \ }, \ diff --git a/boards/stm32h563zi_nucleo/wolfHAL_board.h b/boards/stm32h563zi_nucleo/wolfHAL_board.h index 4692fc3..02e7e26 100644 --- a/boards/stm32h563zi_nucleo/wolfHAL_board.h +++ b/boards/stm32h563zi_nucleo/wolfHAL_board.h @@ -215,7 +215,7 @@ extern uint8_t ethRxBufs[BOARD_ETH_RX_DESC_COUNT * BOARD_ETH_RX_BUF_SIZE]; .base = WHAL_CORTEX_M33_SYSTICK_BASE, \ /* .driver: direct API mapping */ \ .cfg = (void *)&(const whal_SysTick_Cfg){ \ - .cyclesPerTick = 168000000 / 1000, \ + .cyclesPerTick = (168000000 / 1000) - 1, /* SysTick reloads every LOAD+1 cycles */ \ .clkSrc = WHAL_SYSTICK_CLKSRC_SYSCLK, \ .tickInt = WHAL_SYSTICK_TICKINT_ENABLED, \ }, \ diff --git a/boards/stm32l152re_nucleo/wolfHAL_board.h b/boards/stm32l152re_nucleo/wolfHAL_board.h index 63ff0b6..4799c59 100644 --- a/boards/stm32l152re_nucleo/wolfHAL_board.h +++ b/boards/stm32l152re_nucleo/wolfHAL_board.h @@ -158,7 +158,7 @@ enum { .base = WHAL_CORTEX_M3_SYSTICK_BASE, \ /* .driver: direct API mapping */ \ .cfg = (void *)&(const whal_SysTick_Cfg){ \ - .cyclesPerTick = 32000000 / 1000, \ + .cyclesPerTick = (32000000 / 1000) - 1, /* SysTick reloads every LOAD+1 cycles */ \ .clkSrc = WHAL_SYSTICK_CLKSRC_SYSCLK, \ .tickInt = WHAL_SYSTICK_TICKINT_ENABLED, \ }, \ diff --git a/boards/stm32n657a0_nucleo/wolfHAL_board.h b/boards/stm32n657a0_nucleo/wolfHAL_board.h index af08d8d..3de6204 100644 --- a/boards/stm32n657a0_nucleo/wolfHAL_board.h +++ b/boards/stm32n657a0_nucleo/wolfHAL_board.h @@ -340,7 +340,7 @@ extern uint8_t ethRxBufs[BOARD_ETH_RX_DESC_COUNT * BOARD_ETH_RX_BUF_SIZE]; .base = WHAL_CORTEX_M55_SYSTICK_BASE, \ /* .driver: direct API mapping */ \ .cfg = (void *)&(const whal_SysTick_Cfg){ \ - .cyclesPerTick = 64000000 / 1000, \ + .cyclesPerTick = (64000000 / 1000) - 1, /* SysTick reloads every LOAD+1 cycles */ \ .clkSrc = WHAL_SYSTICK_CLKSRC_SYSCLK, \ .tickInt = WHAL_SYSTICK_TICKINT_ENABLED, \ }, \ diff --git a/boards/stm32wb55xx_nucleo/wolfHAL_board.h b/boards/stm32wb55xx_nucleo/wolfHAL_board.h index 91444c8..c832db7 100644 --- a/boards/stm32wb55xx_nucleo/wolfHAL_board.h +++ b/boards/stm32wb55xx_nucleo/wolfHAL_board.h @@ -236,7 +236,7 @@ enum { .base = WHAL_CORTEX_M4_SYSTICK_BASE, \ /* .driver: direct API mapping */ \ .cfg = (void *)&(const whal_SysTick_Cfg){ \ - .cyclesPerTick = 64000000 / 1000, \ + .cyclesPerTick = (64000000 / 1000) - 1, /* SysTick reloads every LOAD+1 cycles */ \ .clkSrc = WHAL_SYSTICK_CLKSRC_SYSCLK, \ .tickInt = WHAL_SYSTICK_TICKINT_ENABLED, \ }, \ diff --git a/boards/stm32wba55cg_nucleo/wolfHAL_board.h b/boards/stm32wba55cg_nucleo/wolfHAL_board.h index 20ddd68..6daad59 100644 --- a/boards/stm32wba55cg_nucleo/wolfHAL_board.h +++ b/boards/stm32wba55cg_nucleo/wolfHAL_board.h @@ -255,7 +255,7 @@ enum { .base = WHAL_CORTEX_M33_SYSTICK_BASE, \ /* .driver: direct API mapping */ \ .cfg = (void *)&(const whal_SysTick_Cfg){ \ - .cyclesPerTick = 100000000 / 1000, \ + .cyclesPerTick = (100000000 / 1000) - 1, /* SysTick reloads every LOAD+1 cycles */ \ .clkSrc = WHAL_SYSTICK_CLKSRC_SYSCLK, \ .tickInt = WHAL_SYSTICK_TICKINT_ENABLED, \ }, \