Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around SysTick bug for QEMU ARMv8-M #724

Merged
merged 3 commits into from
Jul 27, 2023
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
11 changes: 9 additions & 2 deletions portable/ARMv8M/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/GCC/ARM_CM23/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/GCC/ARM_CM23_NTZ/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/GCC/ARM_CM33/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/GCC/ARM_CM33_NTZ/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/GCC/ARM_CM35P/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/GCC/ARM_CM35P_NTZ/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/GCC/ARM_CM55/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/GCC/ARM_CM55_NTZ/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/GCC/ARM_CM85/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/GCC/ARM_CM85_NTZ/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/IAR/ARM_CM23/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/IAR/ARM_CM23_NTZ/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/IAR/ARM_CM33/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/IAR/ARM_CM33_NTZ/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/IAR/ARM_CM35P/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/IAR/ARM_CM35P_NTZ/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/IAR/ARM_CM55/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/IAR/ARM_CM55_NTZ/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/IAR/ARM_CM85/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down
11 changes: 9 additions & 2 deletions portable/IAR/ARM_CM85_NTZ/non_secure/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
}
#endif /* configUSE_TICKLESS_IDLE */

/* Stop and reset the SysTick. */
portNVIC_SYSTICK_CTRL_REG = 0UL;
/* Stop and reset SysTick.
*
* QEMU versions older than 7.0.0 contain a bug which causes an error if we
* enable SysTick without first selecting a valid clock source. We trigger
* the bug if we change clock sources from a clock with a zero clock period
* to one with a nonzero clock period and enable Systick at the same time.
* So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
* This workaround avoids the bug in QEMU versions older than 7.0.0. */
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG;
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;

/* Configure SysTick to interrupt at the requested rate. */
Expand Down