Skip to main content
Asantos
Associate III
April 25, 2018
Question

STM32H7 SPI_FullDuplex_ComDMA example

  • April 25, 2018
  • 1 reply
  • 726 views
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.

    This topic has been closed for replies.

    1 reply

    Amel NASRI
    ST Technical Moderator
    June 28, 2018
    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 "Best Answer" on the reply which solved your issue or answered your question.