<?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>&amp;quot;ASSERTION FAIL [err == 0] k_sem_take failed with err -11&amp;quot; when HCI is used with LP-UART</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73177/assertion-fail-err-0-k_sem_take-failed-with-err--11-when-hci-is-used-with-lp-uart</link><description>Test setup - 
 1. nRF52840 DK - 1 as hci host, 1 as hci controller 
 2. HCI Host runs nrf/samples/bluetooth/peripheral_hr_coded with modified configuration (attached as conf_hci_host.zip) 
 3. HCI Controller runs nrf/samples/bluetooth/hci_lpuart with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Mar 2021 11:04:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73177/assertion-fail-err-0-k_sem_take-failed-with-err--11-when-hci-is-used-with-lp-uart" /><item><title>RE: "ASSERTION FAIL [err == 0] k_sem_take failed with err -11" when HCI is used with LP-UART</title><link>https://devzone.nordicsemi.com/thread/302115?ContentTypeID=1</link><pubDate>Fri, 26 Mar 2021 11:04:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3b652b2-7022-45e1-9cf2-b116fea910a2</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi!&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve spent some time looking into this now and while I haven&amp;#39;t found a fix yet, I think I&amp;#39;ve found the source of the issue. The host and controller must be synchronized somehow, this is, from what I can see, done by resetting the controller when the host is ready. On the nRF9160DK there is a dedicated reset line between the nRF52840 SoC and nRF9160 SiP, as well as firmware handling the hci setup. This is not implemented for the nRF52840DK.&lt;br /&gt;&lt;br /&gt;I suggest that you study the &lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/master/boards/arm/nrf9160dk_nrf9160"&gt;nrf9160dk_nrf9160&lt;/a&gt; and &lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/master/boards/arm/nrf9160dk_nrf52840"&gt;nrf9160dk_nrf52840&lt;/a&gt;&amp;nbsp;board definitions&amp;nbsp;in the Zephyr, as well as the file &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/master/boards/arm/nrf9160dk_nrf9160/nrf52840_reset.c"&gt;nRF52840_reset.c&lt;/a&gt;, and see if you can reverse engineer the nRF9160DK setup to work for the two nRF52840 DKs. I&amp;#39;ll have a look at this myself next week.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Bes regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "ASSERTION FAIL [err == 0] k_sem_take failed with err -11" when HCI is used with LP-UART</title><link>https://devzone.nordicsemi.com/thread/301751?ContentTypeID=1</link><pubDate>Wed, 24 Mar 2021 15:50:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8f98f2e-423e-4413-b94a-75c323395f78</guid><dc:creator>Anirudh Agarkhed</dc:creator><description>&lt;p&gt;Yes, have used both 1000000 and 115200. When I was zipping the file, the config was set to 115200.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Anirudh Agarkhed&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "ASSERTION FAIL [err == 0] k_sem_take failed with err -11" when HCI is used with LP-UART</title><link>https://devzone.nordicsemi.com/thread/301749?ContentTypeID=1</link><pubDate>Wed, 24 Mar 2021 15:48:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37faa04e-9176-4e9f-81a5-d51c8dccea22</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Understood! Then I will do some testing tomorrow and see if I can reproduce.&amp;nbsp;&lt;/p&gt;
[quote user="Anirudh Agarkhed"]Just as an additional question, can HCI function over 2 Wire UART, and not mandate H4 which depends on 4 wire UART - CTS/RTS?[/quote]
&lt;p&gt;It can. This is a restriction related to the hci_uart sample of Zephyr, and does not limit hci_lp_uart.&lt;br /&gt;&lt;br /&gt;By the way, have you tried using 1000000 baud rate?&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: "ASSERTION FAIL [err == 0] k_sem_take failed with err -11" when HCI is used with LP-UART</title><link>https://devzone.nordicsemi.com/thread/301738?ContentTypeID=1</link><pubDate>Wed, 24 Mar 2021 15:29:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68adfb5e-5942-4ae5-8f8e-25e71b522634</guid><dc:creator>Anirudh Agarkhed</dc:creator><description>&lt;p&gt;Hello Carl,&lt;/p&gt;
&lt;p&gt;Yes, that option is used, and also the example that you have mentioned is being used as a reference. Just as an additional question, can HCI function over 2 Wire UART, and not mandate H4 which depends on 4 wire UART - CTS/RTS?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Anirudh Agarkhed&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "ASSERTION FAIL [err == 0] k_sem_take failed with err -11" when HCI is used with LP-UART</title><link>https://devzone.nordicsemi.com/thread/301726?ContentTypeID=1</link><pubDate>Wed, 24 Mar 2021 15:02:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b30e808e-1048-4ff5-a00c-1ce1068f51b4</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;Anirudh!&lt;br /&gt;&lt;br /&gt;I&amp;#39;m looking into this. Have you made sure that the hci_host has the correct configuration, including&amp;nbsp;&lt;strong&gt;CONFIG_BT_H4=y&lt;/strong&gt; for enabling HCI over UART? You can look at the samples/nrf9160/lte_ble_gateway sample for reference.&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></channel></rss>