cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 Reading SPI with Receive or TransmitReceive returns different values

cyancali
Associate III
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
1 REPLY 1

Sorry, bumping old zombie unanswered questions off my feed

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