Using the grove connector pins of the Azure Sphere, I'm attempting to add an I2C slave device (TFmini LIDAR proximity sensor).
When I connect it and build the default Azure Sphere Kit solution, the accelerometer is no longer found as shown with the error "LSM6DSO not found!".
The code then exits execution.
Here is the troubleshooting I tried:
- Ensured the device didn't have an I2C device ID the same as the accelerometer. It didn't. It was 0x10. The accelerometer is 0x6C as found in the code and validated with a log output.
- Powered the sensor with a separate battery source and linked the ground of it to a ground pin of the Azure Sphere.
- Checked the wires to ensure SDA was on SDA and SDL was on SDL.
- Checked to ensure proper voltage was reaching the sensor power (5V).
- Ensured both the sensor and the Azure Sphere using 3.3V logic signals per their datasheets/block diagram. They are 3.3V.
- Reviewed what ID is returned in the initI2C routine using the following additional line of code: (It returns a zero versus an expected decimal value of 16 which would be 0x10 in hexidecimal.)
// Check device ID lsm6dso_device_id_get(&dev_ctx, &whoamI); Log_Debug("Sean's Search ID: %d\n",whoamI); if (whoamI != LSM6DSO_ID) {
- Removed power from the slave device, but kept its two wires connected. The problem stayed. Device ID was returned as 0.
- With power removed, I disconnected the SDL wire and left the SDA connected. The problem stayed. Device ID was returned as 0.
- With power removed, I disconnected the SDA wire and left the SDL connected. The problem stayed. Device ID was returned as 0.
- With power removed, I disconnected both the SDA and SDL in turn removing the device entirely from the circuit. The Accelerometer was detected again.
I thought that perhaps it was due to baud rate. The Azure code shows 100000 for bus speed. Example Arduino code for the device shows 115200 baud rate. With the slave device powered down and still connected to SDA and SCL, it still caused the problem making me think its not baud rate.
I would think that there is a pullup or pulldown already built in to the Azure Sphere's I2C SDA and SDL lines and no need to add one to my slave device.
Any thoughts on what else to troubleshoot?
Thanks,
Sean