Associate II
May 22, 2018
Question
STM32L4 Reading SPI with Receive or TransmitReceive returns different values
- May 22, 2018
- 1 reply
- 970 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