Return to site

Wire h library download

broken image
broken image

I’m not absolutely sure why LeafLabs (who wrote all the original code, for their Maple products), chose to go with a software solution, (someone may be able to give us a definitive answer), but my understanding was that programming for the Hardware I2C is problematic, and there may even be bugs in the STM32 chips themselves with the hardware I2C features. Only one change was required to the original Wire version (written by LeafLabs), which was to fix an issue where it would not work with the I2C scanner With direct GPIO access the speed could easily be increased beyond 400kbps, however at the moment, no one has requested this, or looked into speeding up Wire. The default speed is 250kbps, and the fastest that can be achieved by minor changes to the Wire library somewhere under 400kbps. The advantage of a software approach is that Wire can be run on any GPIO pins on the board (that are not used for other specific purposes e.g. The version of Wire that is currently used, is software / “big banged”, and doesn’t use the hardware I2C features of the STM32

The Wire (I2C) library is part of the Arduino STM32 files download, as it is almost a core part of the Arduino suite of libraries