cancel
Showing results for 
Search instead for 
Did you mean: 

When a new value is transmitted in SPI Write mode, the value that was transmitted immediately before is transmitted again.

pabian
Associate III

<configuration​>

FreeRTOS, STM32F767, flash memory(W25Q128)

using SPI5_Tx/Rx with DMA

Full duplex, 4 line, 8 bits, Prescaler = 2, CPOL=Low, CPHA=1 Edge (Mode 0)

DMA2_Stream3 for Tx (Very High Priority), DMA2_Stream4 for Rx (Very High Priority)

Normal Mode,

<Error>

  1. Enter new data for SPI Tx, compile and run
  2. No new data is being sent, it is retransmitting the data that was just sent (check with the oscilloscope)
  3. New data is sent only after sending again.

What is the cause?

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Principal III

You mean you are flashing a new version of your prog sending new data, but the old (different) data is still sent? Then, flashing did not work properly.

If DMA is involved on a MCU with a data cache (like F7), you might also double-check that the DMA sees the correct data (cache cohereny).

hth

KnarfB

View solution in original post

1 REPLY 1
KnarfB
Principal III

You mean you are flashing a new version of your prog sending new data, but the old (different) data is still sent? Then, flashing did not work properly.

If DMA is involved on a MCU with a data cache (like F7), you might also double-check that the DMA sees the correct data (cache cohereny).

hth

KnarfB