<?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>Invalid pins number</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92053/invalid-pins-number</link><description>Hello, 
 
 I&amp;#39;m currently developing with a nrf52832 (QFABB0) and I have to use pins 16,38,37 and 17 as gpio. 
 
 The problem is that when I have an error for pins greater than 32: 
 
 
 I cannot find anything to change the pin count to 48 (the number</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 20 Sep 2022 07:26:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92053/invalid-pins-number" /><item><title>RE: Invalid pins number</title><link>https://devzone.nordicsemi.com/thread/386996?ContentTypeID=1</link><pubDate>Tue, 20 Sep 2022 07:26:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2240b83b-4018-4181-8f7c-0d3994053a4c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The pin numbers on the pin 48 does not mean that it translates to 48 GPIOs.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you seen the layout of the package to see which pin numbers on the package are mapped to which GPIO and other resources?&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:260px;max-width:218px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/436x520/__key/communityserver-discussions-components-files/4/pastedimage1663658791987v2.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid pins number</title><link>https://devzone.nordicsemi.com/thread/386754?ContentTypeID=1</link><pubDate>Sun, 18 Sep 2022 16:48:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f486998c-1c26-469b-b9a6-a66cd146eefb</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Seems like there is no direct supported variant from us for that chip version. I will try to patch the files and attach here tomorrow. Thanks for your patience.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid pins number</title><link>https://devzone.nordicsemi.com/thread/386700?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2022 14:58:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63faced2-99de-4a1c-a759-09c36a4cab0a</guid><dc:creator>Manpo</dc:creator><description>&lt;p&gt;Yes, I have counted the pins on the chip and there is 48 pins.&lt;/p&gt;
&lt;p&gt;Is there another way of fixing the problem ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid pins number</title><link>https://devzone.nordicsemi.com/thread/386699?ContentTypeID=1</link><pubDate>Thu, 15 Sep 2022 10:00:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da319a11-6b52-4375-a892-a41ce92df18f</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="Aryan"]I am not sure if that revision chip have 48 gpio pins, but if you think they do,[/quote]
&lt;p&gt;Are you sure that the nrf52832 revision you are using have 48 gpios? I cannot see that any version of nrf52832 have more than one port (32 gpios).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid pins number</title><link>https://devzone.nordicsemi.com/thread/386698?ContentTypeID=1</link><pubDate>Fri, 09 Sep 2022 13:07:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:505d12a3-6dfc-448c-bca1-87098401a535</guid><dc:creator>Manpo</dc:creator><description>&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried to replace GPIO_COUNT to 2 in the file &lt;em&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);color:rgba(0, 0, 0, 1);"&gt;nRF5_SDK_15.3.0_59ac345/modules/nrfx/mdk/nrf52832_peripherals.h.&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);color:rgba(0, 0, 0, 1);"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);color:rgba(0, 0, 0, 1);"&gt;But I have another error:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);color:rgba(0, 0, 0, 1);"&gt;&lt;pre class="ui-code" data-mode="text"&gt;In file included from ../nRF5_SDK_15.3.0_59ac345/components/libraries/util/sdk_macros.h:52,
                 from ../nRF5_SDK_15.3.0_59ac345/components/libraries/util/sdk_common.h:62,
                 from ../nRF5_SDK_15.3.0_59ac345/components/libraries/button/app_button.c:40:
../nRF5_SDK_15.3.0_59ac345/modules/nrfx/hal/nrf_gpio.h: In function &amp;#39;nrf_gpio_pin_port_decode&amp;#39;:
../nRF5_SDK_15.3.0_59ac345/modules/nrfx/hal/nrf_gpio.h:65:38: error: &amp;#39;P1_PIN_NUM&amp;#39; undeclared (first use in this function); did you mean &amp;#39;P0_PIN_NUM&amp;#39;?
   65 | #define NUMBER_OF_PINS (P0_PIN_NUM + P1_PIN_NUM)
      |                                      ^~~~~~~~~~
../nRF5_SDK_15.3.0_59ac345/components/libraries/util/nrf_assert.h:106:9: note: in definition of macro &amp;#39;ASSERT&amp;#39;
  106 |     if (expr)                                                                 \
      |         ^~~~
../nRF5_SDK_15.3.0_59ac345/modules/nrfx/hal/nrf_gpio.h:486:5: note: in expansion of macro &amp;#39;NRFX_ASSERT&amp;#39;
  486 |     NRFX_ASSERT(*p_pin &amp;lt; NUMBER_OF_PINS);
      |     ^~~~~~~~~~~
../nRF5_SDK_15.3.0_59ac345/modules/nrfx/hal/nrf_gpio.h:486:26: note: in expansion of macro &amp;#39;NUMBER_OF_PINS&amp;#39;
  486 |     NRFX_ASSERT(*p_pin &amp;lt; NUMBER_OF_PINS);
      |                          ^~~~~~~~~~~~~~
../nRF5_SDK_15.3.0_59ac345/modules/nrfx/hal/nrf_gpio.h:65:38: note: each undeclared identifier is reported only once for each function it appears in
   65 | #define NUMBER_OF_PINS (P0_PIN_NUM + P1_PIN_NUM)
      |                                      ^~~~~~~~~~
../nRF5_SDK_15.3.0_59ac345/components/libraries/util/nrf_assert.h:106:9: note: in definition of macro &amp;#39;ASSERT&amp;#39;
  106 |     if (expr)                                                                 \
      |         ^~~~
../nRF5_SDK_15.3.0_59ac345/modules/nrfx/hal/nrf_gpio.h:486:5: note: in expansion of macro &amp;#39;NRFX_ASSERT&amp;#39;
  486 |     NRFX_ASSERT(*p_pin &amp;lt; NUMBER_OF_PINS);
      |     ^~~~~~~~~~~
../nRF5_SDK_15.3.0_59ac345/modules/nrfx/hal/nrf_gpio.h:486:26: note: in expansion of macro &amp;#39;NUMBER_OF_PINS&amp;#39;
  486 |     NRFX_ASSERT(*p_pin &amp;lt; NUMBER_OF_PINS);
      |                          ^~~~~~~~~~~~~~
In file included from ../nRF5_SDK_15.3.0_59ac345/components/libraries/button/app_button.h:70,
                 from ../nRF5_SDK_15.3.0_59ac345/components/libraries/button/app_button.c:42:
../nRF5_SDK_15.3.0_59ac345/modules/nrfx/hal/nrf_gpio.h:497:16: error: &amp;#39;NRF_P1&amp;#39; undeclared (first use in this function); did you mean &amp;#39;NRF_P0&amp;#39;?
  497 |         return NRF_P1;
      |                ^~~~~~
      |                NRF_P0
In file included from ../nRF5_SDK_15.3.0_59ac345/components/libraries/button/app_button.h:70,
                 from ../nRF5_SDK_15.3.0_59ac345/components/libraries/button/app_button.c:42:
../nRF5_SDK_15.3.0_59ac345/modules/nrfx/hal/nrf_gpio.h: In function &amp;#39;nrf_gpio_ports_read&amp;#39;:
../nRF5_SDK_15.3.0_59ac345/modules/nrfx/hal/nrf_gpio.h:66:33: error: &amp;#39;NRF_P1&amp;#39; undeclared (first use in this function); did you mean &amp;#39;NRF_P0&amp;#39;?
   66 | #define GPIO_REG_LIST  {NRF_P0, NRF_P1}
      |                                 ^~~~~~
../nRF5_SDK_15.3.0_59ac345/modules/nrfx/hal/nrf_gpio.h:788:45: note: in expansion of macro &amp;#39;GPIO_REG_LIST&amp;#39;
  788 |     NRF_GPIO_Type * gpio_regs[GPIO_COUNT] = GPIO_REG_LIST;
      |                                             ^~~~~~~~~~~~~
../nRF5_SDK_15.3.0_59ac345/modules/nrfx/hal/nrf_gpio.h: In function &amp;#39;nrf_gpio_latches_read&amp;#39;:
../nRF5_SDK_15.3.0_59ac345/modules/nrfx/hal/nrf_gpio.h:66:33: error: &amp;#39;NRF_P1&amp;#39; undeclared (first use in this function); did you mean &amp;#39;NRF_P0&amp;#39;?
   66 | #define GPIO_REG_LIST  {NRF_P0, NRF_P1}
      |                                 ^~~~~~
../nRF5_SDK_15.3.0_59ac345/modules/nrfx/hal/nrf_gpio.h:804:45: note: in expansion of macro &amp;#39;GPIO_REG_LIST&amp;#39;
  804 |     NRF_GPIO_Type * gpio_regs[GPIO_COUNT] = GPIO_REG_LIST;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);color:rgba(0, 0, 0, 1);"&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;How could I fix this issue ? Should I define &lt;span style="background-color:rgba(255, 255, 255, 1);color:rgba(255, 84, 84, 1);font-weight:bold;"&gt;P1_PIN_NUM&lt;/span&gt; and &lt;span style="background-color:rgba(255, 255, 255, 1);color:rgba(255, 84, 84, 1);font-weight:bold;"&gt;NRF_P1 &lt;/span&gt;(and how to find the correct values) ? &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);color:rgba(0, 0, 0, 1);"&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);color:rgba(0, 0, 0, 1);"&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;Thank you&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid pins number</title><link>https://devzone.nordicsemi.com/thread/386697?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 16:30:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c849d63-208e-4471-af4b-ddf090940fc9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I think the problem originates for you that in your selected board files&amp;nbsp;GPIO_COUNT is still defined as 1.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am not sure if that revision chip have 48 gpio pins, but if you think they do, then try to change the&amp;nbsp;GPIO_COUNT to 2 and let the drivers fix this error for you after that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>