<?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>Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85745/zephyr-uart-on-fanstel-blg840f</link><description>I am using UART on the Fanstel BLG840F to communicate from the 9160 to the 52840. So far I have successfully been able to communicate from the 52840 to the 9160 but have not been able to send UART messages back from the 9160 to the 52840. I am using shared</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Apr 2022 21:46:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85745/zephyr-uart-on-fanstel-blg840f" /><item><title>RE: Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/thread/363254?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 21:46:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84fbe906-1c3d-4fd3-b8bd-4805445fbafe</guid><dc:creator>jake11212</dc:creator><description>&lt;p&gt;After a while I found the solution it was with the pins.&amp;nbsp; There was overlapping assignment with uart0 and spi1, so I disabled them in the overlay file by adding:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;spi1&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&amp;quot;disabled&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;uart0&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&amp;quot;disabled&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;which fixed the issue&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/thread/360827?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 13:12:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a67bb929-5713-43a8-af97-bf060ce86c8e</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I noticed the same diagram, but it is not very specific unfortunately.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am not sure what they mean by App1-UART either, to my knowledge we don&amp;#39;t have any references to this in our documentation. Possibly they reused the pins used by the respective board files of the nRF9160 and nRF52840 DK&amp;#39;s, but this is just speculation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the BT840 schematic they mention UART_TX on pin 1.02 (C5) and UART_RX on pin 1.01 (D5), but whether or not this is&amp;nbsp;the UART pins they use in the BLG840X is anyone&amp;#39;s guess.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try to contact Fanstel directly and ask if they have some more documentation that would provide these details?&lt;/p&gt;
&lt;p&gt;I guess it is possible to write some code for the two devices that toggle each and every pin one after the other in one device, and read all the GPIO&amp;#39;s in the other device to see which one changes, but this is a pretty cumbersome way to figure out how they are connected.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/thread/360617?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2022 18:46:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32b509b9-6b04-4101-bf1b-a5331a5690f3</guid><dc:creator>jake11212</dc:creator><description>&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/BLG840F_5F00_block.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;They provide this block diagram which has App1-UART of the 9160 connected to nRF52-UART of the BT840F via the JS3 connector.&amp;nbsp; I looked through the 9160 datasheet and couldn&amp;#39;t find any labeling of APP1 so I wasn&amp;#39;t sure what that was referring to, and same with nRF52 in its datasheet.&amp;nbsp; It says that uart pins such as psel.rts can be mapped to pins, but psel.rxd, psel.rts etc. were all mapped to P0.31 so I didn&amp;#39;t understand this.&amp;nbsp; Wouldn&amp;#39;t these need to be separate pins physically?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/thread/360561?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2022 13:26:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e5356cc-61c2-4389-81e6-eb06d01fbafd</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Jake&lt;/p&gt;
&lt;p&gt;Wouldn&amp;#39;t the BLG840X come with its own set of specifications detailing which pins from the nRF9160 are connected to which pins on the BT840?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/thread/360401?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2022 00:42:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e53bd66-6821-4168-a477-3e1a2eeaac2c</guid><dc:creator>jake11212</dc:creator><description>[quote userid="2116" url="~/f/nordic-q-a/85745/zephyr-uart-on-fanstel-blg840f/360241#360241"]It seems you are trying to set up uart1 to use exactly the same pins as uart0 in the nRF52840 DTS configuration.[/quote]
&lt;p&gt;I was creating an overlay for uart1.&amp;nbsp; The overlay I used is the same as uart1 except for the rts pin which was reassigned to 40.&amp;nbsp; I think I am not understanding how to know which pins to use.&amp;nbsp; The 52840 is on the BLG840X through the BT840 module which remaps some of the pins.&amp;nbsp; (datasheet page 14:&amp;nbsp;&lt;a href="https://www.mouser.com/datasheet/2/915/BlueNor_BT840F_datasheets-1622692.pdf"&gt;https://www.mouser.com/datasheet/2/915/BlueNor_BT840F_datasheets-1622692.pdf&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How do I know which pins are able to connect between the BLG840X 9160 and 52840?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My first thought was to try and match the pins used in the sample you referenced on github, but I wasn&amp;#39;t sure if the BLG840X uses the same connections.&amp;nbsp; For instance in the sample&amp;#39;s 52840 overlay file it uses P0.20 (AD16)&amp;nbsp; for the RX-pin.&amp;nbsp; This pin is listed as E1 in the BT840 datasheet, so how would I remap this in my overlay file for the BLG840X?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/thread/360241?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 10:51:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5ecb47f-ab41-46bd-aee3-a1356c5042c6</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Jake&lt;/p&gt;
&lt;p&gt;It seems you are trying to set up uart1 to use exactly the same pins as uart0 in the nRF52840 DTS configuration.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is possible, but then you would have to either disable the uart0 interface, or move it to use some other pins.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;UART0 and UART1 should be completely interchangeable, yes, so in this case you might as well just use uart0 as it is, rather than enable uart1 on the same pins. In my example I use uart1 for the chip to chip communication on both sides, in order to allow me to keep UART logging enabled on uart0 as normal.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you do decide to use uart0 rather than uart1 on the nRF52840 side, keep in mind that uart0 is the default option for logging, the shell and serial bootloader in the DTS file:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;em&gt;&lt;/em&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="c_cpp"&gt;chosen {
	zephyr,console = &amp;amp;uart0;
	zephyr,shell-uart = &amp;amp;uart0;
	zephyr,uart-mcumgr = &amp;amp;uart0;
	zephyr,bt-mon-uart = &amp;amp;uart0;
	zephyr,sram = &amp;amp;sram0;
	zephyr,flash = &amp;amp;flash0;
};&lt;/pre&gt;
&lt;div&gt;&lt;em&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;If you don&amp;#39;t use any of these features this shouldn&amp;#39;t be a problem, but if you want to use them you might want to change these to use UART1.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/thread/360091?ContentTypeID=1</link><pubDate>Fri, 25 Mar 2022 17:32:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aba52a09-563e-4d28-8426-a9bea1a0bbe1</guid><dc:creator>jake11212</dc:creator><description>&lt;p&gt;Okay, I will work on getting the logic analyzer and testing.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote userid="2116" url="~/f/nordic-q-a/85745/zephyr-uart-on-fanstel-blg840f/360031#360031"]Pretty much all you would need to include in your code are those two overlays (for the 9160 and 52840 respectively), and then use UART1 on each side to communicate with the other device.[/quote]
&lt;p&gt;I was currently using&amp;nbsp;&amp;nbsp;&lt;span&gt;DT_LABEL&lt;/span&gt;&lt;span&gt;( &lt;/span&gt;&lt;span&gt;DT_NODELABEL&lt;/span&gt;&lt;span&gt;( uart1 ) ) ) == &lt;/span&gt;&lt;span&gt;0 as my argument for device_get_binding on the 52840 and&amp;nbsp;&lt;/span&gt;&lt;span&gt;DT_LABEL&lt;/span&gt;&lt;span&gt;( &lt;/span&gt;&lt;span&gt;DT_NODELABEL&lt;/span&gt;&lt;span&gt;( uart0 ) ) ) == &lt;/span&gt;&lt;span&gt;0 as my argument for device_get_binding on the 9160.&amp;nbsp; In the 52840 I am using this as my overlay file:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart1 {
	current-speed = &amp;lt;115200&amp;gt;;
	status = &amp;quot;ok&amp;quot;;
	tx-pin = &amp;lt;3&amp;gt;;
	rx-pin = &amp;lt;5&amp;gt;;
	rts-pin = &amp;lt;40&amp;gt;; // P1.08 = 32 + 8
	cts-pin = &amp;lt;7&amp;gt;;
};&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But just noticed I am getting the error: overlapping assignment on pin 5.&amp;nbsp; It is already being used as the rts-pin for uart0 in the device tree.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; Might my setup here be an issue? Should I be using UART0 or UART1 for both boards? &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And I assumed UART0 and UART1 were meant to be compatible&amp;nbsp;so I assumed that their pins were configured correctly in the zephyr.dts file, but I still have the overlap error.&amp;nbsp; Do I need to do something to resolve this?&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/thread/360031?ContentTypeID=1</link><pubDate>Fri, 25 Mar 2022 13:53:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d12912a-22cb-4d51-bd36-712585e89885</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Jake&lt;/p&gt;
&lt;p&gt;Correct, you need to use pins that are shared between the nRF9160 and the nRF52840, and configure the nRF52840 to enable these pins in the DTS configuration (overlay).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I tested this myself, using a simple UART example, to ensure it worked as expected:&amp;nbsp;&lt;br /&gt;&lt;a href="https://github.com/too1/ncs-uart-async-count-rx/tree/9160dk-91-to-52-uart-test"&gt;https://github.com/too1/ncs-uart-async-count-rx/tree/9160dk-91-to-52-uart-test&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Pretty much all you would need to include in your code are those two overlays (for the 9160 and 52840 respectively), and then use UART1 on each side to communicate with the other device.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Whichever pins you use they should be accessible on the pin headers, in case you want to check them with the logic analyzer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/thread/359889?ContentTypeID=1</link><pubDate>Thu, 24 Mar 2022 20:41:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29460dba-e0ec-4c6d-b46c-e40c2c0c17bf</guid><dc:creator>jake11212</dc:creator><description>&lt;p&gt;I have a 9160DK so&amp;nbsp; I could try and run it on there, I think I would just have to change my overlay file to correct for the different rx and tx pins.&amp;nbsp; I don&amp;#39;t have a logic analyzer but I could get access to one, are they just able to plug into the pins of the 9160DK?&amp;nbsp; So I would just have to probe the pins being used for UART directly?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/thread/359786?ContentTypeID=1</link><pubDate>Thu, 24 Mar 2022 12:11:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31874442-ea1a-4578-a7df-eafec7ad73da</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Jake&lt;/p&gt;
&lt;p&gt;I guess you are right, if the module is encased it would be hard to get access to these pins, unless you break it apart.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Would you happen to have a nRF9160DK available that you can test with, or the DK from Fanstel shown in their &lt;a href="https://static1.squarespace.com/static/561459a2e4b0b39f5cefa12e/t/5d4081aa128a6700017a61cb/1564508590507/BLG840F_User_Manual.pdf"&gt;user guide&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/thread/359657?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2022 15:34:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4752666d-b32e-44b3-ad31-cd3ef7ca6641</guid><dc:creator>jake11212</dc:creator><description>&lt;p&gt;I&amp;#39;m using the Fanstel BLG840X and I don&amp;#39;t think I can access the UART pins for communicating between the boards can I?&amp;nbsp; I don&amp;#39;t see anything on the board that I could easily probe unless there is another way.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/thread/359576?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2022 11:18:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef12634c-81ad-4302-a43d-d0e56e5c5235</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Jake&lt;/p&gt;
&lt;p&gt;Håkon is currently unavailable, and I will handle the case instead.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you checked with a scope or logic analyzer whether or not the data is actually sent over the bus, from the 9160 to the 52840?&lt;/p&gt;
&lt;p&gt;Do you know if flow control is used or not?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/thread/359232?ContentTypeID=1</link><pubDate>Mon, 21 Mar 2022 20:22:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fc848be-3a1a-476b-8d2e-c29f980e7d76</guid><dc:creator>jake11212</dc:creator><description>&lt;p&gt;Just wanted to update with some tests I ran.&amp;nbsp; I also realized I didn&amp;#39;t post the entire uart event handler in the first post and have since updated it (the second code block in the original post):&lt;/p&gt;
&lt;p&gt;I verified that on the 9160 the data and length are being read correctly and the uart_tx function is returning 0, so the send seems to be functioning correctly.&lt;/p&gt;
&lt;p&gt;On the 52840 side it seems that the event handler registered using uart_callback_set is not being called even tho the uart_tx is sending without error.&amp;nbsp; I know the pins are configured correctly too since it works as expected sending from the 52840 to the 9160.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART on Fanstel BLG840F</title><link>https://devzone.nordicsemi.com/thread/358075?ContentTypeID=1</link><pubDate>Mon, 14 Mar 2022 20:29:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d33b5f1-30de-4e9d-b9e2-1951aca1b0bf</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi Jake,&lt;/p&gt;
&lt;p&gt;Thank you for the request. Just letting you know I have starting to look into this. I will get back to you tomorrow or the day after.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>