Interrupt Service Routine Jitter
Hi,
I use a STM32F767 Nucleo-144 board with a STM32F767ZIT6 processor.
With CubeIDE I configure SPI1 as I2S1 input and pump the data via DMA2/Stream0 in a short 8x16Bit circular buffer. The clock of the SPI1 is at ~ 3MHz .I set up the HAL_I2S_RxHalfCpltCallback() and HAL_I2S_RxCpltCallback() routines. In both routines i toggle a GPIO and get a ~23.8kHz square wave. This all works as exspected.
But: The square wave suffers from a big jitter. First, there is a constant jitter in the range of 100ns. Second, sometimes the duty cycle (not the frequency) of the signal changes by ~330ns for some parts of a second. 330ns ist the reciprocal of my 3MHz clock.
How can I get rid of the jitter? I tried to slim down HAL_DMA_IRQHandler() to the necessary parts for my use case. That did not affect the jitter. I also changed the NVIC priorities with no effect.
How can I get rid of the jitter?
THX
Cheers
Detlef
