Is this possible to disable / monitor trigger memorization on DMA on STM32U575?
Context
I am working on NUCLEO-U575ZI-Q with an external ADC wired to the board. The ADC generated a rising edge on one of its pins, "DRDY" each time a sample is available.
My objective is to retrieve the ADC sample without involving the CPU. The current solution is a DMA triggered by DRDY sending X dummy bytes to SPI TX register (X is the size of one sample from the ADC). The SPI then send (and read) 3 bytes to/from the ADC, receiving the sample.
The bytes received are read with another DMA, but that is not the subject of this topic.
In a normal case, the DMA gets triggered (ADC says "data are ready"), 3 bytes are sent so 1 sample is read, then another sample is ready, etc.. All is fine.
In a case where the DMA is blocked for whatever reason, it will be triggered once (hit and fire, referring to figure 64 or RM0456 Rev 3, page 663), then a second trigger will occur (hit and memorize), and finally a third trigger will occur (hit and trash), generating a "trigger overrun event". There is an error with sample reception (2 samples were lost) and an error was triggered (overrun condition).
In an intermediate case where the DMA is slightly slowed down, the DMA may be triggered only twice in a row (losing the first sample), but no error is detected by the SW.
Questions
I am thus wondering is there is any solution for the software to disable the trigger memorization, or to detect that a memorization occurred.
Furthermore, is there an obvious way to retrieve external ADC samples without triggering an interrupt for every single sample?
