Tle5012b e1000

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello 🙂

I would like to interface the TLE5012B E1000 with the SPI interface of a PIC32 Microcontroller.
Now, I am a bit confused because of the Bidirectional Dataline.

Currently I am using the hardware setup as in point 3.5.1 Figure 16. I have connected the SDO and SDI Line from the PIC32.

My code looks as followed:
 mPORTGSetPinsDigitalOut( BIT_7 );
mPORTGSetPinsDigitalOut( BIT_8 );

SelectSensor();
SpiChnPutC(SPI_CHANNEL2, 0x8021);
while(SpiChnIsBusy(SPI_CHANNEL2));

mPORTGSetPinsDigitalIn( BIT_7 );
mPORTGSetPinsDigitalIn( BIT_8 );

spi_read = SpiChnGetC(SPI_CHANNEL2);// & 0b0111111111111111;
DeselectSensor();


But the PIC does not receive anything. Furthermore the Data line is not changing at all.

Could you please give me a hint?
Thanks in advance

Cheers,
Chris
0 Likes
9 Replies
Lars_Springstub
Employee
Employee
Hi Chris,

You are using the subtype 1000.This means the sensor uses IIF as communication type.
Is this your purpose?

Within the TLE5012B, the incremental interface is implemented like a quadrature encoder with a 50% duty cycle.
Sensors with preset IIF are available as TLE5012B E1xxx. The register settings for these sensors can be found
in the latest Application Note TLE5012B Register Setting; section 4


Here you find further info:

http://www.infineon.com/dgdl/TLE5012B_Register_Setting_AN_Rev1.5.pdf?folderId=db3a30431ce5fb52011d29...

and

http://www.infineon.com/dgdl/TLE5012B_FDS_Rev1+1.pdf?folderId=db3a30431ce5fb52011d3dd6e8012582&fileI...

Please let me know if there is anything else I can assist you with!

best regards

Lars
0 Likes
Not applicable
So how can i use SPI for reading angle value and other information? Is there any way to enable SPI?
0 Likes
mkd
Employee
Employee
5 sign-ins First like received First reply posted
Hi VineetNidec,
to my mind you do not have to enable the SPI.
The important thing is that you need an SPI where MTSR can be tristaded (enable signal for output stage) or MTSR is open drain output.
Both setups can be found in the datasheet of the TLE5012B in Figure 3-6 and Figure 3-7: http://www.infineon.com/dgdl/Infineon-Angle_Sensor_TLE5012B-DS-v2.0-en.pdf?folderId=db3a30431ce5fb52...
Is one of these configurations possible with your controller?
0 Likes
Not applicable
Hi Mathias,

I'm using STM32F3 along with TLE5012B E1000. I have configured the MCU as half duplex master. My setup looks like the one shown in Figure 3.6. This is how I've connected the two:

MCU TLE5012B
SCK------------->SCK
NSS------------->CSQ
MOSI------------>DATA

I can send the data but I only receive 0xFFFF from the sensor. There is no change in the data received from the sensor when I rotate the motor shaft. The IIF output is correct though.
0 Likes
Not applicable
Can I enable SPI? Thanks (:
0 Likes
Not applicable
I have the same problem when I using SPI interface of Renesas RL78/F13 and tried to receive angle value from TLE5012B. Then Read Angle Value command word 0x8021 was sent successfully but there was no angle value feedback after a sufficient twr_dealy, only showed 0xFFFF. I am using bidirectional data line as well, I exchange SO pin into input mode in order to release data line to SI pin after transmitted the command word, while it was still not working. Could you please give me a hint or if there's some sample code available? Thanks.
1064.attach1065.attach1066.attach1067.attach
0 Likes
User9050
Level 2
Level 2
First solution authored
Please tell us the used subtype Exxxx of the TLE5012B and upload schematics of the TLE5012B. The screenshot is showing the same signal on the data lines SI00 and SO00? Which SPI mode you are using on RL78 SPI Interface?
0 Likes
Not applicable
Can anyone provide me the SSC connection between Microcontroller(freescale) and TLE5012B IC.???
Thanks in Advance !!!
0 Likes
Not applicable
haiming0620 wrote:
I have the same problem when I using SPI interface of Renesas RL78/F13 and tried to receive angle value from TLE5012B. Then Read Angle Value command word 0x8021 was sent successfully but there was no angle value feedback after a sufficient twr_dealy, only showed 0xFFFF. I am using bidirectional data line as well, I exchange SO pin into input mode in order to release data line to SI pin after transmitted the command word, while it was still not working. Could you please give me a hint or if there's some sample code available? Thanks.
1064.attach1065.attach1066.attach1067.attach




Hi.. Looking at your code,seems as if you are not clearing the interrupt after every read i.e.Clear the interrupt after receiving each frame.
0 Likes