Skip to main content
cyancali
Associate II
May 22, 2018
Question

STM32L4 Reading SPI with Receive or TransmitReceive returns different values

  • May 22, 2018
  • 1 reply
  • 972 views
Posted on May 22, 2018 at 21:45

Hey guys,

i am using a custom board with a STM32L452CE MCU. I am trying to implement a 2 Line SPI with a sensor as slave. Communicating via Transmit and Receive separately works fine. However if I want to switch to TransmitReceive there are wrong values returned. I monitor the SPI with a Logic Analyzer.

Send byte:                                         0xD0

Returned byte:                                  0x60

Received byte by TransmitReceive: 0x50

Right now i tried working with DMA, but it doesn't change anything. With or without DMA i get the same wrong readings with TransmitReceive and Correct readings with Transmit and Receive only.

I attached some screenshots of the problem.

Thank you for any hints!

Alex

#stm32 #hal_spi_transmitreceive #hal_spi_receive #hal_spi_transmit #stm32l452 #spi #stm32l4
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
August 10, 2018

Sorry, bumping old zombie unanswered questions off my feed

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..