<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><description>Introduction 


 History 


 How is it used for GPIO? 


 Isn’t there some Stinkyness with Device Tree or Overlays? 


 How to Install the Library? 


 Running your Application 


 How Fast is it? 


 How is SPI used? 

 Adding Another SPI Interface </description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Fri, 29 Dec 2023 09:32:57 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>DiegoTagnani</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Excellent! ;-)&lt;br /&gt;I use SPI0 with CS0 P9.17 for control a ADC. It work vary well.&lt;br /&gt;I want 3 additional chip select pin using CS1=P9.15, CS2=P9.13 and CS3=P9.11. Another 3 ADC, one CS each.&lt;br /&gt;Does anyone have a solution to this problem?&lt;/p&gt;
&lt;p&gt;iolib_init();&lt;br /&gt; configure_spi_pins(17, 18, 21, 22); // CS, D1, D0, CLK //It is OK&lt;/p&gt;
&lt;p&gt;&lt;span&gt;configure_spi_pins(15, 18, 21, 22); // CS, D1, D0, CLK //It is KO&lt;/span&gt;&lt;br /&gt; if (spi_enable(SPI_BUS))&lt;br /&gt; {&lt;br /&gt; spi_ctrl(SPI_BUS, SPI_CH0, SPI_MASTER, SPI_RX, /* use SPI_TX or SPI_RXTX depending on needs */&lt;br /&gt; SPI_DIV32, SPI_CLOCKMODE3, /* 48 MHz divided by 32, SPI mode 3 */&lt;br /&gt; SPI_CE_ACT_LOW, SPI_OUTIN, 16); /* D0 is output and D1 is input, 16-bit transactions */&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;have you correct dts file?&lt;br /&gt;I need to command four identical ADCs that I have on the board, all with SPI0 and each with its Chip Select.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Mon, 20 Nov 2023 12:07:53 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>pallanti</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Nice article - very informative.&amp;nbsp;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Mon, 06 Nov 2023 19:15:17 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>someshc</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hi There! I&amp;#39;m new to embedded programming and C in general. I&amp;#39;m trying to install your library on to my Beaglebone Black Industrial loaded with the Debian 11 image and I seem to fail at the first make step.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m getting the following error:&lt;/p&gt;
&lt;p&gt;/usr/bin/ld: ./BBBio_lib//libiobb.a(BBBiolib_PWMSS.o):(.bss+0x0): multiple definition of `cm_per_addr&amp;#39;; ./BBBio_lib//libiobb.a(BBBiolib.o):(.bss+0x1c): first defined here&lt;br /&gt;collect2: error: ld returned 1 exit status&lt;br /&gt;make: *** [Makefile:83: SMOTOR] Error 1&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Any ideas on how I could get it to work?&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Thu, 27 Jan 2022 18:26:02 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>Anti_Social_Sarah</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;Hi I am a student from UCSD we are trying to get SPI input to preform FFT on real time accelerometer data for the Beagle Bone AI I was wondering if you knew if there is jitter issues when utilizing&amp;nbsp;SPI and your thoughts on PRU?&amp;nbsp;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Fri, 04 Jun 2021 06:26:39 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>carrot_</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I&amp;#39;m sure I&amp;#39;ve just missed it, but there seems no function to send multiple bytes or words per transaction.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;For example, in an older c++ library I used with Debian 8.4; I was able to place bytes into an array and send them in one function. Like this:-&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=uint8_t+writeArr%5B2%5D+%3D+%7B0x01%2C+0x01%7D%3B%0Auint8_t+readArr%5B2%5D+%3D+%7B%7D%3B%0Aspi-%3Etransfer%28writeArr%2C+readArr%2C+2%2C+100%29%3B]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Is there the same or similar ability in this library?&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Fri, 26 Feb 2021 18:41:57 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>axx</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Getting:&lt;/p&gt;&lt;p&gt;undefined reference to &amp;#39;iolibsetdir&amp;#39;&lt;/p&gt;&lt;p&gt;undefined reference to &amp;#39;pin_high&amp;#39;&lt;/p&gt;&lt;p&gt;undefined reference to &amp;#39;pin_low&amp;#39;&lt;/p&gt;&lt;p&gt;All includes are present and accounted for&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Tue, 03 Nov 2020 11:30:24 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>ajcc</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Awesome! Thanks for this write-up! &lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-45bf703a-0056-42df-8b59-fc22939f2ba4/contentimage_5F00_1.png:16:16]&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Thu, 20 Aug 2020 19:56:41 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>troyholt</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;When I compile the I2C code above and run it with sudo, I get this error:&lt;/p&gt;&lt;p&gt;i2c_write error: Remote I/O error&lt;/p&gt;&lt;p&gt;Any help would be appreciated.&lt;/p&gt;&lt;p&gt;Also,&lt;/p&gt;&lt;p&gt;Are there any plans to expand this driver to include ADC, etc?&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Sat, 11 Jul 2020 10:17:50 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>dinosaur1946</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hi Jan&lt;/p&gt;&lt;p&gt;Valid point, I have some history in EMC checking with pre-compliance equipment.&lt;/p&gt;&lt;p&gt;However, with the shape of that clock pulse I wonder if I am borderline in getting failures&lt;/p&gt;&lt;p&gt;if some event drops the voltage a few mVolts.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I will test with different resistor values to see if I can retain the nice rounding at the top&lt;/p&gt;&lt;p&gt;but a faster rise time to be over the threshold early enough.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Call it a confidence booster.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Regards&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Sat, 11 Jul 2020 03:15:13 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>dinosaur1946</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi All&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Jan I appreciate you confirming the &amp;quot;rogue&amp;quot; pulses.&lt;/p&gt;&lt;p&gt;Your Clk pulses look a lot cleaner though.&lt;/p&gt;&lt;p&gt;Those 10k resistors on the board may be bit high &amp;amp; can&amp;#39;t provide the fast rise current.&lt;/p&gt;&lt;p&gt;Although the SDA pulses don&amp;#39;t have the slow rise time and it also has 10k ??&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;After clarifying the operation and your analyses of the pulses, I now feel more confident&lt;/p&gt;&lt;p&gt;in using them on a permanent basis.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Regards&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Fri, 10 Jul 2020 00:49:04 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>dinosaur1946</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi shabaz&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;We even have that problem Australia, Perth is 3 hours behind and 4 hours during daylight saving.&lt;/p&gt;&lt;p&gt;So when I lived there , I either got calls 5 o&amp;#39;clock in the morning or had to make sure all my orders were in before lunch.&lt;/p&gt;&lt;p&gt;I now live on the beach in Hervey Bay.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The spec sheet seems to incorporate the manufacturers recommendation, which is 10k.&lt;/p&gt;&lt;p&gt;Inspecting the board (probably made by someone else) there are 2 resistors and 2 caps.&lt;/p&gt;&lt;p&gt;Resistors are marked marked 01c (10k)&lt;/p&gt;&lt;p&gt;No values printed on the caps and hard to measure.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I am glad I got the library working as it is much simpler then a lot of the alternatives that&lt;/p&gt;&lt;p&gt;seem to be dedicated to Rpi or Arduino.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The only downside is that it has to be in sudo to work, which means that I have written a small&lt;/p&gt;&lt;p&gt;program to get the date time from the computer and then write that to the RTC.&lt;/p&gt;&lt;p&gt;I don&amp;#39;t want to run my main program in sudo.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Take care.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Regards&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Thu, 09 Jul 2020 22:50:27 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>dinosaur1946</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi All&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;That explains that very well.&lt;/p&gt;&lt;p&gt;Many thanks for your help on this.&lt;/p&gt;&lt;p&gt;Still not happy with the Clock and Data waveforms, looks line the clock input on the device has a high input capacitance.&lt;/p&gt;&lt;p&gt;The Data just plain looks messy.&lt;/p&gt;&lt;p&gt;But it works, so I can now integrate it with the main package so operators can correct the Date/Time.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Once again many thanks shabaz.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Regards&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Thu, 09 Jul 2020 21:31:11 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>dinosaur1946</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi All&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;shabaz, that shows I have completely misunderstood the i2c_write command.&lt;/p&gt;&lt;p&gt;I assumed that the write would start at address 00 and put the contents of buffer location 00 in that address.&lt;/p&gt;&lt;p&gt;Then the address would increment and do the same with location 01 writing the contents of Buffer(1) into that location.&lt;/p&gt;&lt;p&gt;What you suggested works, BUT it is also a reason why my Buffer writes either didn&amp;#39;t work or were offset by one byte.&lt;/p&gt;&lt;p&gt;So to be clear the first byte in the buffer is the offset starting address and the next bytes are the data.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Perhaps I did not read your library info correctly or it was simply not mentioned.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Regards&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;EDiT: So the leading 0 (zero) I put in to solve the problem, was inadvertently supplying the Start address.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Thu, 09 Jul 2020 10:08:12 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>dinosaur1946</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi All&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Apologies for writing one comment after the other, but the apparent timezone difference (I am in Australia) means&lt;/p&gt;&lt;p&gt;there is only a small window of common time.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I can write the correct date &amp;amp; time to the chip by extending the buffer by one char.&lt;/p&gt;&lt;p&gt;The lead char becomes 0x00 then next Secs, Mins etc&lt;/p&gt;&lt;p&gt;This appears to work reliably. No mention of this in the doc&amp;#39;s.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So now I have a iolib problem.&lt;/p&gt;&lt;p&gt;I have to set a single char to a value, but none&amp;nbsp; of the three commands for writing succeeds.&lt;/p&gt;&lt;p&gt;With i2c_write I can&amp;#39;t specify an address&lt;/p&gt;&lt;p&gt;i2c_write_ignore_nack and&amp;nbsp; i2c_write_read return an Remote I/O Error (with 0x55 in return buffer)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Yet using :&lt;/p&gt;&lt;p&gt;sudo i2cset 2 0x32 0x0f 0x00&lt;/p&gt;&lt;p&gt;works.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Is there a way around this, so I can use the library without having to &amp;quot;Shell&amp;quot; out of the program.?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Regards&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: BeagleBone Black (BBB) and PocketBeagle I/O (GPIO), SPI and I2C Library for C – 2019 Edition</title><link>https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-black-bbb-and-pocketbeagle-i-o-gpio-spi-and-i2c-library-for-c-2019-edition</link><pubDate>Thu, 09 Jul 2020 03:41:28 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:45bf703a-0056-42df-8b59-fc22939f2ba4</guid><dc:creator>dinosaur1946</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hi All&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Done some tests by writing 7 bytes every 3 seconds for 50 times.&lt;/p&gt;&lt;p&gt;Each time the data was the same and each time the result as the same.&lt;/p&gt;&lt;p&gt;Wrote 0&amp;nbsp; 1&amp;nbsp; 2&amp;nbsp; 3&amp;nbsp; 4&amp;nbsp; 5&amp;nbsp; 19&lt;/p&gt;&lt;p&gt;and each time a dump showed one byte lost.&lt;/p&gt;&lt;p&gt;Result&amp;nbsp; 1&amp;nbsp; 2&amp;nbsp; 3&amp;nbsp; 4&amp;nbsp; 5 19 x&lt;/p&gt;&lt;p&gt;So byte 0 got lost.&lt;/p&gt;&lt;p&gt;The device draws 37 micro Amps&amp;nbsp; and the VDD never dropped any amount.&lt;/p&gt;&lt;p&gt;CRO results on the images.&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x349/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-45bf703a-0056-42df-8b59-fc22939f2ba4/3364.contentimage_5F00_206022.png:620:349]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;That is the SCL pin, not a very nice waveform for a clock.&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x349/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-45bf703a-0056-42df-8b59-fc22939f2ba4/1220.contentimage_5F00_206023.png:620:349]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;This is the SDA Pin which appears to have very fast 1/2 voltage data pulses and I suspect herein lies the problem.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Regards&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7611&amp;AppID=80&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>