<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.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/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>TWI interface locks up when MCLK on I2S is activated</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/95512/twi-interface-locks-up-when-mclk-on-i2s-is-activated</link><description>I have an nRF52840 design that uses I2C to communicate with a SGTL5000 CODEC as well as a U-blox SAM8 module. Once MCLK on the I2S is turned on and running, if I try and talk to the SAM-8 module, the I2C bus will lock up and require a power cycle to reset</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Jan 2023 16:26:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/95512/twi-interface-locks-up-when-mclk-on-i2s-is-activated" /><item><title>RE: TWI interface locks up when MCLK on I2S is activated</title><link>https://devzone.nordicsemi.com/thread/404172?ContentTypeID=1</link><pubDate>Tue, 10 Jan 2023 16:26:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2727f41c-6fa9-4f08-a347-43d19a97b3b3</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure how the I2S could affect that, but there is some improvements in the TWIM driver in &lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/v1.9.0/CHANGELOG.md#fixed-2"&gt;NRFX v1.8.2&lt;/a&gt;, related to bus lockup when a slave misbehaves:&lt;/p&gt;
&lt;ul dir="auto"&gt;
&lt;li&gt;Fixed an issue in the TWI driver that would make the driver stuck when a premature STOP condition was generated by a slave device. The driver now handles this situation properly and signals that a bus error occurred.&amp;quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Could you try to upgrade your SDK version (or NRFX version), to see if this fix helps with your problem? NRFX v1.8.6 was included in nRF5 SDK v17.0.2.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI interface locks up when MCLK on I2S is activated</title><link>https://devzone.nordicsemi.com/thread/404167?ContentTypeID=1</link><pubDate>Tue, 10 Jan 2023 15:44:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbc9e8c1-5de4-466d-960d-eb1f9205d3ed</guid><dc:creator>John Blackburn</dc:creator><description>&lt;p&gt;We are using SDK 15.2&lt;/p&gt;
&lt;p&gt;The I2C is on P0.14 and P0.15&lt;/p&gt;
&lt;p&gt;The I2S is on P0.20, P0.21, P0.22 and P0.23. I&amp;#39;m only using the data out since we aren&amp;#39;t using the CODEC to sample, only generate.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m also using a UART for communications with another processor and a SPI for flash. Everything else is just I/O&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve scoped the TWI lines along with the MCLK and I&amp;#39;m not seeing any noise that would explain the problem. My 16MHz MCLK is clean and my 100KHz I2C shows no sign of crosstalk or interference. I also turned on the bus translator and it is able to decode the bus without any problem&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll see if I can get a code snippet from my software guy.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI interface locks up when MCLK on I2S is activated</title><link>https://devzone.nordicsemi.com/thread/404015?ContentTypeID=1</link><pubDate>Tue, 10 Jan 2023 09:18:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:790272f0-d5fd-4679-ba14-ea25b55518f8</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Like you said, the I2S and TWI peripherals are not related or have shared resources (apart from GPIOs), so there should not be any issues using both the the same time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you post more details about your setup?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Which SDK are you using?&lt;/li&gt;
&lt;li&gt;Which GPIOs are you using for the two peripherals?&lt;/li&gt;
&lt;li&gt;Can you post your code for initializing/configuring the peripherals?&lt;/li&gt;
&lt;li&gt;Do you have other modules enabled in the application? E.g. UART/logger, BSP (buttons/LEDs), etc?&lt;/li&gt;
&lt;li&gt;Have you checked the TWI bus with a logic analyzer, to see if there are any noise/interference that can explain why this issue occurs?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>