Skip to content
Prev Previous commit
Next Next commit
stm32h7_cm4: audio: add cache handling check for CM7
  • Loading branch information
facchinm committed Oct 30, 2023
commit a31a23383b1ce9114ec801c529a184e08b847b02
4 changes: 4 additions & 0 deletions libraries/PDM/src/STM32H747_dfsdm/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ void HAL_DFSDM_FilterRegConvHalfCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_
{
xfer_status |= DMA_XFER_HALF;
// Invalidate Data Cache to get the updated content of the SRAM
#ifdef CORE_CM7
SCB_InvalidateDCache_by_Addr((uint32_t*)&RecBuff[0],sizeof(RecBuff)/2);
#endif
}
PDMIrqHandler(true);
}
Expand All @@ -86,7 +88,9 @@ void HAL_DFSDM_FilterRegConvCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filt
{
xfer_status |= DMA_XFER_FULL;
// Invalidate Data Cache to get the updated content of the SRAM
#ifdef CORE_CM7
SCB_InvalidateDCache_by_Addr((uint32_t*)&RecBuff[PDM_BUFFER_SIZE/2],sizeof(RecBuff)/2);
#endif
}
PDMIrqHandler(false);
}
Expand Down