2018-10-22 05:02 AM
Hi
I want to read out a sensor, which has an SSC interface, as depicted in the image attached. The IC is a TLE5012B (https://www.infineon.com/dgdl/Infineon-Angle_Sensor_TLE5012B-UM-v01_02-en-UM-v01_02-EN.pdf?fileId=5546d46146d18cb40146ec2eeae4633b) and I'm not really sure how I should configure the interface. MOSI and MISO are shorted together. So when I want to receive data, I first need to send a command, then I go into the receive mode, such that MOSI needs to be HI-Z, but how can I achieve this?
2018-10-22 07:32 AM
You did not tell us your STM32 model, but generally, in SPI chapter of RM, focus on parts talking about BIDIMODE = 1.
On some DISCO boards, there are ST magnetometer/accelerometer MEMS of which some communicate in this way, so you can go for some inspiration there.
JW
2018-10-22 08:14 AM
Hi JW, thank you. I use an STM32F410CBU6 for this, where I configurated it in the CubeMX tool from ST. I will have a look at this BIDIMODE.
2019-01-10 03:49 AM
Hello, did you manage to make a connection with STM? If so, can you give an example of the work? I will be very grateful!
2019-01-28 02:01 AM
Problem solved. I connect TLE5012B and STM32L011 with 2k resistor between MISO and MOSI SPI PINs. MISO "force(without resistor)" connected with "DATA" on TLE. I ported arduino library to LL library.
2020-08-26 11:18 PM
Either jump MOSI MISO using a resistor, or use Half-duplex master mode in CubeMX
2023-06-13 02:56 AM
Hi, I have the same issues like you, can you share the project in order to understand which error I'm making? Thank you so much
2023-06-19 07:30 AM
The trick is that you need to switch between sending and receiving. Order of operations matters, as SPI needs to be disabled before last word read is started.
Here is an example. This is reading two words (data+safety) sent by tle5012b. https://github.com/dzid26/StepperServoCAN/blob/480f6fc05f474a96692b800cf3340507b985d360/firmware/src/BSP/tle5012.c#L41-L5
It is using Standard Library, but it should be similar with "HAL". I created also a CubeMX reference setup https://github.com/dzid26/StepperServoCAN/blob/main/firmware/StepperServo.ioc, but I don't actively use it.