On doing i2cscan() my board running on zephyr port of Micropython does not return address of slave.I have enabled I2C and SPI in the _defconfig file.Do I have to make changes in the .dts file? Can someone please help.
The link to my boards dts file is :https://github.com/jadonk/beagle_connec ... reedom.dts
I have also enabled hardware drivers on my board like this https://github.com/micropython/micropyt ... _k64f.conf and flashed application firmware again on my board.
Can someone please help.Thank you very much!!
I2C.scan() not returning slave addresses
Re: I2C.scan() not returning slave addresses
Also had a very basic doubt around this, if i2c.scan() just returns [] in my case(even after connecting sensor), does it mean I can't get sensor data using the i2c bus?
Re: I2C.scan() not returning slave addresses
If it just return the empty list, then there is no connection to the I2C device, and you will not be able to use it. Check the cables, pull_up resistors, etc,
Re: I2C.scan() not returning slave addresses
Thanks for reply Robert,
However I am using click boards, and my microcontroller board has a MickroBus connector on it.You can see the photo here:https://github.com/Yadnik1/zephyr/blob/ ... eedom.jpeg
I also tried connecting the click board to TI cc1352r launchxl and checked the connections thoroughly but I am faced a same issue.I strongly believe it is could be a software issue.
It would be very helpful if you could please guide me with this.
Thank you very much!!
However I am using click boards, and my microcontroller board has a MickroBus connector on it.You can see the photo here:https://github.com/Yadnik1/zephyr/blob/ ... eedom.jpeg
I also tried connecting the click board to TI cc1352r launchxl and checked the connections thoroughly but I am faced a same issue.I strongly believe it is could be a software issue.
It would be very helpful if you could please guide me with this.
Thank you very much!!
Re: I2C.scan() not returning slave addresses
I have been using the zephyr port of Micropython and have tried making changes to the defconfig file by enabling the hardware drivers (eg CONFIG_I2C=y) and also enabled hardware features in the boards folder to MicroPython application firmware like this: https://github.com/micropython/micropyt ... edom board.
Re: I2C.scan() not returning slave addresses
I cannot help you with these boards or Zephyr. The only thing obvious from the error messages is, that the I2C device is not connected, whether the culprit is hardware or software.
Re: I2C.scan() not returning slave addresses
Thank you very much for your help Robert,
I'll ask the Zephyr folks and share my findings here for future references.
I'll ask the Zephyr folks and share my findings here for future references.
-
- Posts: 363
- Joined: Sun Apr 17, 2016 1:55 pm
Re: I2C.scan() not returning slave addresses
In micropython I2C default clock speed is 400K (fast mode), so if your I2C device only support 100k speed (normal mode), it will not return.
You may change I2C speed and try again.
You may change I2C speed and try again.