Skip to main content
mx_it
Associate
November 25, 2018
Question

I2C send 0x00 and 0xFF for sensor reset

  • November 25, 2018
  • 2 replies
  • 993 views

Hi,

in order to reset my I2C sensor TLE493D-W2B6 A0 I need to send 4 bytes which consist of 0xFF->0xFF->0x00->0x00 . So no address or anything else, only the 4 bytes transmitted with 4 consecutive I2C accesses.

Now I am using a slightly modified version of the function I2C_Master_send_single in order to send these 4 bytes. The problem is though, that sometimes the function I2C_WaitOnMasterAddressFlagUntilTimeout returns an error because no ACK is received. The I2C module then goes into a fail state and is not able to perform further transmissions.

Is there any other possibility of sending the 0x00 and 0xFF bytes directly without address and without requiring an ACK?

Best regards

This topic has been closed for replies.

2 replies

mx_it
mx_itAuthor
Associate
November 27, 2018

It would be sufficient to have a method to reset the I2C module so that it allows transmission again.

BCoch
Senior
December 7, 2018

Looking at the User Manual, it's actually 4 separate transmissions (as opposed to a single 4-byte transmission). So just send 4 separate, 0 byte payload I2C messages to address 0xFF, address 0xFF, address 0, address 0. The first two would technically be read messages, and the last two would be write messages. I would think you could use LL calls so you don't get stuck waiting for the ACK.