AnsweredAssumed Answered

STM32H7 SPI_FullDuplex_ComDMA example

Question asked by mendes.ari.001 on Apr 25, 2018
Latest reply on Jun 28, 2018 by Amel N

Hi, 

In the SPI_FullDuplex_ComDMA example from STM32Cube_FW_H7_V1.2.0, if the aTxBuffer is changed from const uint8_t to uint8_t. (from flash to sram). The code below:

 

for(i=0;i<128;i++) aTxBuffer[i] = 0x55;

SCB_CleanDCache_by_Addr((uint32_t *) aTxBuffer, 128);

HAL_SPI_TransmitReceive_DMA(&SpiHandle,(uint8_t*) aTxBuffer, (uint8_t *) aRxBuffer, 128);

 

The Data in MOSI pin is 0x55 only if the SCB_CleanDCache_by_Addr is called, otherwise MOSI pin show no data, always zero.

 

I would like to know why this is necessary for the H7 and not for F7?

 

And how can I configure the MPU so that the SCB_CleanDCache_by_Addr call is not required? 

 

Ari.

Outcomes