Replies: 1 comment
-
SysTick |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
On a project, it was noticed that USART ISR within Slip was interrupted which led to packet corruption and eventually a fatal crash within the network RX code. Modifying IRQ priorities and locking didn't help.
A small sample was created to check the issue. It is a basic application that starts a cooperative thread with the highest priority (
K_HIGHEST_THREAD_PRIO
) that constantly toggles a GPIO (something like the Blinky sample but without delays and runs within a coop thread).The GPIO output is measured using an oscilloscope. When the sample runs a periodic "gap" is visible. The "gap" duration depends on the build flavor (i.e. with no optimizations or cache off it gets longer).
Default configuration (empty prj.conf):

The gap is 912 ns.
Debug (no optimizations):

The gap is 2254 ns.
I assumed that the cooperative thread is not supposed to be interrupted by anything for as long as it doesn't sleep or yield.
However, that doesn't seem to be the case.
The hardware is a custom STM32H730VB-based board. The sample runs on internal flash. Tried disabling the
I
andD
caches, but the "gap" is still present.Maybe someone has an idea what it can be? (@erwango @FRASTM)
Sample
Beta Was this translation helpful? Give feedback.
All reactions