<?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>Enabling UARTs on PO Lines to Connect Peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50666/enabling-uarts-on-po-lines-to-connect-peripheral</link><description>Hello and Thank you In Advance for Your Assistance. I have been working several days just to get a UART running for interface to a peripheral. 
 I am trying to connect a UART peripheral to my nRF9160DK board on the PO lines. I have followed Case ID 226331</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Aug 2019 06:56:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50666/enabling-uarts-on-po-lines-to-connect-peripheral" /><item><title>RE: Enabling UARTs on PO Lines to Connect Peripheral</title><link>https://devzone.nordicsemi.com/thread/204638?ContentTypeID=1</link><pubDate>Mon, 19 Aug 2019 06:56:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebf32d1c-6c6d-4a8b-8029-f853251c5976</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can update to the latest tag by running the lines in the top of this blog post:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/how-to-get-production-version-v1-0-0-to-nrf9160"&gt;https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/how-to-get-production-version-v1-0-0-to-nrf9160&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Once that is done, you should be on v1.0.0 and the other repo&amp;#39;s should also be checked out accordingly.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling UARTs on PO Lines to Connect Peripheral</title><link>https://devzone.nordicsemi.com/thread/204363?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2019 19:46:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:062dbe14-9fe1-4d30-82f4-b2ac761b1773</guid><dc:creator>GaryD</dc:creator><description>&lt;p&gt;Einar,&lt;/p&gt;
&lt;p&gt;I have not made changes elsewhere.&amp;nbsp; The source for my project has been submitted under a private ticket.&lt;/p&gt;
&lt;p&gt;I loaded the SDK about 3 weeks ago - would that be 1.0.0?&amp;nbsp; How do I tell?&amp;nbsp; Here is the tag list from my nrf directory:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1565898183010v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling UARTs on PO Lines to Connect Peripheral</title><link>https://devzone.nordicsemi.com/thread/204194?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2019 06:45:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1a09d9f-58fc-44a0-bd14-f3a11a550ebb</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Gary,&lt;/p&gt;
&lt;p&gt;Sounds good.&lt;/p&gt;
[quote user="gmdewitt"]I assume I just need to zip the http sample directory that I am using - correct?[/quote]
&lt;p&gt;Yes. But if you have made any other changes elsewhere, then please include those as well. Also please specify which version of nRF Connect SDK you are using (I am assuming the v1.0.0 tag?).&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling UARTs on PO Lines to Connect Peripheral</title><link>https://devzone.nordicsemi.com/thread/204158?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2019 18:14:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98c9a61c-8a3e-42fc-80b8-3d71c71a9806</guid><dc:creator>GaryD</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Instead of &amp;quot;softdevice firmware&amp;quot; above, I meant to say RTOS or modem firmware.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It appears to me that this is probably related to a Zephyr RTOS issue in that it cannot handle multiple user thread ISRs properly.&lt;/p&gt;
&lt;p&gt;I will open up a private thread and provide you with the code using my servers - please change servers if you need to pass this to someone else or need to to extensive testing.&lt;/p&gt;
&lt;p&gt;I assume I just need to zip the http sample directory that I am using - correct?&lt;/p&gt;
&lt;p&gt;What I need to work in the project I send you is to have the HTTP operations, SPI loopback, and a second UART operation all working within the http sample code project.&amp;nbsp; The code I will send you will not have the correct overlays for the UART to be moved to different pins.&amp;nbsp; I do not care where the UART pins are - the debug UART, a second UART, and&amp;nbsp;SPI have to work concurrently&amp;nbsp;with ISRs&amp;nbsp;along with HTTP (modem) operations.&lt;/p&gt;
&lt;p&gt;Thanks a lot for your support.&lt;/p&gt;
&lt;p&gt;Gary&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling UARTs on PO Lines to Connect Peripheral</title><link>https://devzone.nordicsemi.com/thread/203584?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 12:35:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:804b1741-0745-4642-9c3f-fdda218b2e0d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Gary,&lt;/p&gt;
&lt;p&gt;[quote user="gmdewitt"][/quote]&lt;/p&gt;
&lt;p&gt;I removed the following line that was duplicated in the SPI sample - is that OK?&lt;/p&gt;
&lt;p&gt;CONFIG_MAIN_STACK_SIZE=4096&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yes, that&amp;nbsp;there is no point in duplicating it.&lt;/p&gt;
[quote user="gmdewitt"]I reading older DevZone issues relating to similar spinning ISR issues, there had been some overlaying into the softdevice firmware through errant flash pointers.&amp;nbsp; Could that be a similar issue?&amp;nbsp; If so, how would that be fixed?[/quote]
&lt;p&gt;I am not sure which posts you refer to, but if it mentioned the SoftDevice it is probably not relevant. (The SoftDevice is the proprietary BLE stack we provide for the nRF51 and nRF52 devices.)&lt;/p&gt;
[quote user="gmdewitt"]I can upload the project to you but do not want that project public since it points to my servers and do not want to have a bunch of hits from users trying my solution for their needs.&amp;nbsp; Is that possible?[/quote]
&lt;p&gt;Absolutely. You can make a private support case and upload your code there along with a description of how to test it. Please refer to this thread.&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling UARTs on PO Lines to Connect Peripheral</title><link>https://devzone.nordicsemi.com/thread/203548?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 11:29:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9cce0f23-d6b8-47b3-98fe-801a5b16b242</guid><dc:creator>GaryD</dc:creator><description>&lt;p&gt;Thank you for the reply Einar,&lt;/p&gt;
&lt;p&gt;That is the SPI example I used.&amp;nbsp; It works well standalone.&amp;nbsp; I was even able to set the clock to 1 MHz since my peripheral cannot use the 4 MHz&amp;nbsp; clock.&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I used the http sample from the same GitHub link to be able to use a GET statement to fetch some strings from my test server.&amp;nbsp; That http sample also worked well standalone and I was able to download strings from my server that need to be passed to two peripherals (a screen and a text to speech peripheral).&lt;/p&gt;
&lt;p&gt;I tried using a UART to talk to the screen and came up with the ISR spinning issue with that one and submitted a request for help with that issue.&amp;nbsp; While waiting for a reply, I decided to fire up the SPI sample to see if that would work and encountered the same issue when I integrated it with the http sample. I copied the appropriate c-code from the SPI mqin.c into the http main.c files.&amp;nbsp; I updated the prj.conf from the spi sample into the http sample and copied the .overlay files into the main directory.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1565608182308v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Here is the main.c content with the merged firmware.&amp;nbsp; I changed the server name so it does not become public.&amp;nbsp; You may also comment out the http calls in the main loop and you get the same failure without trying to go to the server.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*
 * Copyright (c) 2018 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
 */

#include &amp;lt;zephyr.h&amp;gt;
#include &amp;lt;net/socket.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;uart.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;spi.h&amp;gt;

//=========START SPI TEST SECTION============
static const struct spi_config spi_cfg = {
	.operation = SPI_WORD_SET(8) | SPI_TRANSFER_MSB |
		     SPI_MODE_CPOL | SPI_MODE_CPHA,
	.frequency = 1000000,
	.slave = 0,
};

struct device * spi_dev;

static void spi_init(void)
{
	const char* const spiName = &amp;quot;SPI_3&amp;quot;;
	spi_dev = device_get_binding(spiName);

	if (spi_dev == NULL) {
		printk(&amp;quot;Could not get %s device\n&amp;quot;, spiName);
		return;
	}
}

void spi_test_send(void)
{
	int err;
	static u8_t tx_buffer[1];
	static u8_t rx_buffer[1];

	const struct spi_buf tx_buf = {
		.buf = tx_buffer,
		.len = sizeof(tx_buffer)
	};
	const struct spi_buf_set tx = {
		.buffers = &amp;amp;tx_buf,
		.count = 1
	};

	struct spi_buf rx_buf = {
		.buf = rx_buffer,
		.len = sizeof(rx_buffer),
	};
	const struct spi_buf_set rx = {
		.buffers = &amp;amp;rx_buf,
		.count = 1
	};

	err = spi_transceive(spi_dev, &amp;amp;spi_cfg, &amp;amp;tx, &amp;amp;rx);
	if (err) {
		printk(&amp;quot;SPI error: %d\n&amp;quot;, err);
	} else {
		/* Connect MISO to MOSI for loopback */
		printk(&amp;quot;TX sent: %x\n&amp;quot;, tx_buffer[0]);
		printk(&amp;quot;RX recv: %x\n&amp;quot;, rx_buffer[0]);
		tx_buffer[0]++;
	}	
}

//=========END SPI TEST SECTION=============


//======START UART Test Section============
/********************
static u8_t uart_buf[1024];

void uart_cb(struct device *x)
{
	uart_irq_update(x);
	int data_length = 0;

	if (uart_irq_rx_ready(x)) {
		data_length = uart_fifo_read(x, uart_buf, sizeof(uart_buf));
		uart_buf[data_length] = 0;
	}
	printk(&amp;quot;%s&amp;quot;, uart_buf);
}
******************/
static u8_t uart_buf0[1024];
static u8_t uart_buf1[1024];
static char *command0 = &amp;quot;This Is A Test of UART0\r\n&amp;quot;;
static char *command1 = &amp;quot;This Is A Test of UART1\r\n&amp;quot;;
u8_t i = 0;

void uart_cb0(struct device *x)
{
	uart_irq_update(x); //start processing interrupts in the ISR
	int data_length = 0;
        printk(&amp;quot;Callback!\r\n&amp;quot;);
	if (uart_irq_rx_ready(x)) { //check if UART RX buffer has a received char
		data_length = uart_fifo_read(x, uart_buf0, sizeof(uart_buf0)); //read ata from FIFO
		uart_buf0[data_length] = 0;
	}
	printk(&amp;quot;cb0 - %s&amp;quot;, uart_buf0);
}

void uart_cb1(struct device *x)
{
	uart_irq_update(x);
	int data_length = 0;
        printk(&amp;quot;Callback!\r\n&amp;quot;);
	if (uart_irq_rx_ready(x)) {
		data_length = uart_fifo_read(x, uart_buf1, sizeof(uart_buf1));
		uart_buf1[data_length] = 0;
	}
	printk(&amp;quot;cb1 - %s&amp;quot;, uart_buf1);
}


void uart_send_str(struct device *uart, char *str){
    printk(&amp;quot;Transmit! %s\r\n&amp;quot;,str);
    u32_t len = strlen(str);
    while (len--) {
        uart_poll_out(uart, *str++);
    }
}
//======END UART TEST Section ==================

//=====START HTTP Section===================
//#define HTTP_HOST &amp;quot;google.com&amp;quot;
//#define HTTP_PORT 80
//#define RECV_BUF_SIZE 8192


#define HTTP_HOST &amp;quot;my.server&amp;quot;
#define HTTP_PORT 80
#define RECV_BUF_SIZE 8192
char recv_buf[RECV_BUF_SIZE + 1];
char header_store[RECV_BUF_SIZE + 1];

int blocking_recv(int fd, u8_t *buf, u32_t size, u32_t flags)
{
	int err;

	do {
		err = recv(fd, buf, size, flags);
	} while (err &amp;lt; 0 &amp;amp;&amp;amp; errno == EAGAIN);

	return err;
}

int blocking_send(int fd, u8_t *buf, u32_t size, u32_t flags)
{
	int err;

	do {
		err = send(fd, buf, size, flags);
	} while (err &amp;lt; 0 &amp;amp;&amp;amp; errno == EAGAIN);

	return err;
}

int blocking_connect(int fd, struct sockaddr *local_addr, socklen_t len)
{
	int err;

	do {
		err = connect(fd, local_addr, len);
	} while (err &amp;lt; 0 &amp;amp;&amp;amp; errno == EAGAIN);

	return err;
}

void app_http_get_header(void)
{
	struct sockaddr_in local_addr;
	struct addrinfo *res;

	local_addr.sin_family = AF_INET;
	local_addr.sin_port = htons(0);
	local_addr.sin_addr.s_addr = 0;

	printk(&amp;quot;HTTP example\n\r&amp;quot;);

	int err = getaddrinfo(HTTP_HOST, NULL, NULL, &amp;amp;res);

	printk(&amp;quot;getaddrinfo err: %d\n\r&amp;quot;, err);
	((struct sockaddr_in *)res-&amp;gt;ai_addr)-&amp;gt;sin_port = htons(HTTP_PORT);

        //http://my.server/rt/dev_test_falcon_20190722/sample_body?k=falcon_key&amp;amp;format=text  
	char send_buf[] =
                &amp;quot;GET /rt/dev_test_falcon_20190722/sample_header?k=falcon_key&amp;amp;format=text HTTP/1.1\r\nHost:my.server:80\r\nConnection: close\r\n\r\n&amp;quot;;
        //char send_buf[] =
        //        &amp;quot;GET /rt/dev_test_falcon_20190722/sample_body?k=falcon_key&amp;amp;format=text HTTP/1.1\r\nHost:my.server:80\r\nConnection: close\r\n\r\n&amp;quot;;
	//char send_buf[] =
	//	&amp;quot;GET / HTTP/1.1\r\nHost: www.google.com:80\r\nConnection: close\r\n\r\n&amp;quot;;
	int send_data_len = strlen(send_buf);

	int client_fd = socket(AF_INET, SOCK_STREAM, 0);

	printk(&amp;quot;client_fd: %d\n\r&amp;quot;, client_fd);
	err = bind(client_fd, (struct sockaddr *)&amp;amp;local_addr,
		   sizeof(local_addr));
	printk(&amp;quot;bind err: %d\n\r&amp;quot;, err);
	err = blocking_connect(client_fd, (struct sockaddr *)res-&amp;gt;ai_addr,
			       sizeof(struct sockaddr_in));
	printk(&amp;quot;connect err: %d\n\r&amp;quot;, err);
        printk(&amp;quot;COMMAND USED: %s\r\n&amp;quot;,send_buf); 

	int num_bytes = send(client_fd, send_buf, send_data_len, 0);

	printk(&amp;quot;send err: %d\n\r&amp;quot;, num_bytes);

	//int tot_num_bytes = 0;
        //bool buf_rcvd = false;

	//do {
		/* TODO: make a proper timeout *
		 * Current solution will just hang 
		 * until remote side closes connection */
		num_bytes =
			blocking_recv(client_fd, recv_buf, RECV_BUF_SIZE, 0);
		//tot_num_bytes += num_bytes;
                printk(&amp;quot;\r\nnum_bytes = %i\r\n&amp;quot;,num_bytes);
		//if (num_bytes &amp;lt;= 0) {
		//	break;
		//}
		printk(&amp;quot;%s\r\n&amp;quot;, recv_buf);
                //header_store = recv_buf;
                printk(&amp;quot;Got Here!\r\n&amp;quot;);
                printk(&amp;quot;Finished. Closing socket\r\n&amp;quot;);
                freeaddrinfo(res);
                err = close(client_fd);
}

void app_http_get_body(void)
{
	struct sockaddr_in local_addr;
	struct addrinfo *res;

	local_addr.sin_family = AF_INET;
	local_addr.sin_port = htons(0);
	local_addr.sin_addr.s_addr = 0;

	printk(&amp;quot;HTTP example\n\r&amp;quot;);


	int err = getaddrinfo(HTTP_HOST, NULL, NULL, &amp;amp;res);

	printk(&amp;quot;getaddrinfo err: %d\n\r&amp;quot;, err);
	((struct sockaddr_in *)res-&amp;gt;ai_addr)-&amp;gt;sin_port = htons(HTTP_PORT);

        //http://my.server/rt/dev_test_falcon_20190722/sample_body?k=falcon_key&amp;amp;format=text  
	//char send_buf[] =
        //        &amp;quot;GET /rt/dev_test_falcon_20190722/sample_header?k=falcon_key&amp;amp;format=text HTTP/1.1\r\nHost:my.server:80\r\nConnection: close\r\n\r\n&amp;quot;;
        char send_buf[] =
                &amp;quot;GET /rt/dev_test_falcon_20190722/sample_body?k=falcon_key&amp;amp;format=text HTTP/1.1\r\nHost:my.server:80\r\nConnection: close\r\n\r\n&amp;quot;;
	//char send_buf[] =
	//	&amp;quot;GET / HTTP/1.1\r\nHost: www.google.com:80\r\nConnection: close\r\n\r\n&amp;quot;;
	int send_data_len = strlen(send_buf);

	int client_fd = socket(AF_INET, SOCK_STREAM, 0);

	printk(&amp;quot;client_fd: %d\n\r&amp;quot;, client_fd);
	err = bind(client_fd, (struct sockaddr *)&amp;amp;local_addr,
		   sizeof(local_addr));
	printk(&amp;quot;bind err: %d\n\r&amp;quot;, err);
	err = blocking_connect(client_fd, (struct sockaddr *)res-&amp;gt;ai_addr,
			       sizeof(struct sockaddr_in));
	printk(&amp;quot;connect err: %d\n\r&amp;quot;, err);
        printk(&amp;quot;COMMAND USED: %s\r\n&amp;quot;,send_buf); 

	int num_bytes = send(client_fd, send_buf, send_data_len, 0);

	printk(&amp;quot;send err: %d\n\r&amp;quot;, num_bytes);

	//int tot_num_bytes = 0;
        //bool buf_rcvd = false;

	//do {
		num_bytes =
			blocking_recv(client_fd, recv_buf, RECV_BUF_SIZE, 0);
		//tot_num_bytes += num_bytes;
                printk(&amp;quot;\r\nnum_bytes = %i\r\n&amp;quot;,num_bytes);
		//if (num_bytes &amp;lt;= 0) {
		//	break;
		//
                printk(&amp;quot;RX Buffer size = %i\r\n&amp;quot;, sizeof(recv_buf));
		printk(&amp;quot;%s\r\n&amp;quot;, recv_buf);
                printk(&amp;quot;Got Here!\r\n&amp;quot;);
                printk(&amp;quot;Finished. Closing socket\r\n&amp;quot;);
                freeaddrinfo(res);
                err = close(client_fd);
}

int main(void)
{
	app_http_get_header();
	app_http_get_body();

        spi_init();
        int i = 0;
        while (i &amp;lt; 100){
          spi_test_send();
          i++;
        }

        //////////UART setup
	//struct device *uart0 = device_get_binding(&amp;quot;UART_0&amp;quot;);
	//uart_irq_callback_set(uart0, uart_cb0);
	//uart_irq_rx_enable(uart0);
        //printk(&amp;quot;uart0 ready\n&amp;quot;);

	//struct device *uart1 = device_get_binding(&amp;quot;UART_1&amp;quot;);
        //uart_irq_callback_set(uart1, uart_cb1);
	//uart_irq_rx_enable(uart1);
        //printk(&amp;quot;uart1 ready\n&amp;quot;);

        //struct device *uart = device_get_binding(&amp;quot;UART_0&amp;quot;);
	//uart_irq_callback_set(uart, uart_cb);
	//uart_irq_rx_enable(uart);
	//printk(&amp;quot;UART loopback start!\n&amp;quot;);
        ////////////

        //uart_send_str(uart0, command0);
        //uart_send_str(uart1, command1);

	while (1) {
                //uart_send_str(uart1, command1);
               // uart_send_str(uart0, command0);
		k_cpu_idle();
	}
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is the integrated prj.conf&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BSD_LIBRARY=y
CONFIG_GPIO=n
CONFIG_SERIAL=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_NETWORKING=y
CONFIG_NET_BUF_USER_DATA_SIZE=1
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_NET_RAW_MODE=y
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
CONFIG_LOG=n
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_HEAP_MEM_POOL_SIZE=1024
# LTE link control
CONFIG_LTE_LINK_CONTROL=y
CONFIG_MAIN_STACK_SIZE=4096
# SPI
CONFIG_SPI=y
CONFIG_SPI_3=y
CONFIG_SPI_3_NRF_SPIM=y
CONFIG_SPI_3=y 
CONFIG_SPI_NRFX=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I removed the following line that was duplicated in the SPI sample - is that OK?&lt;/p&gt;
&lt;p&gt;CONFIG_MAIN_STACK_SIZE=4096&lt;/p&gt;
&lt;p&gt;Today I upgraded the modem firmware to 1.0.0 but still fail with the same issue.&amp;nbsp; I am going to try to move the HTTP working firmware into the now stand alone working firmware to see if that will work.&amp;nbsp; &amp;nbsp;However, I still have to be able to add a UART to the mix as well and expect to see some of the same issues.&lt;/p&gt;
&lt;p&gt;I reading older DevZone issues relating to similar spinning ISR issues, there had been some overlaying into the softdevice firmware through errant flash pointers.&amp;nbsp; Could that be a similar issue?&amp;nbsp; If so, how would that be fixed?&lt;/p&gt;
&lt;p&gt;I can upload the project to you but do not want that project public since it points to my servers and do not want to have a bunch of hits from users trying my solution for their needs.&amp;nbsp; Is that possible?&lt;/p&gt;
&lt;p&gt;Thank you for your support,&lt;/p&gt;
&lt;p&gt;Gary&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling UARTs on PO Lines to Connect Peripheral</title><link>https://devzone.nordicsemi.com/thread/203489?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 07:28:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcf57332-02db-481d-9467-bab9346d6a28</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry for the late reply.&lt;/p&gt;
&lt;p&gt;I am not sure what the problem is here. Which SPI example have you used? Can you try using/looking at &lt;a href="https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/spi/prj.conf"&gt;this SPI example&lt;/a&gt;, which we know is functional? If yous till have problems after that, perhaps you can upload a completed project demonstrating the issue that I can test on my side?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling UARTs on PO Lines to Connect Peripheral</title><link>https://devzone.nordicsemi.com/thread/203457?ContentTypeID=1</link><pubDate>Sun, 11 Aug 2019 23:24:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:521e233c-87d8-4659-8a7b-15bd85096981</guid><dc:creator>GaryD</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I realize you are busy and I know an engineer was assigned several days ago - however, I have not received any assistance yet.&lt;/p&gt;
&lt;p&gt;I am short on time so I decided to go ahead and use a SPI connection instead of UART and have encountered the same error break as follows.&amp;nbsp; I simply copied the SPI sample code main.c into the http main.c code, added the SPI3 info into the from the spi sample into the http prj.conf, and copied the .overlay files from the spi sample to the http sample main directory.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1565564446560v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If I continue the execution in debug, the COM23 nRFConnect LTE Link Monitor trace indicates the following.&amp;nbsp; There must be another setting somewhere to allow the SPI ISR to operate in the non-secure state.&amp;nbsp; Can someone point me to where this can be resolved.&amp;nbsp; A similar correction may be in order for the UART issue.&amp;nbsp; It is probably something simple.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Could not get SPI_3 device
Exception occurred in Secure State
***** HARD FAULT *****
  Fault escalation (see below)
***** BUS FAULT *****
  Precise data bus error
  BFAR Address: 0x50008120
***** Hardware exception *****
Current thread ID = 0x20020134
Faulting instruction address = 0x9300
Fatal fault in ISR! Spinning...&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The LTE Link Monitor Trace shows the SPIM3 to be OK and non-secure as peripheral 12.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Peripheral		Domain		Status
00 NRF_P0		Non-Secure	OK
01 NRF_CLOCK		Non-Secure	OK
02 NRF_RTC1		Non-Secure	OK
03 NRF_NVMC		Non-Secure	OK
04 NRF_UARTE1		Non-Secure	OK
05 NRF_UARTE2		Secure		SKIP
06 NRF_IPC		Non-Secure	OK
07 NRF_VMC		Non-Secure	OK
08 NRF_FPU		Non-Secure	OK
09 NRF_EGU1		Non-Secure	OK
10 NRF_EGU2		Non-Secure	OK
11 NRF_TWIM2		Non-Secure	OK
12 NRF_SPIM3		Non-Secure	OK
13 NRF_TIMER0		Non-Secure	OK
14 NRF_TIMER1		Non-Secure	OK
15 NRF_TIMER2		Non-Secure	OK
16 NRF_SAADC		Non-Secure	OK
17 NRF_GPIOTE1		Non-Secure	OK

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If anyone can suggest a solution, please reply.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling UARTs on PO Lines to Connect Peripheral</title><link>https://devzone.nordicsemi.com/thread/203031?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2019 10:43:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:739a66ea-915c-4cc0-b07c-b0665a1fe20a</guid><dc:creator>GaryD</dc:creator><description>&lt;p&gt;Here is the UART1 and UART0 information contained in nrf9160_pca10090ns.dts_compiled file:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;			uart0: uart@8000 {
				compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
				reg = &amp;lt; 0x8000 0x1000 &amp;gt;;
				interrupts = &amp;lt; 0x08 0x01 &amp;gt;;
				status = &amp;quot;ok&amp;quot;;
				label = &amp;quot;UART_0&amp;quot;;
				current-speed = &amp;lt; 0x1c200 &amp;gt;;
				tx-pin = &amp;lt; 0x1d &amp;gt;;
				rx-pin = &amp;lt; 0x1c &amp;gt;;
				rts-pin = &amp;lt; 0x1b &amp;gt;;
				cts-pin = &amp;lt; 0x1a &amp;gt;;
			};

			uart1: uart@9000 {
				compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
				reg = &amp;lt; 0x9000 0x1000 &amp;gt;;
				interrupts = &amp;lt; 0x09 0x01 &amp;gt;;
				status = &amp;quot;ok&amp;quot;;
				label = &amp;quot;UART_1&amp;quot;;
				current-speed = &amp;lt; 0x1c200 &amp;gt;;
				tx-pin = &amp;lt; 0x01 &amp;gt;;
				rx-pin = &amp;lt; 0x00 &amp;gt;;
				rts-pin = &amp;lt; 0x0e &amp;gt;;
				cts-pin = &amp;lt; 0x0f &amp;gt;;
			};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling UARTs on PO Lines to Connect Peripheral</title><link>https://devzone.nordicsemi.com/thread/202672?ContentTypeID=1</link><pubDate>Tue, 06 Aug 2019 15:15:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55a7be4f-9427-4866-866c-60f788d4a394</guid><dc:creator>GaryD</dc:creator><description>&lt;p&gt;One additional note:&amp;nbsp; If I continue&amp;nbsp;after the fault condition defined in Problem 1, I get the following messages on the connect terminal:&amp;nbsp; I also loaded the .hex file for the nRF52840 provided for UART1 in the&amp;nbsp;&lt;span&gt;Case ID 226331.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Exception occurred in Secure State
***** HARD FAULT *****
  Fault escalation (see below)
***** BUS FAULT *****
  Precise data bus error
  BFAR Address: 0x50008120
***** Hardware exception *****
Current thread ID = 0x20020130
Faulting instruction address = 0x19df8
Fatal fault in ISR! Spinning...&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>