use the example project of lis2dh on ncs,the pin configuration of the i2c is correct,but it's can't to initialize,as follows:
Is there anything else need to configure
use the example project of lis2dh on ncs,the pin configuration of the i2c is correct,but it's can't to initialize,as follows:
Is there anything else need to configure
Hi,
Do you have a logic analyzer?
Could you take a trace of the SDA and SCL line when you try to initialize the device?
I think for some reason either the slave sends a NACK during the initialization routine, or the Master does not send the correct sequence, a trace would show us what is happening,
regards
Jared
this is the signal of sda and scl at initialization
was the command executed incorrectly during initialization?
thankyou
Hi,
That is strange, it doesn't look like I2C signals, the pins should initially be high and then SDA should go low before the SCLK line. Are you sure that you're measuring on the correct pins? Maybe the device that is connected is driving the pins somehow. Can you try to disconnect anything that is connected to the clock and data line and measure on them again?
regards
Jared