TLV493D-A1B6 Master Controlled Mode

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

cross mob
Translation_Bot
Community Manager
Community Manager
Community Manager

My IIC clock is 400kHz, and the measurement mode is Master Controlled Mode (master control mode). After the power-on initialization is complete and the four write registers such as MOD1 and MOD2 are configured, I first waited until /INT has a rising edge, then sent an address to the detector through IIC, requested reading, and the detector also responded. Next, I read 0H-06H for a total of 7 registers, but the value returned is changing, and the gap is quite large. I checked the data I read back, and the 5th digit (PD) of 5H (at the arrow) is consistently displayed as 0, which means the conversion has not been completed. However, digits 1-2 (CH) of 3H (at the arrow) are shown as 00, which is the correct value.1703242807364.png1703242497345.png1703242701280.png

 

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/td-p/665708

0 Likes
1 Solution
Translation_Bot
Community Manager
Community Manager
Community Manager

Please refer to:

https://community.infineon.com/t5/3D-Hall-Magnetic-sensor/TLV493D-A1B6-%E5% 88 %9D% E5 %A7% 8B %E5% ... 98/td-p/676630 The answer.

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/677652

View solution in original post

0 Likes
15 Replies
Translation_Bot
Community Manager
Community Manager
Community Manager

Hi @DADA2

1. Simultaneously check the FRM of the 03h-temp register, is it = 0? If it is zero, it means that no ADC conversion has been completed.

2. Follow the steps in 5.7.1 and send a reset frame to see the effect.

3. Please follow the initialization process given in 5.1.

If there are new questions, just keep replying. Also describe your hardware environment and MCU information.

 

Best,

Julis

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/666308

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

Please take a look, thank you

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/666429

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

Hello,

At first glance, the sensor is not in normal working mode, can't see the whole process of your configuration, and can't directly help you locate the problem.

Here are a few ideas to try:

1. Are you using cyclic or interrupt mode, and if interrupted, whether the /INT register is enabled and triggered normally.

2. Refer to our kit related code. https://github.com/Infineon/TLV493D-A1B6-3DMagnetic-Sensor

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/666507

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

Hello,

What I gave you in the document is the initialization part. The key initialization part is to send 0xff first. Theoretically, the device should respond to me, but it hasn't. I wrote it according to the timing in your data sheet, and the document also contains the waveforms actually collected by the oscilloscope. This is critical.

Whether to send 0xFF, should there be a response from the slave, or not.

 

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/666527

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

In Master Controlled Mode, when (MOD1 & MOD2) and Res (0H) and Res (1H) are configured. The IIC clock is set to high resistance. After waiting for /INT to receive a pulse, the address command is read; after the clock is set to high resistance, the address command is read first, and the data is read after waiting for /INT to rise one pulse before reading the data. 1703501798872.png

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/666536

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

Hi @DADA2

Compare your local code according to the User Manual (Figure 9).

How are Mod1 and Mod2 configured on your side, respectively? Is /INT enabled?

The res register is reserved, so you don't need to worry about it; the values inside are meaningless

If everything else is normal, wait for the /INT pulse before reading it, grab the waveform to see if /INT has a rising edge

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/666683

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

0cb3d50e2ea81cec020983fa3ee9ba3.png

There are a few questions, as shown in the figure: First, according to the initialization process given in the data sheet, do you need to wait 30us after sending S FFh P, or wait 30us after sending S 00h P directly.

Second, according to the data sheet, reset the sensor to send S00h ADDR P instead of S00h P. See the image underlined in red.

Third, the third step you gave is 3. Write sensor configuration, but the data manual initialization flow chart requires that you first read the values of the 7, 8, and 9 registers, and select the corresponding bits to fill in the 4 write registers.

Fourth, the MODE1,2 configuration you asked about. My configuration is shown below. The mode used is...

1703561368066.png1703561226180.png

Fifth, you said in your reply, “If everything else is normal, wait for the /INT pulse before reading it, and grab the waveform to see if /INT has an ascending edge”. My oscilloscope can normally catch the rising edge of /INT.

Sixth. When I configure MODE1 and 2 in my program, I wait for /INT to rise and send a read command+read the value of the register; or after the MODE1 and 2 configuration is complete, send a read address command, and then wait for /INT to rise to send a read command+read the value of the register.

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/666714

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

@DADA2

Wait 30us to ensure the completion of the reset process. The three registers related to Factory Sett... for reading functions after data update. Try switching between POWERDOWNMODE and MASTERCONTROLLEDMODE modes when reading data. Has this side never had a successful communication? Or is there a problem with using it? Looks like I2C communication is fine

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/667089

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

First, IIC communication is currently normal

Second, the problem now is that after MODE 1 and 2 is configured, Master Controlled Mode is used .

Wait for the rising edge of /INT to send the read address command+read the data from the 7 registers. According to the collected waveform, after sending the address reading command, the slave returned ACK to a low level, proving that there was no problem with the parity check bits I configured. See MODD1 register (see figure). 1703647407232.png

Third, the second step is to send the read address and read the data from the 7 registers for the first time, and the waveform collected by the oscilloscope shows that every 2.2 kHz time, the data operation is sent to read the address+read the 7 registers, proving that there is no problem with the system interruption. Mainly, I haven't read the 7 registers, and the data gap is too big. X, Y, and z are sometimes FFH, sometimes 00h, as long as the collected temperature remains basically the same. Looking at the values of the 7 registers read, I found that the FRM for 3H was added up to 1 each time, and the channel value was always 00. The PD of 5H is always 0, which indicates that X, Y, Z and temperature have not been converted.1703648272623.png1703648291534.png

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/667313

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

1. The FRM value will only increase when register X/Y/Z/T conversion is completed.

2. CH MUST BE “00” AT READOUT TO ENSURE X/Y/Z/T COME FROM THE SAME CONVERSION.

If it's convenient for you, send me the relevant code and analyze it together.

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/667502

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

Take a look.

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/667538

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

Please answer the questions in the documentation

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/667660

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

Hi @DADA2

  1. Every 12 ms a Bx, By, Bz conversion will be completed an interrupt pulse will be sent to master. The master can then read the Bx, By and Bz registers.
  2. Interrupt pins, signals a finished measurement cycle.A pulse is generated after a conversion is completed.

400kHz can meet the requirements

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/669970

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

Hi @DADA2

Hello, have you solved the problem of “the returned value is changing, the gap is quite large”? Now what other question. You've submitted so many questions that you can't understand the state of your environment right now. Please describe in detail, and if this problem has been solved, please accept it as a solution, thank you!

Best,

Julis

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/677528

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

Please refer to:

https://community.infineon.com/t5/3D-Hall-Magnetic-sensor/TLV493D-A1B6-%E5% 88 %9D% E5 %A7% 8B %E5% ... 98/td-p/676630 The answer.

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/TLV493D-A1B6-Master-Controlled-Mode/m-p/677652

0 Likes