<?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>Nicla Sense ME (nRF52832) I2C0 and UART not working as expected when used simultaneously</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94663/nicla-sense-me-nrf52832-i2c0-and-uart-not-working-as-expected-when-used-simultaneously</link><description>Hello All, 
 The i2c0 interface is being used for led and PMIC. If I disable PMIC driver, and UART and led works fine. 
 But both led and PMIC driver enabled, the UART has issue: that is the TX/RX through put is badly affected. 
 Is there any imitation</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Jan 2023 10:27:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94663/nicla-sense-me-nrf52832-i2c0-and-uart-not-working-as-expected-when-used-simultaneously" /><item><title>RE: Nicla Sense ME (nRF52832) I2C0 and UART not working as expected when used simultaneously</title><link>https://devzone.nordicsemi.com/thread/403143?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 10:27:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b12381e7-1317-4f77-91c4-c462143951bb</guid><dc:creator>ijf1</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;That worked. Given higher priority for uart and lowered the timer priority of i2c transaction as well.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Ijaz&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nicla Sense ME (nRF52832) I2C0 and UART not working as expected when used simultaneously</title><link>https://devzone.nordicsemi.com/thread/400630?ContentTypeID=1</link><pubDate>Wed, 14 Dec 2022 13:14:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d799e509-beac-49a8-bafd-fec2252fc050</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for adding this information.&amp;nbsp;&lt;/p&gt;
[quote user="ijf1"]I shall try changing the IRQ priority of UART.[/quote]
&lt;p&gt;Let me know if this changes anything at all. If not, I&amp;#39;ll continue to look into your issue!&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nicla Sense ME (nRF52832) I2C0 and UART not working as expected when used simultaneously</title><link>https://devzone.nordicsemi.com/thread/400278?ContentTypeID=1</link><pubDate>Tue, 13 Dec 2022 04:30:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ef457c6-e80a-44bb-867c-d9b0652513ed</guid><dc:creator>ijf1</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It&amp;#39;s a custom board with the nRF52832 chip: &amp;quot;&lt;strong&gt;Arduino&amp;reg; Nicla Sense ME&lt;/strong&gt;&amp;quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PMIC register reading via I2C is done every 1 second to prevent watchdog reset. A periodic timer is being configured for the same, with nrfx timer default config IRQ priority (3). Our application uses 3 TWI instance for timer configuration. All 3 have same priority. We have tried configuring different priority for the TWI instances. But it does not seem to have any impact. &lt;strong&gt;The UART, running in application with lowest interrupt level.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;UART INIT:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;APP_UART_FIFO_INIT(&amp;amp;comm_params,&lt;br /&gt; UART_RX_BUF_SIZE,&lt;br /&gt; UART_TX_BUF_SIZE,&lt;br /&gt; uart_error_handle_nicla,&lt;br /&gt; APP_IRQ_PRIORITY_LOWEST,&lt;br /&gt; err_code);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The i2c transaction is implemented via &amp;quot;&lt;strong&gt;nrfx_twim_xfer&amp;quot; &lt;/strong&gt;API, which is being called periodically via 1 second timer event handler.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I shall try changing the IRQ priority of UART.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Ijas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nicla Sense ME (nRF52832) I2C0 and UART not working as expected when used simultaneously</title><link>https://devzone.nordicsemi.com/thread/400098?ContentTypeID=1</link><pubDate>Mon, 12 Dec 2022 10:20:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0479007-ae18-456d-838f-cb58bf0e397f</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This configuration should be fine, but it might cause issues on a nRF52832DK.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp;Can you verify if you&amp;#39;re using a nRF52832DK or if you&amp;#39;re using a custom board with the nRF52832 chip?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;#39;re using a DK, then P0.15-P0.16 and P0.20 are used for buttons and LEDs on the board, and might cause issues if BSP is used in the application.&lt;/p&gt;
[quote user="ijf1"]The PMIC module has a watchdog timer, that reset by any transaction by the host using the I2C interface. So to prevent watchdog reset, our application does i2c transaction every 1 second.[/quote]
&lt;ul&gt;
&lt;li&gt;How many i2c transactions are you doing to prevent the watchdog reset?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If its a low number such as 1 each second it should not affect the UART, but that might depend on how you&amp;#39;ve written the code. If TWI has higher/same priority that UART, and you&amp;#39;re stuck processing within the TWI interrupt handler, then this will block the UART.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How have you implemented the transaction? Is it an interrupt that takes the CPU away from other processes such as the UART, or is the UART allowed to finish their transaction before yielding the CPU? If it is neither, could you elaborate what you&amp;#39;re doing?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nicla Sense ME (nRF52832) I2C0 and UART not working as expected when used simultaneously</title><link>https://devzone.nordicsemi.com/thread/399814?ContentTypeID=1</link><pubDate>Fri, 09 Dec 2022 05:33:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99d8359b-14d2-451b-b4af-859bb6db490b</guid><dc:creator>ijf1</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;I am using &amp;quot;nRF5 SDK v17.1.0&amp;quot;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I use&amp;nbsp;TWI master driver instance, &amp;quot;TWIM0_INSTANCE&amp;nbsp;&amp;quot; for i2c0. The PMIC and LED uses i2c0 for communications:&lt;/p&gt;
&lt;p&gt;(SDA0 -&amp;gt; P0.15 &lt;strong&gt;&amp;amp;&lt;/strong&gt; SCL0 -&amp;gt; P0.16).&lt;/p&gt;
&lt;p&gt;And for UART: RX -&amp;gt;P9 &lt;strong&gt;&amp;amp;&lt;/strong&gt; TX-&amp;gt;P20.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The PMIC module has a watchdog timer, that reset by any transaction by the host using the I2C interface. So to prevent watchdog reset, our application does i2c transaction every 1 second. If I disable this part of the code, the TX/RX works as expected for higher payloads.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please let me know if you need any further information.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Ijaz&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nicla Sense ME (nRF52832) I2C0 and UART not working as expected when used simultaneously</title><link>https://devzone.nordicsemi.com/thread/399671?ContentTypeID=1</link><pubDate>Thu, 08 Dec 2022 13:04:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36915dd4-1e58-4dff-9d6c-c3a852e61f7a</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Could you verify which SDK you&amp;#39;re working with? I see that the tag states that you&amp;#39;re working with nRF5 SDK, but &amp;quot;i2c0 makes me think that you might be using nRF Connect SDK? Or do you mean that you&amp;#39;re using the TWIM0 instance from the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fmemory.html&amp;amp;cp=4_2_0_7_3&amp;amp;anchor=topic"&gt;instantation matrix&lt;/a&gt;?&lt;/li&gt;
&lt;li&gt;There should not be any limitations w.r.t. your configuration unless you&amp;#39;re using the same pins for all of the communication. Could you state which pins you&amp;#39;re using for what?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>