<?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>IOError: [Errno 9] Bad file descriptor (Multi-threaded SPI Issue)</title><link>/members-area/personalblogs/b/blog/posts/ioerror-errno-9-bad-file-descriptor-multi-threaded-spi-issue</link><description>In my case this error was occurring due to multi-threaded accesses to a MCP23S17 I/O expander and an MCP3008 ADC analog to digital converter. Errors looked like: File &amp;quot;/home/pi/RWPi/PDALib.py&amp;quot;, line 324, in writeDior = spi.xfer([0x40,reg,v...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: IOError: [Errno 9] Bad file descriptor (Multi-threaded SPI Issue)</title><link>https://community.element14.com/members-area/personalblogs/b/blog/posts/ioerror-errno-9-bad-file-descriptor-multi-threaded-spi-issue</link><pubDate>Mon, 04 Jul 2016 21:12:29 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:3e51944d-6837-46ae-b16e-c1346bb26f7b</guid><dc:creator>clem57</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;So the events were overlapping and therefore not being serviced soon enough. Lessons learned.&lt;/p&gt;&lt;p&gt;C&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=21761&amp;AppID=293&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>