2019-07-11 09:54 PM
I am using the STEVAL-MKI158V1 eval board which uses the AIS3624DQ. When I deinit the i2c communication to the device the sca and scl pins go low and the AIS stops outputting interupts. I can confirm the interupt pin triggers when the i2c connection is present. The board definitely has power when the i2c is deinitialised. Can anyone coment and confirm this is how the device is designed to act and if there are any work arounds?
I will be using the device in an ultra low power application which means when i put my device in deep sleep it turns off the output at the two i2c pins.
2019-07-15 04:01 AM
hi @JMari.18 , one question for you:
>> When I deinit the i2c communication to the device the sca and scl pins go low
I2C lines needs pull-up resistors for working properly, and when you de-init the lines you should set them in HiZ configuration (open drain). How do you set the CS line after communication?
Regards
2019-07-15 05:00 AM
Hi @Eleon BORLINI I have set the pins as outputs with a high value and the device will function. However Ive had no luck setting them any other way. what is required to set a pin as "HiZ (Open Drain)"? I'm using an esp32 running micropython, i can set the pin to input, output or open drain with either a pull up, pull down resistor or neither.
Cheers
2019-07-22 06:01 AM
hi, if you set the I2C lines in open drain configuration, and you add pull-up resistors on them, during the I2C communication the line will be driven by you app processor, while when not communicating after the deinit they will be driven by the pull-ups, so will stay high and the device interrupts will work properly. Regards
2019-07-22 08:15 PM
Hi Joel,
For your information
https://www.i2c-bus.org/i2c-primer/how-i2c-hardware-works/
SDA and SCL are open-drain, that is I2C master and slave devices can only drive these lines low or leave them open.
The termination resistor Rp pulls the line up to Vcc if no I2C device is pulling it down.
Best Regards,
Winfred