cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 SPI_FullDuplex_ComDMA example

Asantos
Senior
Posted on April 25, 2018 at 21:51

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.

1 REPLY 1
Amel NASRI
ST Employee
Posted on June 28, 2018 at 19:02

Hi

Mendes.Ari.001

,

You find an explanation for what you observe in 

 .

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.