Closed suikan4github closed 1 year ago
Describe the bug CleanDataCacheByAddress() sometimes causes Hard Fault if the D Cache is disabled in STMH7.
This is measured in the STM32H7 audio demo .
Expected behavior The CleanDataCacheByAddress() calls SCB_CleanDCache_by_Addr() of the CMSIS. This function must not call if the D Cache is disabled.
There is a related discussion on the BBS.
To fix it, wrap the entire function by
if ( SCB->CCR & SCB_CCR_DC_Msk != 0 ) { }
Where SCB->CCR DC is the status of Data Cache Enable. See ARM Cortex-M7 Devices Generic User Guide r1p0.
Merged to develop. Ready to release.
Describe the bug CleanDataCacheByAddress() sometimes causes Hard Fault if the D Cache is disabled in STMH7.
This is measured in the STM32H7 audio demo .
Expected behavior The CleanDataCacheByAddress() calls SCB_CleanDCache_by_Addr() of the CMSIS. This function must not call if the D Cache is disabled.
There is a related discussion on the BBS.
To fix it, wrap the entire function by
Where SCB->CCR DC is the status of Data Cache Enable. See ARM Cortex-M7 Devices Generic User Guide r1p0.