File tree 21 files changed +189
-42
lines changed
21 files changed +189
-42
lines changed Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
Original file line number Diff line number Diff line change @@ -754,8 +754,15 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
754
754
}
755
755
#endif /* configUSE_TICKLESS_IDLE */
756
756
757
- /* Stop and reset the SysTick. */
758
- portNVIC_SYSTICK_CTRL_REG = 0UL ;
757
+ /* Stop and reset SysTick.
758
+ *
759
+ * QEMU versions older than 7.0.0 contain a bug which causes an error if we
760
+ * enable SysTick without first selecting a valid clock source. We trigger
761
+ * the bug if we change clock sources from a clock with a zero clock period
762
+ * to one with a nonzero clock period and enable Systick at the same time.
763
+ * So we configure the CLKSOURCE bit here, prior to setting the ENABLE bit.
764
+ * This workaround avoids the bug in QEMU versions older than 7.0.0. */
765
+ portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT_CONFIG ;
759
766
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL ;
760
767
761
768
/* Configure SysTick to interrupt at the requested rate. */
You can’t perform that action at this time.
0 commit comments