<?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>nrf52840dongle reboot when push notification to central in gpio callback</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93888/nrf52840dongle-reboot-when-push-notification-to-central-in-gpio-callback</link><description>I using NCS V2.1.2 toolchain and two nrf52840_dongle and following this tutorial: https://webinars.nordicsemi.com/developing-bluetooth-low-energy-6 
 First dongle follow the code on tutorial and second dongle using nrf connect desktop bluetooth low energy</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Nov 2022 15:09:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93888/nrf52840dongle-reboot-when-push-notification-to-central-in-gpio-callback" /><item><title>RE: nrf52840dongle reboot when push notification to central in gpio callback</title><link>https://devzone.nordicsemi.com/thread/396720?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 15:09:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:066b58ea-3fa0-473e-b374-2b73d25d0d23</guid><dc:creator>HoangDuong</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/93888/nrf52840dongle-reboot-when-push-notification-to-central-in-gpio-callback/396714"]You can also connect P0.20 and P0.22 (from the nRF53DK) to whatever pins you want to use as UART, and then monitor the UART through the COM port of the DK[/quote]
&lt;p&gt;Thanks, that help me a lot of information for debug PDM mic on thingy:53&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks you so much, Edvin&lt;/p&gt;
&lt;p&gt;BR,&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840dongle reboot when push notification to central in gpio callback</title><link>https://devzone.nordicsemi.com/thread/396714?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 14:57:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8cfedc9-9c66-4824-a837-1b60691b65db</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Yes, you can. You can also connect P0.20 and P0.22 (from the nRF53DK) to whatever pins you want to use as UART, and then monitor the UART through the COM port of the DK. Or you can use RTT logging, of course, as long as the debugger is connected to the dongle.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840dongle reboot when push notification to central in gpio callback</title><link>https://devzone.nordicsemi.com/thread/396696?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 14:19:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:340ec775-c9da-41d3-997e-3e3b8bb7ca4c</guid><dc:creator>HoangDuong</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/93888/nrf52840dongle-reboot-when-push-notification-to-central-in-gpio-callback/396631"] but you will still not have the possibility to step through the code[/quote]
&lt;p&gt;can i will use nrf5340-dk with debug output port (P20) connect to SWDIO and SWDCLK (P1 or J2) (no need of SWO pin !?)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840dongle reboot when push notification to central in gpio callback</title><link>https://devzone.nordicsemi.com/thread/396631?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 12:00:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d94983d-3657-4277-bd2b-91c35e27881f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;yes, but you will still not have the possibility to step through the code.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840dongle reboot when push notification to central in gpio callback</title><link>https://devzone.nordicsemi.com/thread/396614?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 11:13:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a5e18f7-e84e-4908-a0ef-a102801552f8</guid><dc:creator>HoangDuong</dc:creator><description>&lt;p&gt;Thanks so much&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That point me out problem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;PS: if i using external USB UART bridge connect to UART0 of nrf52840-dongle (P0.20 and P0.17),&amp;nbsp;do i get the same debug data as your picture above ???&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840dongle reboot when push notification to central in gpio callback</title><link>https://devzone.nordicsemi.com/thread/396590?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 09:34:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51832aff-4153-4920-9b4a-6363a69d0e3a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok, so I saw what you reported, and then I ripped out the USB part of your code, and replaced it with UART logging. This is the log from trying to send the notification:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1669022198142v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;And since the USB is running as part of your application, it was not able to print the log via USB.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;These are the assert that is causing it to reset:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;	struct net_buf *buf;

	/*
	 * PDU must not be allocated from ISR as we block with &amp;#39;K_FOREVER&amp;#39;
	 * during the allocation
	 */
	__ASSERT_NO_MSG(!k_is_in_isr());&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So apparently, it has to do with the way that you have set up your button handler.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I either suggest that you use the button handler that is used in the webinar, or you need to schedule the work to be handled outside of a direct interrupt (which your button handler is). The problem is that if it wasn&amp;#39;t for the assert, then your application would hang forever, because it will be waiting for an interrupt with the same or lower priority than what it already is running.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I guess that&amp;nbsp;dk_buttons_and_leds.h/.c will do this for you.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And again, the dongle is not a good board to write code on, exactly because of the lack of debugging and seeing the logs properly, like in this case.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840dongle reboot when push notification to central in gpio callback</title><link>https://devzone.nordicsemi.com/thread/396317?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2022 01:09:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5874ec66-27dc-4a99-8946-37d313578dba</guid><dc:creator>HoangDuong</dc:creator><description>&lt;p&gt;this is my project&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/dongle_5F00_console.zip"&gt;devzone.nordicsemi.com/.../dongle_5F00_console.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regard,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840dongle reboot when push notification to central in gpio callback</title><link>https://devzone.nordicsemi.com/thread/396223?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2022 13:21:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adf48a8b-6852-40d9-a4f1-c926e642f020</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;You can upload it here. Just drag-n-drop it into where you are typing the messages.&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840dongle reboot when push notification to central in gpio callback</title><link>https://devzone.nordicsemi.com/thread/396011?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 14:16:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4f58e21-d4e1-4721-844b-10aad5804058</guid><dc:creator>HoangDuong</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/93888/nrf52840dongle-reboot-when-push-notification-to-central-in-gpio-callback/396009"]Can you send me a copy of your project, so that I can try to reproduce it on a DK[/quote]
&lt;p&gt;Sure, how can i send to you !?&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/93888/nrf52840dongle-reboot-when-push-notification-to-central-in-gpio-callback/396009"]So you should really consider getting hold of a DK[/quote]
&lt;p&gt;I dont have nrf52840DK, i have nrf5340-DK, i try implement to nrf5340-DK but not success. I struggle with multiCore on nrf5340 so maybe i will stick to nrf52840 for current project.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840dongle reboot when push notification to central in gpio callback</title><link>https://devzone.nordicsemi.com/thread/396009?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 14:08:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63c73d02-4bf9-4ae1-b2f7-1fa968e75e66</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Can you send me a copy of your project, so that I can try to reproduce it on a DK?&lt;/p&gt;
&lt;p&gt;So it just disconnects from the Serial Port, suggesting that the application crashed, and it is not able to print it in the log. I am afraid it is still very hard to develop without a debugger. So you should really consider getting hold of a DK. But please send me the project, and I can look at it for this issue in particular.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840dongle reboot when push notification to central in gpio callback</title><link>https://devzone.nordicsemi.com/thread/395890?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 02:25:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d809d190-7515-41b9-8b02-01baca604659</guid><dc:creator>HoangDuong</dc:creator><description>&lt;p&gt;Hi Edvin,&amp;nbsp;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/93888/nrf52840dongle-reboot-when-push-notification-to-central-in-gpio-callback/395826"]Does your log every say: &amp;quot;couldn&amp;#39;t send notification, err: %d&amp;quot;, err&amp;quot; if the notifications are either enabled or disabled before it reboots?[/quote]
&lt;p&gt;Yes, when notification are disable my log say that, here my log when notification disable and press button:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screen-Shot-2022_2D00_11_2D00_16-at-09.32.12.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:05:46.200,775] &amp;lt;inf&amp;gt; app: Button 6 pressed 1
[00:05:46.200,836] &amp;lt;wrn&amp;gt; bt_gatt: Device is not subscribed to characteristic
[00:05:46.200,866] &amp;lt;inf&amp;gt; remote: send button notification code: -22
[00:05:46.200,866] &amp;lt;err&amp;gt; app: couldn&amp;#39;t send notification, err: -22
[00:05:46.201,110] &amp;lt;inf&amp;gt; app: Button 6 pressed 2
[00:05:46.201,171] &amp;lt;wrn&amp;gt; bt_gatt: Device is not subscribed to characteristic
[00:05:46.201,202] &amp;lt;inf&amp;gt; remote: send button notification code: -22
[00:05:46.201,202] &amp;lt;err&amp;gt; app: couldn&amp;#39;t send notification, err: -22&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;when notification enable my log say:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;00:10:09.652,130] &amp;lt;inf&amp;gt; remote: notification enabled
[00:10:09.652,160] &amp;lt;inf&amp;gt; app: Notification enabled&lt;/pre&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/93888/nrf52840dongle-reboot-when-push-notification-to-central-in-gpio-callback/395826"]When it reboots? Does the log say anything?[/quote]
&lt;p&gt;when notification are enable and i press button, it will disconnect Bluetooth and reboot.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:10:09.652,130] &amp;lt;inf&amp;gt; remote: notification enabled
[00:10:09.652,160] &amp;lt;inf&amp;gt; app: Notification enabled


Disconnected

Connected via Serial Port with settings /dev/tty.usbmodem141301 115200 8n1 rtscts:off&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840dongle reboot when push notification to central in gpio callback</title><link>https://devzone.nordicsemi.com/thread/395826?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 14:44:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9583ea41-a073-4574-9b27-968431021d13</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]Because using dongle instead of nrf52840-DK i was implement USB CDC ACM console follow example code (for debug),[/quote]
&lt;p&gt;What does that mean? Do you get the log module output through the USB (LOG_INF(), LOG_ERR(), ...), or are you able to send custom log messages through the USB? The reason I ask is because the log module will let you know if anything is wrong, while a custom log module isn&amp;#39;t aware of those errors.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Does your log every say: &amp;quot;couldn&amp;#39;t send notification, err: %d&amp;quot;, err&amp;quot; if the notifications are either enabled or disabled before it reboots?&lt;/p&gt;
&lt;p&gt;When it reboots? Does the log say anything?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I really recommend that you get hold of a DK when developing applications. It makes things a lot easier for you, being able to step through the code to see what&amp;#39;s going on.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>