Skip to main content
pabian
Associate II
November 4, 2021
Solved

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

  • November 4, 2021
  • 1 reply
  • 780 views

<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?

This topic has been closed for replies.
Best answer by KnarfB

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

1 reply

KnarfB
KnarfBBest answer
Super User
November 4, 2021

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