D-cache invalidation call causes Hard Fault (D-cache is disabled)
Hi. I'm using an STM32H7, and I have the d-cache DISABLED in cubemx, but __DCACHE_PRESENT seems to always be set to 1 by stm32h755xx.h, anyway, and as a result, I'm getting a hardfault when X-CUBE-AZRTOS-H7 ethernet init calls SCB_CleanDCache_by_Addr().
If I just modify the code to set __DCACHE_PRESENT to 0, everything works fine.
Why is this definition being set even though I have the d cache disabled? Do I still have to worry about the cachability settings in the MPU even when the dcache is disabled, and could that be the problem that I just have something configured there wrong?
Either way, I shouldn't need to clean the dcache when it's disabled, right? So why is the auto-generated code even wasting its time doing that?
In the azure rtos port, we have:
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
SCB_CleanDCache_by_Addr((uint32_t*)(pktIdx -> nx_packet_data_start), pktIdx -> nx_packet_data_end - pktIdx -> nx_packet_data_start);
#endifShould it instead be checking to see if it's ENABLED instead of present?
