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
Could you please also post the complete log file?
a_beacon.zipthe version of ncs is v2.2.0。only use the lis2dh application,can't Initial start with no log,add the lis2dh device to beacon application,found the i2c error.
the board is dwm1001 dev,The pin has been configured as follows:
prj.conf:
.dts:
main.c:
the rttlog:
does the project have a log saved during debugging?
i use the nRF5_SDK_16.0.0 to control the lis2dh and it's normal
thank you
Hi,
Ok, so you're not able to run the unmodified lis2dh sample on your board?
Have you checked the log? What error message do you get?
regards
Jared
where is the debug log?this is the error message:
Hi,
Have you modified the pins that the sample is using? Can you share the schematic of the module that you're using?
regards
Jared
the i2c pins' schematic as follows
Hi,
The schematics shows that you're using P0.28 and P0.29 but the unmodified sample use P0.26 and P0.27. Did you modify the sample to fit your board? Can you share the dts file that you're using, and preferably your build folder as well?
regards
Jared
Hi,
The schematics shows that you're using P0.28 and P0.29 but the unmodified sample use P0.26 and P0.27. Did you modify the sample to fit your board? Can you share the dts file that you're using, and preferably your build folder as well?
regards
Jared
the i2c of sample is using p0.28 and p0.29,Is this configuration of i2c not in effect?thank you
Hi,
Yes with your custom dtsi and dts it would use P0.28 and P0.29, but using the standard nRF52832 LIS2DH sample I think it should use P0.26 and P0.27,
Either way, can you flash your custom code and try to read out the GPIO_PIN_CNF[n] for P0.28 and P0.29?
You can use nRF Command Line Tools for this:
Like this:
//For P0.28 nrfjprog --memrd 0x50000770 //For P0.29 nrfjprog --memrd 0x50000774
regards
Jared
with debug at main,configuration is as follows,the i2c pins are correct
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