DMA1/2 cannot access ITCM or DTCM. MDMA can reach TCM through the Cortex-M7 AHBS path. BDMA is limited to D3 resources.
Reachability comes first. Cache ownership comes second.
Treat memory reachability and cache coherency as two separate checks. Either can fail; they do not have to fail together. Moving the buffer, aligning it, or disabling D-cache does not establish that both checks have passed.
1. Pin down the real peripheral and DMA path
Start with the actual transfer in the STM32H743VIT6 project, not the family name on the datasheet cover. Record:
- Full part number and silicon revision
- Peripheral instance and DMA request
- DMA controller and stream/channel
- Transfer direction and data width
- Buffer address and byte length
- Completion event or callback
- Linker configuration, HAL/CMSIS versions, and MPU/cache attributes
“ADC uses DMA” is not enough. Neither is “the buffer is in RAM_D1.” Check the linker map and the address used at runtime. A section label, a static declaration, or volatile does not prove where the buffer lives or how the DMA master reaches it.
Keep the controller and address as a pair. That pair is what the next check is built on.
2. Prove reachability from the linked address
Before changing cache settings, prove the address is reachable by the selected DMA master. ST AN4891 Rev 7 covers the single-core H743 architecture. An F7 diagram or a dual-core H747 example is not the H743 access map.
| Master | Relevant H743 boundary | What to prove |
|---|---|---|
| DMA1/2 | Cannot access ITCM or DTCM | The actual buffer lies in memory accessible to this controller |
| MDMA | Can reach TCM through the Cortex-M7 AHBS path | The request and transfer design actually use MDMA |
| BDMA | Access is limited to D3 resources | The buffer is in BDMA-accessible D3 memory, such as SRAM4, not D1 AXI SRAM |
If the address is unreachable, change the placement or redesign the transfer path. An MPU attribute change cannot add a missing hardware connection.
A reachable SRAM address can still have a cache-coherency problem. That is the next check, not a replacement for this one.
3. Handle cache-line ownership by transfer direction
The CPU may hold a cached copy that differs from SRAM. A clean writes dirty cache data back to memory. An invalidate discards the cached copy. They solve different problems. ST AN4839 Rev 2 makes that distinction clear. Do not use one as a substitute for the other.
| Direction | Before DMA owns the buffer | Before CPU reuses it |
|---|---|---|
| TX: CPU writes, DMA reads | After CPU writes and before DMA starts, clean the required range for write-back data. Do not modify the source while DMA reads it. | Reuse the region only when DMA has finished using it and the transfer protocol returns ownership to the CPU. |
| RX: DMA writes, CPU reads | Use an isolated receive buffer whose old contents may be discarded and which owns complete cache lines. Invalidate before reception. Prevent CPU access while DMA owns the region. | After DMA finishes the relevant region, invalidate that completed region before the CPU reads the new data. |
On this Cortex-M7, cache lines are 32 bytes. Maintenance happens at cache-line granularity. Aligning only the start is not enough if the end of the buffer shares a line with another writable object. Invalidating that line can discard unrelated dirty data. ST’s DMA troubleshooting FAQ calls out this risk.
Do not clean stale RX data over memory that DMA has just filled. That can overwrite new received data with an old cached copy.
A dedicated non-cacheable shared region is another design option. Review its MPU attributes and boundaries instead of changing attributes blindly. Temporarily disabling D-cache can help isolate a symptom. It does not validate the final design. And volatile does not perform cache maintenance.
4. Use the official example to check units, not as a drop-in template
We use a fixed ST CubeH7 ADC DMA example to make the units explicit. We are not giving you a copy-paste code list here. The point is the check path.
That example uses ADC1, DMA1_Stream1, peripheral-to-memory transfers, halfword width, and circular mode. Its GCC linker places .bss in RAM starting at 0x24000000. That is this example’s placement, not a universal address prescription.
The array contains 32 uint16_t elements, so it occupies 64 bytes. Its start is 32-byte aligned. Each half contains 16 elements, or 32 bytes. The second half starts at element index 16. The half-complete and complete callbacks each invalidate the corresponding 32-byte half.
Here, the macro value 32 appears as the array’s element count and as the half-buffer maintenance byte count. Their numerical equality is incidental. Recalculate bytes from the element type and the completed region when you change the array. Use the applicable CMSIS address, byte-length, alignment, and ordering requirements.
This is an STM32H743I-EVAL example, not a tested STM32H743VIT6 board configuration. We have reviewed source files; we have not compiled or run the project on a VIT6 board. Do not copy its pins, clocks, or linker capacities into a different board without rechecking them.
5. Record data and timing before you accept the design
In circular reception, identify which half has completed and when DMA will wrap and overwrite it. The CPU must finish its allowed work inside that ownership window. A callback or an invalidate does not prove that an arbitrarily slow consumer is safe.
Compare received data against a known pattern under the project’s required conditions. Keep the evidence:
- Linker map and actual buffer addresses
- DMA controller, request, and stream configuration
- Cache attributes and maintenance ranges
- Completion events and callback timing
- CPU processing time before DMA reuse
- Any remaining failures or unresolved conditions
Record failures rather than treating “it works with cache off” as acceptance. That result is a diagnostic observation, not design acceptance.
For device selection, use the STM32 series selection guide; for candidate replacements, use the MCU migration checks and reassess memory access, driver configuration, and cache strategy. A similar interface or a shared Cortex-M7 core is not an engineering compatibility conclusion.
If you are selecting the STM32H743VIT6 or bringing up a board, send us the full part number, DMA master, memory map, transfer direction, and the integration condition that still worries you. Compare candidate parts against the same access paths, cache strategy, and driver requirements. For a SUNTEC quotation, include the part number, quantity, and any unresolved integration conditions.
Prepared by the SUNTEC Technical Team at Suzhou Shengyatai Electronics Co., Ltd.
