STM32H743ZIT6 random startup problems when D-Cache enabled
Hello,
I am about to improve the execution speed of an existing code base on a NUCLEO-H743ZI2 board.
So far, I have the following memory setup:
Instruction Memory:
- ITCM for time-critical functions
- FLASH (+ I-Cache) for remaining instructions
Data Memory:
- AXI_SRAM for two DMA-buffers (Peripheral to Memory)
- SRAM1 for another DMA buffer (Memory to Peripheral)
- DTCM for everything else (including ISR table)
My program with the above setup works fine.
Now I want to check whether enabling the D-Cache can actually further improve execution speed. My intention is, to use this Cache solely for a faster reading/processing of the DMA-Buffers in AXI_SRAM. Their reading happens upon a DMA half- or full-complete interrupt and the D-Cache is always invalidated before accessing any DMA-Buffer data. SRAM1 stays non-cacheable.
This is my new setup:
Instruction Memory:
- ITCM for time-critical functions
- FLASH (+ I-Cache) for remaining instructions
Data Memory:
- AXI_SRAM (+ D-Cache) for two DMA-buffers (Peripheral to Memory)
- SRAM1 for another DMA buffer (Memory to Peripheral)
- DTCM for everything else (including ISR table)
MPU:
- Region 0 = SRAM1 (non-cacheable)
- Region 1 = AXI_SRAM
Here I am facing a weird problem.
When I download the program to the nucleo, it often does not start and instead goes to the error handler. However, when I press the reset button a couple of times, it suddenly starts and runs perfectly fine.
Has anybody faced a similar problem? Can somebody help me debugging?
