Using I2C bus with mbed-os 5.3
- This topic has 5 replies, 4 voices, and was last updated 7 years, 11 months ago by Sudhir Kshirsagar.
-
AuthorPosts
-
December 21, 2016 at 11:44 am #16125Yusuf GorenParticipant
I’m trying to migrate the codes I have for mDot to the new mbed setup using mbed-cli (using the offline toolchains). I saw some posts referring to I2C bus problems with mbed-os v5.1.5 but I realized that the latest branch is 5.3 now. Could you tell me if I2C is operational on 5.3 or if I should revert back to 5.1.x?
Also, mbed-cli looks neat with source controls and packages but I couldn’t find any documents about where to put the main source code for the project (For the previous offline setup, I had added new libraries (as tests) and modified the Python code (./workspace_tools/tests.py) to accommodate these). Could you guide me on this too?
Thanks a lot!
December 21, 2016 at 11:51 am #16126Mike FioreBlockedYusuf,
We’re not aware of any I2C issues with mbed-os 5.3, but we also haven’t done much testing with that release yet. Please let us know how it goes if you try it out.
The mbed-cli documentation can be found on GitHub:
https://github.com/ARMmbed/mbed-cli
Cheers,
Mike
December 21, 2016 at 12:06 pm #16127Leon LindenfelserModeratorHi Yusuf,
As far as I know, only mbed-os version 5.1.5 has the I2C problem. If you are using libmDot-mbed5, then roll back to 5.1.4. In the commit messages of the following page, you will see that we built against mbed-os version 5.1.5 but 5.1.4 will work too.
https://developer.mbed.org/teams/MultiTech/code/libmDot-mbed5/shortlog
If you are using libmDot-dev-mbed5, it is recommended that you coordinate the mbed-os version as shown in the commit message but you can try mbed-os version 5.3 if you want.
https://developer.mbed.org/teams/MultiTech/code/libmDot-dev-mbed5/shortlogWhen you create a project using mbed-cli, for instance
, mbed-os will be a sub-directory of . You will also want libmDot-mbed5 or libmDot-dev-mbed5 as a sub-directory of . Your application should be inside in whatever structure you organize it into.
https://github.com/ARMmbed/mbed-cli#introductionKind regards,
LeonDecember 21, 2016 at 7:43 pm #16130Sudhir KshirsagarParticipantWe couldn’t get 5.3.1 to work properly with I2C. We have a working example in mbed2. We removed the mbed and added mbed-os. We get funky values back.
December 27, 2016 at 8:51 am #16143Leon LindenfelserModeratorHi Sudhir,
Have you tried the library version with the recommended mbed-os version according to the commit messages…
https://developer.mbed.org/teams/MultiTech/code/libmDot-mbed5/shortlog
https://developer.mbed.org/teams/MultiTech/code/libmDot-dev-mbed5/shortlog
As stated above, when using the I2C, 5.1.4 not 5.1.5 should be used where the commit message indicates 5.1.5.Kind regards,
LeonDecember 28, 2016 at 5:31 pm #16160Sudhir KshirsagarParticipantHi Leon,
We are not using the libmDot at all for that testing. Just took the working BME280_hello sample from Mbed. Tested it. Worked find. Deleted mBed and added mBed-os (several versions). One of them returned data but the values were bad.
We are using the Sparkfun BME280 breakout that has built-in pullups. If you can get hold of one, it will be a good test case.
-Sudhir -
AuthorPosts
- You must be logged in to reply to this topic.