<?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>nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77728/nrf9160-gpio-problem-on-custom-board</link><description>Shalom! 
 We have a nRF9160 custom board on which I cannot switch some of the IO lines. 
 For example we have two leds, P0.9 an P.10 but only P0.9 works. The hardware guy reports the P0.10 output does not change when I toggle the output while debugging</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Aug 2021 07:25:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77728/nrf9160-gpio-problem-on-custom-board" /><item><title>RE: nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/thread/324764?ContentTypeID=1</link><pubDate>Fri, 13 Aug 2021 07:25:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b22ed96-921a-4f27-a1c7-1ac0215c3f5c</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Good to hear! Never easy. I hope you get good help on your other issues as well!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/thread/324351?ContentTypeID=1</link><pubDate>Wed, 11 Aug 2021 05:46:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0902f2e-a29d-45c6-87b7-4c7ca45f15a4</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;After Monday&amp;#39;s&amp;nbsp;Microsoft Meeting integration session, I can report that the GPIO P0.30 &amp;amp; P0.31 problem was resolved. The custom hardware and schematic pdf had a header was numbered backwards (square pad not pin#1). I guess this was previously resolved when I added correct custom board overlays since our hardware guy had checked this. Sorry about this but thanks for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/thread/323940?ContentTypeID=1</link><pubDate>Mon, 09 Aug 2021 09:09:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1ec7a51-8230-42cb-bf01-b2b4da63c61a</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;After this morning&amp;#39;s integration session, I can report that the GPIO P0.30 &amp;amp; P0.31 problem was really a custom hardware schematic pdf error in which the header was numbered backwards. I guess this was previously resolved when I added correct custom board overlays. Sorry about this.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I also performed some current draw testing.&lt;/p&gt;
&lt;p&gt;ADC:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I left the ADC in the overlay file&amp;nbsp; &amp;quot;okay&amp;quot; but did not reference it in my code and the current was about 900ua.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I called&amp;nbsp;adc_channel_setup() and&amp;nbsp;adc_read_async() every 3 minutes and the current was about 1000ua.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I set the ADC in the overlay file &amp;quot;disabled&amp;quot; and the current was also 900ua.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The base line current was when one uart was not stopped so may be the ADC is not being disabled automatically.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Uart0 &amp;amp; Uart1:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;At startup I just disabled uart1 as below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;  //---------------------------------------------------------------------------
  // Low power
  //  When putting the system in low power and the peripheral is not needed, 
  // lowest possible power consumption is achieved by stopping, and then disabling the peripheral.
  // The STOPTX and STOPRX tasks may not be always needed (the peripheral might already be stopped), 
  // but if STOPTX and/or STOPRX is sent, software shall wait until the TXSTOPPED and/or RXTO event is received in response,
  // before disabling the peripheral through the ENABLE register.
  //---------------------------------------------------------------------------
  NRF_UARTE1_NS-&amp;gt;TASKS_STOPRX=1;
#if defined(CONFIG_UART_INTERRUPT_DRIVEN)
  while(NRF_UARTE1_NS-&amp;gt;EVENTS_RXTO == 0);
#endif
  NRF_UARTE1-&amp;gt;EVENTS_RXTO = 0;

  NRF_UARTE1_NS-&amp;gt;TASKS_STOPTX = 1;
  while(NRF_UARTE1_NS-&amp;gt;EVENTS_TXSTOPPED == 0);
  NRF_UARTE1_NS-&amp;gt;EVENTS_TXSTOPPED = 0;

  NRF_UARTE1_NS-&amp;gt;ENABLE = 0;
  NRF_UARTE1_NS-&amp;gt;PSEL.TXD = 0xFFFFFFFF;
  //---------------------------------------------------------------------------
  // Must change TXD to output low in order that BLE chip will not create a current drain
  // Clear BLE Txd P0.25  
  //---------------------------------------------------------------------------
  NRF_P0_NS-&amp;gt;OUTCLR = (1 &amp;lt;&amp;lt; 25);
  // Clear BLE Rxd P0.24  
  NRF_P0_NS-&amp;gt;OUTCLR = (1 &amp;lt;&amp;lt; 24);
  //---------------------------------------------------------------------------
  // Must change RXD to output low in order that BLE chip will not create a current drain
  //---------------------------------------------------------------------------
  ami_board_ConfigPin( AMI_BOARD_OUT_BLE_RXD,GPIO_OUTPUT_LOW);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;When after using uart0, when sleeping I did nothing, I got the 900ua baseline current.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;When after using uart0, when sleep I performed similar to the code above only for uart0, I got a 480ua to 490ua draw.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Again I use a timer that wakes the program up once a second and if nothing is needed to be done goes back to sleep.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I will open a new ticket for the current drawing issue.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If you could continue to see why it seems that not only used DSP files are being linked, I will not open a separate ticket.&lt;/p&gt;
&lt;p&gt;Thank you David&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/thread/323889?ContentTypeID=1</link><pubDate>Sun, 08 Aug 2021 11:23:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95dc1e83-d8bb-4272-bc50-913ae2d3beb6</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;Sorry I cannot find a way how to reply to Carl&amp;#39;s post below (no reply button appears).&lt;/p&gt;
&lt;p&gt;I hope to have another integration session tomorrow morning with our hardware engineer.&lt;/p&gt;
&lt;p&gt;1) Nothing I could do lets me toggle P0.30 &amp;amp; P0.31 so I will attached the zephyr tree with my files that I have have added or adjusted. I will also ask the hardware engineer to verify that there is no pbc hardware mess up.&lt;/p&gt;
&lt;p&gt;2) I will open a new support ticket on my uart problems after the integration session.&lt;/p&gt;
&lt;p&gt;I need to achieve the lowest possible current draw when sleeping when operating on batteries.&lt;/p&gt;
&lt;p&gt;We need uart0 to output debug information and be a direct serial connection for configuring the board after startup. We need uart1 to communicate in both directions when the nRF52 BLE chip is used.&lt;/p&gt;
&lt;p&gt;I have read most of the uart posts.&amp;nbsp;uart_irq_callback_set() is a static function in the uart.h header.&lt;/p&gt;
&lt;p&gt;I can call this function instead of the&amp;nbsp;uart_callback_set(0 in asynch mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Many of the posts are older and the defines used are not valid. I saw that direct&amp;nbsp;NRF_UARTE0_NS was needed to switch the uart on and off to save power. I need to know if this works only with uart interrupt and not asynch mode and what defines I need for both uart0 and uart1.&lt;/p&gt;
&lt;p&gt;3) The ADC is defined in my overlay so I understand from the previous post that it may be initialized before I call&amp;nbsp;adc_channel_setup() or&amp;nbsp;adc_read_async(). I hope to test without any ADC calls and with them.&lt;/p&gt;
&lt;p&gt;4) After adding the DSP sources, my&amp;nbsp;app_update.bin increased to&amp;nbsp;445,148 bytes.&lt;/p&gt;
&lt;p&gt;thank you very much David&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/axion_5F00_ncs_5F00_08Aug2021a.zip"&gt;devzone.nordicsemi.com/.../axion_5F00_ncs_5F00_08Aug2021a.zip&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ami_5F00_axion_5F00_08Aug2021a.zip"&gt;devzone.nordicsemi.com/.../ami_5F00_axion_5F00_08Aug2021a.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/thread/323494?ContentTypeID=1</link><pubDate>Thu, 05 Aug 2021 10:29:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6f2fcb9-d998-41bb-959b-35ddb1d9f895</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi, David!&lt;br /&gt;&lt;br /&gt;Apologies for the delayed answer. I just took over this case from Håkon, as he went on vacation. I will try to address all your questions, but I still suggest that you try to open separate tickets for separate problems. This will make it possible for more of our engineers to help you. If you have any issues opening tickets, please share the details about this to me and we&amp;#39;ll sort it out.&lt;br /&gt;&lt;br /&gt;1. Could you share an archive with the new board files so that I could have a look? As mentioned by Sebastian P0.30 and P0.31 are used by I2C_2 by default on the DK. The bootloader should not use these pins for anything. And you should not need to have any extra overlay or configuration files under the mcuboot directory. If you want to apply alternative configurations/overlays to application child images (like MCUBoot and SPM), please follow the instructions in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_multi_image.html"&gt;Multi-Image build user guide&lt;/a&gt;. A short summary:&lt;/p&gt;
&lt;p&gt;In you application directory you can add a folder called &amp;quot;child_image&amp;quot;, under this folder you can add files like spm.conf or mcuboot.conf to overlay the configurations of these child images. In addition you can add sub-folders like &amp;quot;child_image/spm&amp;quot; or &amp;quot;child_image/mcuboot&amp;quot;, where you can add .overlay files and .conf files that replaces the current child image configuration.&lt;br /&gt;&lt;br /&gt;2. Are you sure&amp;nbsp;&lt;span&gt;CONFIG_UART_ASYNC_API is set correctly. ENOTSUP should not be returned if it&amp;#39;s enabled. Could you share the &amp;quot;build/zephyr/.config&amp;quot; file so that I can verify the configuration. You can have look at &lt;a href="https://github.com/simon-iversen/sdk-nrf/tree/lpuart_using_normal_uart/samples/peripheral/lpuart"&gt;this sample&lt;/a&gt;, which is a version of the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/peripheral/lpuart/README.html"&gt;Low Power UART sample&lt;/a&gt;&amp;nbsp;modified to use the normal UART. It should demonstrate both interrupt based and callback based operation.&lt;br /&gt;&lt;br /&gt;3. I believe the UART may be your main cause of high current consumption. It&amp;#39;s known to use about 600µA. I suggest looking into the Low Power UART (mentioned above) to reduce current consumption. It also helps shutting down the UART when not in use (you&amp;#39;re already doing that, maybe?). &lt;span style="text-decoration:line-through;"&gt;I must get back to you on shutting down the ADC.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;Edit: got back from a colleague that when using the ADC driver it should handle power management automatically. Can you verify that the power consumption is higher when the ADC is on?&lt;span&gt;&lt;br /&gt;&lt;br /&gt;4. I need to ask about this internally, but I guess unused functions won&amp;#39;t be included.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/thread/323427?ContentTypeID=1</link><pubDate>Thu, 05 Aug 2021 03:56:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfa8fce5-ae53-4bb4-bdb7-7d4b68d11439</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;Could anyone help with this?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/thread/323016?ContentTypeID=1</link><pubDate>Tue, 03 Aug 2021 08:26:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e3a8258-76eb-4bec-b4fe-1b0022f4110b</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;Here is a list of my open problems that I need help on. When I previously tried to open a post for each subject the forum did not handle it well, only the last post.&lt;/p&gt;
&lt;p&gt;I am using the latest v1.6.1 IDE.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;1) &lt;strong&gt;IO pins P0.30 P.31 I still cannot switch.&lt;/strong&gt;&lt;br /&gt;&amp;nbsp; I Duplicated the nrf9160dk_nrf9160 under a new name and changed things to our custom hardware.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; I select this new board from the SES make menu.&lt;br /&gt;&amp;nbsp; P0.30 &amp;amp; P0.31 do not appear anywhere in the folder but it seems like a conflict somewhere.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;strong&gt;Perhaps they appear in the bootloader?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; In the C:\ncs\v1.6.1\bootloader\mcuboot\boot\zephyr\boards directory I put a board.overlay file and a board.conf file. Maybe I do not need them or have the definitions wrong.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp; The board.overlay file has only uart0&amp;#39;s definition.&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;uart0 {&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;status = &amp;quot;okay&amp;quot;;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;tx-pin = &amp;lt;1&amp;gt;;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;rx-pin = &amp;lt;0&amp;gt;;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;rts-pin = &amp;lt;0xFFFFFFFF&amp;gt;;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cts-pin = &amp;lt;0xFFFFFFFF&amp;gt;;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;spm_uart: nrf-spm-uart {&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;compatible = &amp;quot;nordic,nrf-spm-uart&amp;quot;;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;status = &amp;quot;okay&amp;quot;;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;label = &amp;quot;SPM_UART&amp;quot;;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;};&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;};&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; The board board.conf file:&lt;br /&gt;&lt;em&gt;&amp;nbsp; # Disable Zephyr console&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CONFIG_CONSOLE=n&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CONFIG_CONSOLE_HANDLER=n&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CONFIG_UART_CONSOLE=n&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;# Multithreading&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CONFIG_MULTITHREADING=y&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;# MCUBoot settings&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;#CONFIG_BOOT_MAX_IMG_SECTORS=256&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;# MCUboot serial recovery&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CONFIG_MCUBOOT_SERIAL=n&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;#CONFIG_BOOT_SERIAL_DETECT_PORT=&amp;quot;GPIO_0&amp;quot;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;#CONFIG_BOOT_SERIAL_DETECT_PIN=12&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;#CONFIG_BOOT_SERIAL_DETECT_PIN_VAL=0&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;#CONFIG_BOOT_SERIAL_DETECT_DELAY=450&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;#CONFIG_MCUBOOT_INDICATION_LED=y&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;# Size of mcuboot partition&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONFIG_SIZE_OPTIMIZATIONS=y&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;2&lt;strong&gt;) UART callback cannot be set when using the usart interrupt define so I can shut down the uart.&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONFIG_UART_ASYNC_API=y&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONFIG_UART_NRFX=y&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONFIG_UART_INTERRUPT_DRIVEN=y&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uart_callback_set() returns -ENOTSUP. so I cannot use the callback to read incoming bytes using the callback.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If I define both only async and not interrupt the while(NRF_UARTE1_NS-&amp;gt;EVENTS_RXTO == 0); hangs.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;How do I get around this?&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; How can I read incoming bytes without the callback? Is there an example?&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I use uart0 for debug and direct serial configuration and uart1 to the nRF52 chip on our board.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;3)&lt;strong&gt; Shutdown modules when sleeping to conserve current draw.&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;I have on I2C#2 an EEPROM and a temperature chip.&lt;br /&gt;&amp;nbsp;I have on SPI#3 an external flash and a LSM6DSL sensor chip.&lt;br /&gt;&amp;nbsp;I use uart0 &amp;amp; uart1.&lt;br /&gt;&amp;nbsp;I use the ADC.&lt;br /&gt;&amp;nbsp;A timer set at 1sec wakes the board up from sleep after inital startup and TCP server connection.&lt;br /&gt;&amp;nbsp;I shutdown the modem calling lte_lc_deinit() since the management will use a global roaming SIM and does not want to use cellular network dependent stuff.&lt;br /&gt;&amp;nbsp;Every so many minutes the board acquires sensor samples and then goes back to sleep.&lt;br /&gt;&amp;nbsp;At configured times these samples will be uploaded to the server (TCP connection, upload, disconnection).&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;I tried using the pm_device_state_set() to turn off the high level drivers (EEPROM,Temp,LSM6DSL) but dev-&amp;gt;pm_control == NULL.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;I then tried using the pm_device_state_set() to switch on and off the SPI and I2C buses.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;I understand that there is a way to switch off the ADC so that the high speed clock will be turned off.&lt;br /&gt;&amp;nbsp;I could not figure out how to disable the ADC. I currently use the adc_read_async() function which is non blocking,&lt;br /&gt;&amp;nbsp;but I guess I could use a worker thread with the blocking function. &lt;strong&gt;Is there an updated example how to shutdown the ADC?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;The board&amp;#39;s current is 590ua now.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;4)&lt;strong&gt; DSP files added and not used&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;We need the CMSIS libraries and it seems to work but adds a ton of functions that are not even called.&lt;br /&gt;&amp;nbsp;&lt;strong&gt;Is there a way that the linker will remove them or should I just select all of the files I need in a new directory (bad I know).&lt;/strong&gt;&lt;br /&gt;&amp;nbsp; CONFIG_CMSIS_DSP=y&lt;br /&gt;&amp;nbsp; CONFIG_CMSIS_DSP_SUPPORT=y&lt;br /&gt;&amp;nbsp; CONFIG_CMSIS_DSP_FASTMATH=y&lt;br /&gt;&amp;nbsp; CONFIG_CMSIS_DSP_COMPLEXMATH=y&lt;br /&gt;&amp;nbsp; CONFIG_CMSIS_DSP_STATISTICS=y&lt;br /&gt;&amp;nbsp; CONFIG_CMSIS_DSP_TRANSFORM=y&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/thread/322917?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 13:52:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a59182e-9ce5-47d6-995a-2c4374e68fb4</guid><dc:creator>Sebastiaan Merckx</dc:creator><description>&lt;p&gt;Pins 30 and 31 are by default used for I2C-2 on NRF9160, which is disabled by default normally (status=&amp;quot;okay&amp;quot;). see nrf9160dk_nrf9160_common.dts for example.&lt;/p&gt;
&lt;p&gt;wrt where to put the overlay files: by default, you would just start from a project with an existing board, copy that to a local folder, and then you can put the .overlay in a &amp;quot;boards&amp;quot; folder (same level as your &amp;quot;build&amp;quot; and &amp;quot;src&amp;quot; folders).&lt;/p&gt;
&lt;p&gt;If your new board is completely different from any existing board, the overlay is (likely) not a good idea anymore and you&amp;#39;ll need to dig deeper in how the devicetree is constructed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/thread/322758?ContentTypeID=1</link><pubDate>Sun, 01 Aug 2021 12:46:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac644c7b-2ffe-4135-a7a7-8ec9e6bfcff8</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;I have an integration tomorrow if nothing goes wrong that I will check it again hopefully.&lt;/p&gt;
&lt;p&gt;This morning on our hardware guy&amp;#39;s virgin board (Microsoft Meeting), we could now switch P0.10 but still not P0.30 &amp;amp; P0.31.&lt;/p&gt;
&lt;p&gt;I am using v1.6.0 and have board conf and overlay files in&amp;nbsp; C:\ncs\v1.6.0\nrf\samples\spm\boards.&lt;/p&gt;
&lt;p&gt;Where should I put the overlay and conf?&lt;/p&gt;
&lt;p&gt;Thanks David&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/thread/322757?ContentTypeID=1</link><pubDate>Sun, 01 Aug 2021 12:21:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bc79ba6-8d34-408e-a8c3-869d98c888cd</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;This morning I found that if I define only&lt;/p&gt;
&lt;p&gt;CONFIG_UART_NRFX=y&lt;/p&gt;
&lt;p&gt;CONFIG_UART_INTERRUPT_DRIVEN=y &lt;/p&gt;
&lt;p&gt;uart_callback_set() returns -ENOTSUP. so I cannot use the callback to read incoming bytes using the callback.&lt;/p&gt;
&lt;p&gt;If I define both async and interrupt as below &lt;strong&gt;while(NRF_UARTE1_NS-&amp;gt;EVENTS_RXTO == 0);&lt;/strong&gt; hangs.&lt;/p&gt;
&lt;p&gt;CONFIG_UART_ASYNC_API=y&lt;br /&gt;CONFIG_UART_NRFX=y&lt;br /&gt;CONFIG_UART_INTERRUPT_DRIVEN=y&lt;/p&gt;
&lt;p&gt;How do I get around this?&lt;/p&gt;
&lt;p&gt;How can I read incoming bytes without the callaback.&lt;/p&gt;
&lt;p&gt;Thanks David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/thread/322625?ContentTypeID=1</link><pubDate>Fri, 30 Jul 2021 10:02:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d299821-4c77-4459-8b61-3a7fe027ea2a</guid><dc:creator>Sebastiaan Merckx</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you using the same device tree for your application as for the SPM? I had issues where the SPM was still using UART1&amp;#39;s pins 0,1,1e,1f, even though UART1 was overlayed with &amp;#39;disabled&amp;#39; in the application device tree. I did not apply the same change to the SPM device tree.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/thread/322420?ContentTypeID=1</link><pubDate>Thu, 29 Jul 2021 11:08:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9010ef0-743c-4373-80c5-7f6dd41f09dd</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;I have been reading every nRF9160 post I could find and tried their uart conf defines.&lt;/p&gt;
&lt;p&gt;After setting the following resolves the while(NRF_UARTE1_NS-&amp;gt;EVENTS_RXTO == 0) problem.&lt;/p&gt;
&lt;p&gt;CONFIG_UART_NRFX=y&lt;br /&gt;CONFIG_UART_INTERRUPT_DRIVEN=y&lt;/p&gt;
&lt;p&gt;All of the other questions are still open and I would like to know what other uart defines should I also add.&lt;/p&gt;
&lt;p&gt;Also we need the CMSIS libraries and it seems to work but adds a ton of functions that are not even called.&lt;/p&gt;
&lt;p&gt;Is there a way that the linker will remove them or should I just select all of the files I need in a new directory (bad I know).&lt;/p&gt;
&lt;p&gt;CONFIG_CMSIS_DSP=y&lt;br /&gt;CONFIG_CMSIS_DSP_SUPPORT=y&lt;br /&gt;CONFIG_CMSIS_DSP_FASTMATH=y&lt;br /&gt;CONFIG_CMSIS_DSP_COMPLEXMATH=y&lt;br /&gt;CONFIG_CMSIS_DSP_STATISTICS=y&lt;br /&gt;CONFIG_CMSIS_DSP_TRANSFORM=y&lt;/p&gt;
&lt;p&gt;Thank you David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/thread/322354?ContentTypeID=1</link><pubDate>Thu, 29 Jul 2021 06:50:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:398738b8-6ca0-45be-bb6d-b5a588c50eb3</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;Shalom!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;In the ncs\vx.y.y\zephyr\boards\arm\ directory, I duplicated the nrf9160dk_nrf9160 with our custom board&amp;#39;s name and changing its contents to work with our board. I may have evidently missed something or need to add an overlay or conf file somewhere, since it looks to me that I have a conflict between P0.10 for example and some dk defined pin somewhere else.&lt;/p&gt;
&lt;p&gt;Is there a SES project build output files which shows the pins used?&lt;/p&gt;
&lt;p&gt;Basically, I use uar0,uart1,ADC,I2C for EPROM and temperature chip, SPI for the external flash and lsm6dsl chip.&lt;/p&gt;
&lt;p&gt;All seem to work. I have basic working code that we would like to deploy in the field for cellular network availability evaluation.&lt;/p&gt;
&lt;p&gt;I need to have the ability to use all of the limited port pins but this is not an immediate show stopper. It has to be a definition somewhere in Zephyr I would think. I need to advance somehow on this issue.&lt;/p&gt;
&lt;p&gt;Now the prototype is battery operated and I read the threads about disabling the uart0 &amp;amp; uart1 when sleeping.&lt;/p&gt;
&lt;p&gt;I have defined both uart0 and uart1. I tried disabling uart1 by the following code but EVENTS_RXTO never goes high stalling at the while(NRF_UARTE1_NS-&amp;gt;EVENTS_RXTO == 0); line.&lt;/p&gt;
&lt;p&gt;I can see in the debugger, in the callback a UART_RX_BUF_RELEASED and then an almost immediate UART_RX_BUF_REQUEST.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;  //---------------------------------------------------------------------------
  // Low power
  //  When putting the system in low power and the peripheral is not needed, 
  // lowest possible power consumption is achieved by stopping, and then disabling the peripheral.
  // The STOPTX and STOPRX tasks may not be always needed (the peripheral might already be stopped), 
  // but if STOPTX and/or STOPRX is sent, software shall wait until the TXSTOPPED and/or RXTO event is received in response,
  // before disabling the peripheral through the ENABLE register.
  //---------------------------------------------------------------------------
  NRF_UARTE1_NS-&amp;gt;TASKS_STOPRX=1;
  while(NRF_UARTE1_NS-&amp;gt;EVENTS_RXTO == 0);
  NRF_UARTE1-&amp;gt;EVENTS_RXTO = 0;

  NRF_UARTE1_NS-&amp;gt;TASKS_STOPTX = 1;
  while(NRF_UARTE1_NS-&amp;gt;EVENTS_TXSTOPPED == 0);
  NRF_UARTE1_NS-&amp;gt;EVENTS_TXSTOPPED = 0;

  NRF_UARTE1_NS-&amp;gt;ENABLE = 0;
  NRF_UARTE1_NS-&amp;gt;PSEL.TXD = 0xFFFFFFFF;
  // Clear BLE Txd P0.25  
  NRF_P0_NS-&amp;gt;OUTCLR = (1 &amp;lt;&amp;lt; 25);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Could it be that I am missing a proj_xx.conf definition?&lt;/p&gt;
&lt;p&gt;I tried both with&amp;nbsp; and without uart1 initialized at startup.&lt;/p&gt;
&lt;p&gt;I have the bootloader integrated into my code for FOTA. It does not need to be serially updated.&lt;/p&gt;
&lt;p&gt;Currently I use uart0 for system debug printk and for output my own debug information which is very useful.&lt;/p&gt;
&lt;p&gt;uart0 is also used a direct serial connection to configure the end unit. All of this works.&lt;/p&gt;
&lt;p&gt;Do I need to do anything about the other modules (ADC,I2C,SPI)&amp;nbsp; when not used and want to conserve power?&lt;/p&gt;
&lt;p&gt;I understand that Zephyr puts the nRF9160 into sleep mode when nothing is needed to be done.&lt;/p&gt;
&lt;p&gt;I wait for a semaphore that is given in a 1 second timer handler.&lt;/p&gt;
&lt;p&gt;Can I read uart0&amp;#39;s rx line by GPIO to see if it is active in order to reactivate uart0 for a direct connection configuration session?&lt;/p&gt;
&lt;p&gt;Next week I hope that our hardware guy will be able to see how much current is being drawn in this state.&lt;/p&gt;
&lt;p&gt;I am using the latest v1.6.0 setup.&lt;/p&gt;
&lt;p&gt;I tried putting NRF_UARTE1-&amp;gt;EVENTS_RXTO&amp;nbsp; in the SES watch window but it was unknown so I it does not seem that it will work also for the GPIO registers. Maybe the SES team could add this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 GPIO problem on custom board</title><link>https://devzone.nordicsemi.com/thread/322088?ContentTypeID=1</link><pubDate>Tue, 27 Jul 2021 14:56:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c193eb3f-0658-4db2-8d6d-00839201d5e4</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Isn&amp;#39;t the uart initialed by Zepyr only on calling its binding?[/quote]
&lt;p&gt;&amp;nbsp;No, the UART driver is initialized during &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/drivers/index.html#initialization-levels"&gt;pre-kernel initialization&lt;/a&gt;. device_get_binding(&amp;quot;UART_1&amp;quot;) just returns the struct for the UART1 binding.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Can I switch pins that are not in this file?[/quote]
&lt;p&gt;&amp;nbsp;Do you want to change the pins dynamically? That&amp;#39;s not possible as far as I know.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Maybe this is just for the bootloader?[/quote]
&lt;p&gt;&amp;nbsp;Yes, sort of. It is just valid for the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/spm.html#lib-spm"&gt;Secure Partition Manager&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Is there a way in the SES IDE to see the GPIO status at a breakpoint or single stepping?[/quote]
&lt;p&gt;&amp;nbsp;Can&amp;#39;t you just put the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf9160%2Fgpio.html&amp;amp;cp=2_0_0_5_3&amp;amp;anchor=register.IN"&gt;GPIO register&lt;/a&gt; on watch? I haven&amp;#39;t tried this, but I think it should work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>