<?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>How to debug nRF52840 and nRF9160 designs on Thingy:91 board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58246/how-to-debug-nrf52840-and-nrf9160-designs-on-thingy-91-board</link><description>Hi guys! 
 I am witnessing the things are evolving pretty fast around Thingy:91! What was up-to-date and actual yesterday is outdated today! That&amp;#39;s why I would like to ask some fresh questions about some things... 
 
 We were recently forced to move from</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Nov 2020 11:20:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58246/how-to-debug-nrf52840-and-nrf9160-designs-on-thingy-91-board" /><item><title>RE: How to debug nRF52840 and nRF9160 designs on Thingy:91 board</title><link>https://devzone.nordicsemi.com/thread/279205?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 11:20:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aca02d12-e948-4f23-b2f6-7a4a73e2e172</guid><dc:creator>Mahesh  Reddy</dc:creator><description>&lt;p&gt;Hello I am beginner can you help me to learn the coding for nrf9160and nrf9160DK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug nRF52840 and nRF9160 designs on Thingy:91 board</title><link>https://devzone.nordicsemi.com/thread/279204?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 11:19:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1026cfc0-fd04-489c-a6b8-95e6ebf2fbbb</guid><dc:creator>Mahesh  Reddy</dc:creator><description>&lt;p&gt;Hello I am beginner can you help me to learn the coding of nrf9160 and nrf9160DK&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug nRF52840 and nRF9160 designs on Thingy:91 board</title><link>https://devzone.nordicsemi.com/thread/237711?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 12:13:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38c4dffa-6482-44a2-8474-e2308c06fafc</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hello, &lt;a href="https://devzone.nordicsemi.com/members/morgan-kane"&gt;Jon Helge&lt;/a&gt; &amp;amp; &lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;I unfortunately was wrong! When I was able to see PCA20035 device from LTE Link Monitor, it was only &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;usb_uart_bridge&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; implemented! When I merge &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;usb_uart_bridge&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; with &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;central_uart&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; example, I am able to debug nRF52840 with RTT but unable to see PCA20035 device through LTE Link Monitor and debug nRF9160!&lt;/p&gt;
&lt;p&gt;Would you, PLEASE, take a look at the &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;usb_uart_bridge_with_&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;central_uart &lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;solution I was using, try it on your side and let me know what I am doing wrong?&lt;/p&gt;
&lt;p&gt;Other than that, do you have any info from inside the Nordic house, will you release new SES version soon that will allow us debugging?&lt;/p&gt;
&lt;p&gt;Thanks in advance. Looking forward to reading from you.&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/central_5F00_uart_5F00_with_5F00_usb_5F00_uart_5F00_bridge.zip"&gt;devzone.nordicsemi.com/.../central_5F00_uart_5F00_with_5F00_usb_5F00_uart_5F00_bridge.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug nRF52840 and nRF9160 designs on Thingy:91 board</title><link>https://devzone.nordicsemi.com/thread/237620?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 08:16:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e32afa3-728d-401a-8625-9b1745eb1f43</guid><dc:creator>Jon Helge</dc:creator><description>&lt;p&gt;Hi bojan,&lt;/p&gt;
&lt;p&gt;good to see that you have had some progress. If you are using a J-link or a DK as programmer/debugger the simplest way to get debug output from the nRF52840 when it is set up as a uart/usb bridge is to enable RTT debugging&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/46083/how-to-setup-zephyr-for-rtt-logging-with-nrf9160"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/46083/how-to-setup-zephyr-for-rtt-logging-with-nrf9160&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug nRF52840 and nRF9160 designs on Thingy:91 board</title><link>https://devzone.nordicsemi.com/thread/237492?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 14:39:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99d6f125-9412-49a7-8ed9-6a7323d432b8</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/morgan-kane"&gt;Jon Helge&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I somehow succeeded to combine &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;usb_uart_bridge&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; with &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;central_uart&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; example so that I can now see PCA20035 device from LTE Link Monitor and see &lt;strong&gt;&lt;em&gt;printk()&lt;/em&gt;&lt;/strong&gt; messages sent from nRF9160. Here attached you can see &lt;strong&gt;prj.conf&lt;/strong&gt; and &lt;strong&gt;main.c&lt;/strong&gt; files I used in a project. What I am unable to do, however, is to see &lt;strong&gt;printk()&lt;/strong&gt; messages coming from nRF52840 code! I am currently developing BLE code for nRF52840 part and I would like to be able to debug it. Do you have any idea what I am missing here and how to print debug messages from nRF52840?&lt;/p&gt;
&lt;p&gt;Thanks in advance for your time and efforts!&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0181.main.c"&gt;devzone.nordicsemi.com/.../0181.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# General
CONFIG_REBOOT=y
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_GPIO=y
CONFIG_POLL=y
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_EVENT_MANAGER=y
CONFIG_LINKER_ORPHAN_SECTION_PLACE=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_SPEED_OPTIMIZATIONS=y
CONFIG_DEVICE_POWER_MANAGEMENT=y
CONFIG_SYS_PM_POLICY_APP=y

# USB
CONFIG_USB=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_MANUFACTURER=&amp;quot;Nordic Semiconductor&amp;quot;
CONFIG_USB_DEVICE_PRODUCT=&amp;quot;Thingy:91 UART&amp;quot;
CONFIG_USB_DEVICE_VID=0x1915
CONFIG_USB_DEVICE_PID=0x520F
CONFIG_USB_DEVICE_SN=&amp;quot;PCA20035 12PLACEHLDRS&amp;quot;
CONFIG_USB_COMPOSITE_DEVICE=y
CONFIG_USB_CDC_ACM=y
CONFIG_USB_CDC_ACM_RINGBUF_SIZE=4096
CONFIG_USB_CDC_ACM_DEVICE_COUNT=2

# Settings
CONFIG_FCB=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_FCB=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y

# Logging
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_RTT_MODE_DROP=y

# UART
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=y
CONFIG_UART_0_NRF_UARTE=y
CONFIG_UART_0_NRF_FLOW_CONTROL=n
CONFIG_UART_1_NRF_UARTE=y
CONFIG_UART_1_NRF_FLOW_CONTROL=n

# Enable the UART driver
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
#CONFIG_UART_0_NRF_FLOW_CONTROL=y

# BLE
# Enable the BLE stack with GATT Client configuration
CONFIG_BT=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_SMP=y
CONFIG_BT_GATT_CLIENT=y

# Enable the BLE modules from NCS
CONFIG_BT_GATT_NUS_C=y
CONFIG_BT_SCAN=y
CONFIG_BT_SCAN_FILTER_ENABLE=y
CONFIG_BT_SCAN_UUID_CNT=1
CONFIG_BT_GATT_DM=y
CONFIG_HEAP_MEM_POOL_SIZE=2048

# This example requires more workqueue stack
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Enable bonding
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug nRF52840 and nRF9160 designs on Thingy:91 board</title><link>https://devzone.nordicsemi.com/thread/237405?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 11:40:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7659333-8b30-48b9-8171-fc6be9f43e9d</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/morgan-kane"&gt;Jon Helge&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thanks for pointing out this sample for me! I tried the sample and it behaves as expected on &lt;strong&gt;&lt;span style="background-color:#ff9900;"&gt;v1.2.0&lt;/span&gt;&lt;/strong&gt;tag - I am able to debug nRF9160 code from LTE Monitor app.&lt;/p&gt;
&lt;p&gt;However, to the best of my understanding,&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/bluetooth/services/nus.html" rel="noopener noreferrer" target="_blank"&gt;BLE NUS Service&lt;/a&gt; offered in the sample can be implemented only in BLE peripheral devices. What we need is to act as a BLE central device, to scan the area looking for the BLE beacon with the fixed UUID, read data advertised by BLE beacon and transfer them to nRF9160. For that purpose, we would need &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/bluetooth/services/nus_c.html#nus-c-readme" rel="noopener noreferrer" target="_blank"&gt;BLE NUS Client&lt;/a&gt; implemented. &lt;/p&gt;
&lt;p&gt;Am I correct when thinking that we can not use &lt;em&gt;&lt;strong&gt;&lt;span style="background-color:#ff9900;"&gt;connectivity_bridge&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt; sample for BLE central devices?&lt;/p&gt;
&lt;p&gt;IMHO, the easiest way to implement what we need is to keep default connection between nRF9160 and nRF52840 (made of &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;&amp;amp;uart0&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;&amp;amp;uart1&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;), to use &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;&amp;amp;uart0&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; for debugging and &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;&amp;amp;uart1&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; for data transfer between nRF9160 and nRF52840. In addition to that default hardware connection, I would need BLE stack (called SoftDevice in SDK 16.0 environment) for BLE scanning and reading advertised packages. Moreover, that BLE-related task should co-exist with the &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;usb_uart_bridge&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; task in the code for nRF52840. I tried to simply merge &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;usb_uart_bridge&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;central_uart&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;&amp;nbsp;samples similar way&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;&amp;nbsp;did in his&amp;nbsp;&lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;hci_uart_with_usb_uart_bridge &lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;project (here attached you have a &lt;strong&gt;main.c&lt;/strong&gt; file). The code compiles successfully but I am unfortunately unable to see PCA20035 device from LTE Monitor app. I guess this is due to some bad settings. Do you have any idea what I am missing here? Is the approach I described above OK for you or you have some better suggestion for me?&lt;/p&gt;
&lt;p&gt;Thank&amp;nbsp; you very much for your time and efforts, guys!&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/56850.main.c"&gt;devzone.nordicsemi.com/.../56850.main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug nRF52840 and nRF9160 designs on Thingy:91 board</title><link>https://devzone.nordicsemi.com/thread/237332?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 08:36:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8632ef4-e5b1-4396-989f-9bce157d69df</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thanks for your explanations.&lt;/p&gt;
&lt;p&gt;[quote userid="15146" url="~/f/nordic-q-a/58246/how-to-debug-nrf52840-and-nrf9160-designs-on-thingy-91-board/237270"][/quote]&lt;/p&gt;
&lt;p&gt;You want to combine the&amp;nbsp;usb_uart_bridge with the &lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/samples/bluetooth/central_uart"&gt;central_uart example&lt;/a&gt;&amp;nbsp;?&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand why you want to do that.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;There are mainly two reasons why I wanted to combine &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;usb_uart_bridge&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; with &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;central_uart&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Our architecture implemented in nRF9160 is not the same like used in &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;lte_ble_gateway &lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;sample. We would need from time to time (rarely) to tell BLE module to scan for BLE beacons with the fixed UUID, to read the advertised data from that beacon and finally to transfer those data to nRF9160 SiP module.&lt;/li&gt;
&lt;li&gt;Adding all those patches (modification of &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;board/arm&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; files, inserting &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;board.c&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;nrf52840_reset.c&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; files), at this level of understanding zephyr environment, seemed complicated and like building a tower from the cards. Changing one little line in one little file can break everything.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So, having in mind all of the above, I thought to simplify the things and go with the default connection between nRF9160 and nRF52840 (two uart modules). &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;&amp;amp;uart0&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; would server for debugging purposes and&amp;nbsp; &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;&amp;amp;uart1&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; will be used for rare communication between nRF9160 and nRF52840 modules. uart callback function will tell me where there is a communication request. If I need some more GPIOs (for interrupts or so), I thought to take &lt;em&gt;&lt;strong&gt;rts&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;cts&lt;/strong&gt;&lt;/em&gt; pins from &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;&amp;amp;uart0&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; and set them to &lt;em&gt;&lt;strong&gt;0xFFFFFFFF&lt;/strong&gt;&lt;/em&gt; (like you did).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;, is my reasoning OK, what would I need to add in configuration files to keep default&amp;nbsp;&lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;&amp;amp;uart0&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;&amp;amp;uart1&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; connection between the modules and use &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;&amp;amp;uart0&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; for debugging and &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;&amp;amp;uart1&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;for simple data transfer mechanism between the modules?&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug nRF52840 and nRF9160 designs on Thingy:91 board</title><link>https://devzone.nordicsemi.com/thread/237287?ContentTypeID=1</link><pubDate>Sun, 01 Mar 2020 14:29:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87855cf2-fccf-4135-9858-8f9f03e1e683</guid><dc:creator>Jon Helge</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;this pull request might be of interest regarding adding BLE to the nrF52840 on Thingy:91&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/1960"&gt;https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/1960&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It is a dual uart to USB bridge which allows for both debug printing and modem tracing. It also adds the possibility to use the the Nordic UART Service on BLE for the debug uart.&lt;/p&gt;
&lt;p&gt;It is huge PR, but I guess it will go into master during the next week.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug nRF52840 and nRF9160 designs on Thingy:91 board</title><link>https://devzone.nordicsemi.com/thread/237270?ContentTypeID=1</link><pubDate>Sat, 29 Feb 2020 12:51:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4de5ad34-ce2e-411f-ac5e-2ea34645b697</guid><dc:creator>Sigurd</dc:creator><description>[quote userid="76830" url="~/f/nordic-q-a/58246/how-to-debug-nrf52840-and-nrf9160-designs-on-thingy-91-board/236747"]What I noticed while compiling &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;hci_uart_with_usb_uart_bridge &lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;project are two warnings about deprecated macros:[/quote][quote userid="76830" url="~/f/nordic-q-a/58246/how-to-debug-nrf52840-and-nrf9160-designs-on-thingy-91-board/236747"]Could that be an issue stopping Thingy:91 to be visible?[/quote]
&lt;p&gt;Yes.&amp;nbsp;NET_BUF_POOL_DEFINE has been replaced with NET_BUF_POOL_FIXED_DEFINE in the latest release. This was done as part of &lt;a href="https://github.com/zephyrproject-rtos/zephyr/pull/21039"&gt;this PR&lt;/a&gt;.&lt;/p&gt;
[quote userid="76830" url="~/f/nordic-q-a/58246/how-to-debug-nrf52840-and-nrf9160-designs-on-thingy-91-board/236747"]Also, can you tell me what is the purpose of that Reset pin coming from nRF9160 to nRF52840? [/quote]
&lt;p&gt;It&amp;rsquo;s used to reset the nRF52840 during startup/reset of the nRF9160. See the comments in the function &lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/master/boards/arm/nrf9160_pca10090/nrf52840_reset.c#L19"&gt;bt_hci_transport_setup()&lt;/a&gt;. When the nRF9160 is reset, the nRF52840 will also reset. It&amp;#39;s a kind of synchronization mechanism that ensures that the nRF52840 is in a good known state when nRF9160 setup the HCI transport layer between the nRF9160 and nRF52840 at startup.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="76830" url="~/f/nordic-q-a/58246/how-to-debug-nrf52840-and-nrf9160-designs-on-thingy-91-board/236971"]I wanted to add &lt;strong&gt;&lt;em&gt;usb_uart&lt;/em&gt;&lt;/strong&gt; thread to the bluetooth&lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt; central_uart&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; example[/quote]
&lt;p&gt;You want to combine the&amp;nbsp;usb_uart_bridge with the &lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/samples/bluetooth/central_uart"&gt;central_uart example&lt;/a&gt;&amp;nbsp;?&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand why you want to do that. If you go for the same architecture as used in the lte_ble_gateway sample, then you want to run the HCI controller on the nRF52840 together with the usb_uart_bridge. (hci_uart_with_usb_uart_bridge). Then you run the bluetooth central_uart sample(Bluetooth Host + application) on the nRF9160.&lt;/p&gt;
&lt;p&gt;The Bluetooth&amp;nbsp;architecture then looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1582982261621v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Adding the&amp;nbsp;&lt;span&gt;usb_uart_bridge to the same figure, you get something like this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1582983208014v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug nRF52840 and nRF9160 designs on Thingy:91 board</title><link>https://devzone.nordicsemi.com/thread/236971?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2020 17:03:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0c07c39-09aa-487d-805a-82e06a0347a5</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I wanted to add &lt;strong&gt;&lt;em&gt;usb_uart&lt;/em&gt;&lt;/strong&gt; thread to the bluetooth&lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt; central_uart&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; example the similar way you did in &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;hci_uart_with_usb_uart_bridge &lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;project. Now, to the best of my understanding, reset pin (P20) in &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;hci_uart_with_usb_uart_bridge &lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;project serves to keep nRF52840 in reset state until all bytes on h4 lines are received and drained correctly. That&amp;#39;s why you keep reset pin HIGH until:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	while (uart_fifo_read(h4, &amp;amp;c, 1)) {
		continue;
	}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;To the best of my understanding, again, I think I don&amp;#39;t need to keep nRF52840 in reset state in &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;central_uart&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; example. nRF9160 and nRF52840 are interconnected through MCU_IF[7:0] pins where, by default (in common.dts files) &amp;amp;uart1 and &amp;amp;uart0 interfaces are placed. So my first guess was just to add &lt;strong&gt;&lt;em&gt;usb_uart&lt;/em&gt;&lt;/strong&gt; thread from your example to&amp;nbsp;&lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;central_uart&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt; example. I did it and the compilation passed successfully. However, I was unable to see PCA20035 board from LTE Monitor app. Here is how my prj.conf file looks like:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2018 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
#
CONFIG_NCS_SAMPLES_DEFAULTS=y

# Enable the UART driver
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_0_NRF_FLOW_CONTROL=y

# Enable the BLE stack with GATT Client configuration
CONFIG_BT=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_SMP=y
CONFIG_BT_GATT_CLIENT=y

# Enable the BLE modules from NCS
CONFIG_BT_GATT_NUS_C=y
CONFIG_BT_SCAN=y
CONFIG_BT_SCAN_FILTER_ENABLE=y
CONFIG_BT_SCAN_UUID_CNT=1
CONFIG_BT_GATT_DM=y
CONFIG_HEAP_MEM_POOL_SIZE=2048

# This example requires more workqueue stack
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Enable bonding
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y

 # USB
CONFIG_USB=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_MANUFACTURER=&amp;quot;Nordic Semiconductor&amp;quot;
CONFIG_USB_DEVICE_PRODUCT=&amp;quot;Thingy:91 UART&amp;quot;
CONFIG_USB_DEVICE_VID=0x1915
CONFIG_USB_DEVICE_PID=0x520F
CONFIG_USB_DEVICE_SN=&amp;quot;PCA20035 12PLACEHLDRS&amp;quot;
CONFIG_USB_COMPOSITE_DEVICE=y
CONFIG_USB_CDC_ACM=y
CONFIG_USB_CDC_ACM_RINGBUF_SIZE=4096
CONFIG_USB_CDC_ACM_DEVICE_COUNT=1

# Logging
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_RTT_MODE_DROP=y

# UART
CONFIG_UART_LINE_CTRL=y
CONFIG_UART_0_NRF_UARTE=y
CONFIG_UART_0_NRF_FLOW_CONTROL=n

 # UART
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=y
CONFIG_UART_0_NRF_UARTE=y
CONFIG_UART_0_NRF_FLOW_CONTROL=n
CONFIG_UART_1_NRF_UARTE=y
CONFIG_UART_1_NRF_FLOW_CONTROL=n

#General
CONFIG_REBOOT=y
CONFIG_HEAP_MEM_POOL_SIZE=16384
CONFIG_POLL=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I just added USB and UART related things from your &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;hci_uart_with_usb_uart_bridge &lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;project. Am I right about the reset pin? Am I missing something in configuration that makes my PCA20035 board invisible?&lt;/p&gt;
&lt;p&gt;Looking forward to read your feedback,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug nRF52840 and nRF9160 designs on Thingy:91 board</title><link>https://devzone.nordicsemi.com/thread/236747?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2020 09:35:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f61567b0-d1bd-42a0-a4ad-f8be311ae4f2</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thanks for your reply and useful info shared! I will focus on point 2) now...&lt;/p&gt;
&lt;p&gt;I tried to implement the patches manually by following the differences within &lt;em&gt;nrf.patch&lt;/em&gt; and &lt;em&gt;zephyr.patch&lt;/em&gt; files.&lt;/p&gt;
&lt;p&gt;I think the project &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;lte_ble_gateway &lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;is successfully patched because it is working either when I build and download .hex file from SES or when I use .hex file you shared.&lt;/p&gt;
&lt;p&gt;I think something is wrong with &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;hci_uart_with_usb_uart_bridge &lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;project though! When I use .hex file you provided, I am able to use LTE Link Monitor and debug. When I compile the project from SES and download generated .hex file, I can&amp;#39;t see Thingy board on LTE Link Monitor!&lt;/p&gt;
&lt;p&gt;I also used the following west commands to build and flash Thingy:91 board but with no success (Thingy:91 board still invisible through LTE Link Monitor):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b nrf52840_pca20035 -d build
west flash -d build&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;What I noticed while compiling &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;hci_uart_with_usb_uart_bridge &lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;project are two warnings about deprecated macros:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NET_BUF_POOL_DEFINE(cmd_tx_pool, CONFIG_BT_HCI_CMD_COUNT, CMD_BUF_SIZE,
		    BT_BUF_USER_DATA_MIN, NULL);
		    
NET_BUF_POOL_DEFINE(acl_tx_pool, TX_BUF_COUNT, BT_BUF_ACL_SIZE,
		    BT_BUF_USER_DATA_MIN, NULL);		    &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Could that be an issue stopping Thingy:91 to be visible?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I also needed to comment the following two lines of &lt;strong&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;em&gt;lte_ble_gateway &lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;prj.conf file because otherwise I was unable to load the project into SES:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#CONFIG_CLOUD_UA_BUTTONS=n
#CONFIG_CLOUD_UA_CONSOLE=n&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also, can you tell me what is the purpose of that Reset pin coming from nRF9160 to nRF52840? Do you use it to reset nRF52840 during start-up process or to keep the nRF52840 SoC in reset state until the moment you want to receive some BLE data?&lt;/p&gt;
&lt;p&gt;Thanks in advance for your help. It is appreciated as always!&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug nRF52840 and nRF9160 designs on Thingy:91 board</title><link>https://devzone.nordicsemi.com/thread/236312?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2020 15:09:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:328bcf5d-8e79-4575-803e-eb222fdd0522</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1) SES debugging: There are issues with debugging with both&amp;nbsp;&lt;span&gt;SES v&lt;/span&gt;&lt;span&gt;4.42a and 4.30c.&lt;/span&gt;&lt;span&gt;&amp;nbsp;The&amp;nbsp;&lt;/span&gt;&lt;span&gt;bugs has been reported internally, and we are working on a solution.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Most likely we will release an updated version of SES. Note that a workaround for 4.30c is to set Project &amp;quot;zephyr/zephyr.elf&amp;quot; as active project. But, for the moment, I recommend&amp;nbsp;using Segger Ozone instead of SES for debugging:&amp;nbsp;&lt;a href="https://www.segger.com/products/development-tools/ozone-j-link-debugger/"&gt;https://www.segger.com/products/development-tools/ozone-j-link-debugger/&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2) My patch is made for&amp;nbsp;NCS v1.1.0, I have not done a&amp;nbsp;NCS v1.2.0 patch, but in the meantime you can try to add the changes manually by looking at the patch-files.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3) Maybe you can take a look at the &lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/samples/bluetooth/central_uart"&gt;central_uart sample&lt;/a&gt;, and see how the UUID filtering is done there.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug nRF52840 and nRF9160 designs on Thingy:91 board</title><link>https://devzone.nordicsemi.com/thread/236222?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2020 11:45:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ead33f4e-2ee5-40b2-969c-b2b471379fbf</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/heidi"&gt;Heidi&lt;/a&gt;, I need your help, guys. We are hitting the wall and are unable to advance in our development since we are unable to debug our designs and benefit from nRF52840 BLE services on Thingy:91 board at the same time.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/heidi"&gt;Heidi&lt;/a&gt;, is it possible to debug with SES on branches&amp;nbsp;&lt;strong&gt;&lt;span style="background-color:#ff9900;"&gt;1.2.0&lt;/span&gt;&lt;/strong&gt; or master?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;, we were forced to move from the&amp;nbsp;&lt;span style="background-color:#ff9900;"&gt;&lt;strong&gt;1.1.0&lt;/strong&gt;&lt;/span&gt; tag to &lt;strong&gt;&lt;span style="background-color:#ff9900;"&gt;1.2.0&lt;/span&gt;&lt;/strong&gt; or master because we need &lt;em&gt;cloud_client&lt;/em&gt; example and communication with AWS IoT Cloud. I was unable to apply your R2 patches from &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/52689/nrf9160-lte-sensor-gateway-on-thingy-91/225659#225659" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt; for &lt;em&gt;hci_uart_with_usb_uart_bridge&lt;/em&gt; example on&amp;nbsp; &lt;strong&gt;&lt;span style="background-color:#ff9900;"&gt;1.2.0&lt;/span&gt;&lt;/strong&gt; or master. Any suggestion how can I do it?&lt;/p&gt;
&lt;p&gt;Thanks in advance, guys, for your time and efforts.&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>