cancel
Showing results for 
Search instead for 
Did you mean: 

sensortile

jin lu
Associate II
Posted on May 30, 2018 at 20:41

I have a sensortile eval kit (STEVAL-STLKT0lV1) and the app examples.  The kit uses STM32L476JG MCU.   One of the examples is DataLog that uses SPI3 to read and write to an sd card.   I tried to use SPI3 to control an external SPI slave device, which I have successfully controlled via other CPU such as a raspberry pi and stm32f10x.    I looked at the Datalog code and the other STM32l476  spi examples in STM32Cube_FW_L4_V1.11.0, and wrote some test programs.    I can read from slave device (from a register with know data on the salve).  But write is not reliable -- my scope shows MOSI  transmit the correct data, but MISO line does not always return the correct data I wrote.   It  could be  the write part is wrong or the read part is wrong.     Before I show you the details -- *scope screen shot' etc, anybody have tried to use STM32467 to control an external SPI slave (full duplex with chip select)?   any hints and advice, sample code?  Any advices would be appreciated.  By the way,  I looked at the SPI examples in STM32Cube_FW_L4_V1.11.0, nothing is exactly what I need (full duplex with chip select,  maybe I missed something.)   Thanks in advance.

0 REPLIES 0