<?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>nrf52832 I2C lines fail to work on pins 20 (SDA) and 21 (SCK)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101281/nrf52832-i2c-lines-fail-to-work-on-pins-20-sda-and-21-sck</link><description>Using NCS v2.3.0 
 Boards: 
 nrf52dk-nrf52832 
 Custom board with 317030213 BLE module (uses nrf52832) 
 
 I wrote code to use I2C to interface with a GPIO Expander (MCP23008). Working with the dev-kit and picking I2C pins i got nice looking results for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Jun 2023 07:43:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101281/nrf52832-i2c-lines-fail-to-work-on-pins-20-sda-and-21-sck" /><item><title>RE: nrf52832 I2C lines fail to work on pins 20 (SDA) and 21 (SCK)</title><link>https://devzone.nordicsemi.com/thread/433606?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 07:43:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba5b2f40-17ed-4fe2-926d-5fdb631de86b</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m happy to hear that you were able to resolve the case and returned with the solution, it&amp;#39;ll make it easier for others that struggle with the same issue,&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 I2C lines fail to work on pins 20 (SDA) and 21 (SCK)</title><link>https://devzone.nordicsemi.com/thread/433502?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2023 14:46:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51239f51-75c1-4e7b-927e-cfd3a10b188d</guid><dc:creator>Caver110</dc:creator><description>&lt;p&gt;Solved the issue! Your tests pointed me in the right direction; The issue was in vscode and was solved by adding&amp;nbsp;&lt;span&gt;&amp;quot;softreset&amp;quot; : true to the flash settings. Below are the steps i performed while&amp;nbsp;working to a solution.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is the output running the lines you suggested. It appears pin 21 is still allocated as the reset pin so this is likely the issue (not i2c stuff)&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1687959187290v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I used nrf Connect for Desktop Programmer and erased the whole board. PSELRESET registers reset properly.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1687959878403v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I placed an extra line of&amp;nbsp;CONFIG_GPIO_AS_PINRESET=n in my proj.conf (just to ensure that it is set to &amp;quot;n&amp;quot; in the build)&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1687960331152v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Ran a pristine build, flashed my board and then re-ran the PSELRESET memory read. Still being allocated as reset pin&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1687960611211v4.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I was able to find another ticket now that i knew it was specifically a reset pin issue. Ticket =&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/100486/reset-pin-as-gpio"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/100486/reset-pin-as-gpio&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Glen M&amp;nbsp;suggested to visit&amp;nbsp;&amp;nbsp;&lt;a id="" href="https://nrfconnect.github.io/vscode-nrf-connect/guides/build_bind_tasks.html"&gt;https://nrfconnect.github.io/vscode-nrf-connect/guides/build_bind_tasks.html&lt;/a&gt;&amp;nbsp;and add &amp;quot;softreset&amp;quot; : true to the settings.json file (I set it in the workspace.json as well).&lt;/p&gt;
&lt;p&gt;PSELRESET registers AFTER building and flashing board. Reset button no longer reseting code on devkit (good).&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1687962530250v5.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I2C now working on P20 and P21. I can find the GPIO expander on the bus and it is responding to&amp;nbsp;messages.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1687963396781v1.jpeg" alt=" " /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1687963404262v2.jpeg" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 I2C lines fail to work on pins 20 (SDA) and 21 (SCK)</title><link>https://devzone.nordicsemi.com/thread/433420?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2023 10:44:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0f192b3-2211-4faf-867b-f6d5697a5698</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi there,&lt;/p&gt;
&lt;p&gt;Could you just double check that the GPIO peripheral indeed have access to the P0.21 and that it isn&amp;#39;t allocated to the RESET circuitry? You can do that by reading out the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uicr.html?cp=5_2_0_13_0_59#register.PSELRESET-0"&gt;PSELRESET[n]&lt;/a&gt;&amp;nbsp;registers after flashing your application, you can use nRF Command Line Tools to read it out, like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog --memrd 0x10001200


nrfjprog --memrd 0x10001204&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also, have you tried to just change P0.21 to something else and see if it works?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>