element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Azure Sphere Starter Kit
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Azure Sphere Starter Kit
  • More
  • Cancel
Azure Sphere Starter Kit
Forum Problem Adding Additional I2C Slaves to Azure Sphere
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Azure Sphere Starter Kit to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 18 replies
  • Subscribers 48 subscribers
  • Views 1611 views
  • Users 0 members are here
  • azure sphere kit
  • azurespherech
  • azure sphere
  • azuresphkt
  • azure sphere starter kit
Related

Problem Adding Additional I2C Slaves to Azure Sphere

Sean_Miller
Sean_Miller over 6 years ago

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

  • Sign in to reply
  • Cancel

Top Replies

  • peterfenn
    peterfenn over 6 years ago in reply to Sean_Miller +4
    Sean According to the TFmini I2C datasheet, the maximum rate for the I2C clock is 400 kbps. I recommend reducing the Azure Sphere I2C setting from 1MHz to 400 kbps to accommodate this. Change line 210…
  • peterfenn
    peterfenn over 6 years ago in reply to Sean_Miller +4
    Sean Two observations: 1) According to the definition of that I2CMaster_Write() function, this returns number of bytes successfully written, or -1 for failure 2) I'd suggest that your my_reset_value be…
  • peterfenn
    peterfenn over 6 years ago in reply to Sean_Miller +4
    Sean For that read data command you were originally trying to send, I'd recommend using the I2CMaster_WriteThenRead() command The format of this command is: ssize_t I2CMaster_WriteThenRead(int fd, I2C_DeviceAddress…
Parents
  • mfetting
    mfetting over 6 years ago

    I believe the grove sensors have a pullup resistor.  Do not know if is required on the Avnet Azure Sphere. 

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • mfetting
    mfetting over 6 years ago

    I believe the grove sensors have a pullup resistor.  Do not know if is required on the Avnet Azure Sphere. 

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube