A false issue
In our previous post, Vlaya and I said that when a full rotation completion triggers an interrupt simultaneously with a flash interrupt, the order in which the HAL API IRQ Handler checks and handles each source of the interruption (both share the same IRQ line to the processor, and they set flags that the IRQ Handler must inspect to determine what happened) made it so that the rotation was handled first, delaying the flash handling.
To solve this, we decided to check the flags for the flash directly in the rotation callback, and trigger the flash before handling the rotation completion if they were set.… Read more
- Yesterday the latency and jitter of the SPI “FLASH” frames was a little high: around 80µs for the jitter
- We had originally planned to solve this by bypassing the interrupts with a DMA request, but sadly this turned out to be unfeasible.
- Investigating ways to reduce the interruption jitter revealed two main factors:
- The interrupt priority was too low
- A scheduled flash and a capture at the same time would cause the flash to be handled after the capture event.
- Fixing this reduced the jitter from 80µs to 2.5µs
Yesterday Vlaya and I ended our post with a plan to use a DMA request line (triggered by a comparison match on our Timer channel) to send the “FLASH” SPI frame instead of doing it by software in an interrupt.… Read more