Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions hw/bsp/at32f402_405/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,17 @@ void board_init(void)
/* vbus ignore */
board_vbus_sense_init();

/* configure systick */
SysTick_Config(system_core_clock / 1000);

#if CFG_TUSB_OS == OPT_OS_FREERTOS
#if CFG_TUSB_OS == OPT_OS_NONE
/* configure systick */
SysTick_Config(system_core_clock / 1000);
NVIC_SetPriority(OTGHS_IRQn, 0);
NVIC_SetPriority(OTGFS1_IRQn, 0);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(OTGHS_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
NVIC_SetPriority(OTGFS1_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
#else
NVIC_SetPriority(OTGHS_IRQn, 0);
NVIC_SetPriority(OTGFS1_IRQn, 0);
#endif

/* config led and key */
Expand Down
4 changes: 3 additions & 1 deletion hw/bsp/at32f435_437/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@ void board_init(void) {
/* vbus ignore */
board_vbus_sense_init();

SysTick_Config(SystemCoreClock / 1000);
#if CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(OTGFS1_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
NVIC_SetPriority(OTGFS2_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
#else
SysTick_Config(SystemCoreClock / 1000);
NVIC_SetPriority(OTGFS1_IRQn, 0);
NVIC_SetPriority(OTGFS2_IRQn, 0);
#endif
Expand Down
3 changes: 2 additions & 1 deletion hw/bsp/imxrt/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ void board_init(void) {
#if CFG_TUSB_OS == OPT_OS_NONE
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);

#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB_OTG1_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
#ifdef USBPHY2
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/kinetis_k/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
#endif
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/kinetis_kl/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ void board_init(void)
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
#endif
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/lpc11/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
#endif
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/lpc13/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
#endif
Expand Down
6 changes: 4 additions & 2 deletions hw/bsp/lpc15/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ void board_init(void)
{
SystemCoreClockUpdate();

#if CFG_TUSB_OS == OPT_OS_NONE
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);

#if CFG_TUSB_OS == OPT_OS_FREERTOS
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
#endif
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/lpc17/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
#endif
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/lpc18/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
NVIC_SetPriority(USB1_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/lpc40/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
#endif
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/lpc43/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ void board_init(void)
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
#endif
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/lpc51/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
#endif
Expand Down
6 changes: 4 additions & 2 deletions hw/bsp/lpc54/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ void board_init(void) {
// Init 96 MHz clock
BootClockFROHF96M();

#if CFG_TUSB_OS == OPT_OS_NONE
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);

#if CFG_TUSB_OS == OPT_OS_FREERTOS
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
#endif
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/lpc55/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void board_init(void) {
SysTick_Config(SystemCoreClock / 1000);

#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR runs before scheduler start
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;

// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/maxim/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
#endif
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/mcx/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
#if CFG_TUSB_MCU == OPT_MCU_MCXN9
NVIC_SetPriority(USB0_FS_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
Expand Down
5 changes: 5 additions & 0 deletions hw/bsp/mm32/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,13 @@ void board_init(void) {
// usb clock
USB_DeviceClockInit();

#if CFG_TUSB_OS == OPT_OS_NONE
SysTick_Config(SystemCoreClock / 1000);
NVIC_SetPriority(SysTick_IRQn, 0x0);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
#endif

RCC_AHBPeriphClockCmd(RCC_AHBENR_GPIOA, ENABLE);

Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/msp432e4/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ void board_init(void)
#if CFG_TUSB_OS == OPT_OS_NONE
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
#endif
Expand Down
3 changes: 3 additions & 0 deletions hw/bsp/nuc100_120/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ void board_init(void)
#if CFG_TUSB_OS == OPT_OS_NONE
// 1ms tick timer
SysTick_Config(48000000 / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
#endif

GPIO_SetMode(LED_PORT, 1UL << LED_PIN, GPIO_PMD_OUTPUT);
Expand Down
3 changes: 3 additions & 0 deletions hw/bsp/ra/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ void board_init(void) {

#if CFG_TUSB_OS == OPT_OS_NONE
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
#endif

board_led_write(false);
Expand Down
5 changes: 5 additions & 0 deletions hw/bsp/samd11/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ void board_init(void)

// 1ms tick timer (samd SystemCoreClock may not correct)
SystemCoreClock = CONF_CPU_FREQUENCY;
#if CFG_TUSB_OS == OPT_OS_NONE
SysTick_Config(CONF_CPU_FREQUENCY / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
#endif

// Led init
gpio_set_pin_direction(LED_PIN, GPIO_DIRECTION_OUT);
Expand Down
3 changes: 3 additions & 0 deletions hw/bsp/samd2x_l2x/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ void board_init(void) {
SystemCoreClock = CONF_CPU_FREQUENCY;
#if CFG_TUSB_OS == OPT_OS_NONE
SysTick_Config(CONF_CPU_FREQUENCY / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
#endif

// Led init
Expand Down
6 changes: 6 additions & 0 deletions hw/bsp/samd5x_e5x/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ void board_init(void) {
// Update SystemCoreClock since it is hard coded with asf4 and not correct
// Init 1ms tick timer (samd SystemCoreClock may not correct)
SystemCoreClock = CONF_CPU_FREQUENCY;

#if CFG_TUSB_OS == OPT_OS_NONE
SysTick_Config(CONF_CPU_FREQUENCY / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
#endif

// Led init
gpio_set_pin_direction(LED_PIN, GPIO_DIRECTION_OUT);
Expand Down
5 changes: 5 additions & 0 deletions hw/bsp/same7x/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ void board_init(void) {
#if CFG_TUSB_OS == OPT_OS_NONE
// 1ms tick timer (SystemCoreClock may not be correct after init)
SysTick_Config(CONF_CPU_FREQUENCY / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority((IRQn_Type) ID_USBHS, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
#endif

// Enable USB clock
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/samg/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ void board_init(void) {
// 1ms tick timer (samd SystemCoreClock may not correct)
SysTick_Config(CONF_CPU_FREQUENCY / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
NVIC_SetPriority(UDP_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
#endif

Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/stm32c0/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR runs before scheduler start
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;

// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/stm32f0/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void board_init(void) {
SysTick_Config(SystemCoreClock / 1000);

#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR runs before scheduler start
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;

// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
Expand Down
3 changes: 2 additions & 1 deletion hw/bsp/stm32f1/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ void board_init(void) {
#if CFG_TUSB_OS == OPT_OS_NONE
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);

#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB_HP_CAN1_TX_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
NVIC_SetPriority(USB_LP_CAN1_RX0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
Expand Down
3 changes: 3 additions & 0 deletions hw/bsp/stm32f2/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ void board_init(void) {
#if CFG_TUSB_OS == OPT_OS_NONE
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
#endif

all_rcc_clk_enable();
Expand Down
7 changes: 5 additions & 2 deletions hw/bsp/stm32f3/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,13 @@ void USBWakeUp_RMP_IRQHandler(void) {
void board_init(void) {
SystemClock_Config();

#if CFG_TUSB_OS == OPT_OS_NONE
#if CFG_TUSB_OS == OPT_OS_NONE
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#endif
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;
#endif

// Remap the USB interrupts
__HAL_RCC_SYSCFG_CLK_ENABLE();
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/stm32f4/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR runs before scheduler start
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;

// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/stm32f7/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void board_init(void) {
SysTick_Config(SystemCoreClock / 1000);

#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR runs before scheduler start
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;

// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/stm32g0/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR runs before scheduler start
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;

// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/stm32g4/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR runs before scheduler start
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;

// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/stm32h5/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR runs before scheduler start
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1U;

// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/stm32h7/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void board_init(void) {
SysTick_Config(SystemCoreClock / 1000u);

#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// Explicitly disable systick to prevent its ISR runs before scheduler start
// Explicitly disable systick to prevent its ISR from running before scheduler start
SysTick->CTRL &= ~1UL;

// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
Expand Down
Loading