2024-02-14 03:13 AM
In Figure 1 of the reference manual RM0433 for the STM32H743 (and STM32H742, STM32H753, STM32H750) no connection between cache and DTCM-RAM exists.
For all I know this is correct since the DTCM-RAM is not cachable.
Table 7 on the other hand shows that the DTCM is cachable.
Which one is correct? Or is my interpretation of the architecture figure wrong?
Solved! Go to Solution.
2024-02-15 05:40 AM - edited 2024-02-15 05:53 AM
This is something related to MPU default attributes from ARM and not related to STM32.
From PM0253 "STM32F7 Series and STM32H7 Series Cortex®-M7 processor programming manual":
So even you enable the cache to that region the cache has no effect.
Also the Cache is not in the path of the TCM memories. There are two different paths here: DTCM directly accessed by the CPU and the the other path which is AXI which is impacted by the cache policy.
Refer also to the AN4891 "STM32H72x, STM32H73x, and single-core STM32H74x/75x system architecture and performance" or AN4667 "STM32F7 Series system architecture and performance "
2024-02-14 12:18 PM
Dear @dmocom ,
Your understanding is correct for the first part , for the second part it is more about MPU attributes on the memory map and have the right policies for each MPU Region, I would recommend to read these two applications Notes :
to have a complete overview on Level1 Cache and MPU . Hope it helps .
Cheers,
STOne-32
2024-02-14 10:10 PM
Sorry, why are you looking for a connection between DTCM and DCache?
Such one is not there (and it would not make sense):
Why are you looking for a DCache connection to DTCM?
(OK: there can be a cache coherency issue, e.g. doing a DMA froM DTCM vs. regular cached memories can be tricky, SW wise, to use the updated data in memory for a DMA.)
DTCM has also a dedicated memory region (base address), outside of all other regular memories. If the MCU would access this DTCM memory (via its dedicated address range) - it would newer read via a slower DCache interface (as for other memories). DTCM does not need DCache.
DTCM is the BEST you can have: any DCache interface, e.g. to regular SRAM has a lot of latency issues (e.g. Cache miss, Cache flush...). A DTCM does not have any of these "penalties" (because it does not need DCache).
2024-02-15 03:24 AM - edited 2024-02-15 03:24 AM
Thank you very much.
So Table 7 only shows the attributes that are changeable by the MPU. But as a follow-up: why is the cacheable-attribute changeable for the DTMC Region anyway since it doesn't have any effect?
2024-02-15 05:40 AM - edited 2024-02-15 05:53 AM
This is something related to MPU default attributes from ARM and not related to STM32.
From PM0253 "STM32F7 Series and STM32H7 Series Cortex®-M7 processor programming manual":
So even you enable the cache to that region the cache has no effect.
Also the Cache is not in the path of the TCM memories. There are two different paths here: DTCM directly accessed by the CPU and the the other path which is AXI which is impacted by the cache policy.
Refer also to the AN4891 "STM32H72x, STM32H73x, and single-core STM32H74x/75x system architecture and performance" or AN4667 "STM32F7 Series system architecture and performance "