This is the DMA interrupt service programvoid HAL_I2S_TxHalfCpltCallback(I2S_HandleTypeDef* hi2s){ /*Notify fill data*/ dma_stop = getCurrentMicros(); int temp = dma_stop - dma_start; if (temp < 1000) { if (stats.dma_tx_min) { ...
When preparing data, record the start time, DMA interrupt callback record the end time, and then calculate the difference between the two times to measure the DMA processing time