<?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>XIAO NRF52840 BLE - USB and BLE Issues</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103064/xiao-nrf52840-ble---usb-and-ble-issues</link><description>Hello, 
 I have the xiao ble/seeed studio nrf52840 and I&amp;#39;m trying to run the following SDK projects using armgcc: 
 - usbd_hid_composite 
 - ble_app_hids_keyboard 
 No matter what I do, I can&amp;#39;t see the device show up in Windows 11 via bluetooth or USB</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 30 Aug 2023 10:59:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103064/xiao-nrf52840-ble---usb-and-ble-issues" /><item><title>RE: XIAO NRF52840 BLE - USB and BLE Issues</title><link>https://devzone.nordicsemi.com/thread/443702?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2023 10:59:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2735468c-dd4f-4cfb-bfe6-2e7c53c87731</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Nick,&lt;/p&gt;
&lt;p&gt;Please try the attached hex file and see if it works. I built it from the&amp;nbsp;&lt;span&gt;usbd_hid_generic project.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3034.nrf52840_5F00_xxaa.hex"&gt;devzone.nordicsemi.com/.../3034.nrf52840_5F00_xxaa.hex&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO NRF52840 BLE - USB and BLE Issues</title><link>https://devzone.nordicsemi.com/thread/443309?ContentTypeID=1</link><pubDate>Mon, 28 Aug 2023 08:27:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f899e07-a2ea-4b7c-99f2-6927f26062e5</guid><dc:creator>NutNick</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried that example too but still nothing showed up for me in Windows.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The CDC COM port for USB did show up when I ran the &amp;quot;usbd_ble_uart&amp;quot; example though. At least USB shows up in some form. HID seems to be an issue.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO NRF52840 BLE - USB and BLE Issues</title><link>https://devzone.nordicsemi.com/thread/443297?ContentTypeID=1</link><pubDate>Mon, 28 Aug 2023 07:52:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3b43f45-a1a5-4889-98ef-c5a0f95028d6</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Nick,&lt;/p&gt;
&lt;p&gt;I guess the most important thing is that it works now. With regards HID over USB, could you please try the &amp;#39;usbd_hid_generic&amp;#39; example with the same linker script to see if that works?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO NRF52840 BLE - USB and BLE Issues</title><link>https://devzone.nordicsemi.com/thread/443222?ContentTypeID=1</link><pubDate>Fri, 25 Aug 2023 22:14:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f083885b-f9ea-427b-93d8-11a7fba1d1f4</guid><dc:creator>NutNick</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;There is a possibility that my strange setup caused the problem. I&amp;#39;m using mingw and I&amp;#39;ve installed make manually.&amp;nbsp;I&amp;#39;m not sure! All I know is that bluetooth is working properly now after changing my PATH environment variable :/&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As for the USB project, I modified the linker script but am still unable to successfully run the example (windows does not show the USB composite device). I&amp;#39;ll try to see if I can look more into the sdk_config.h to see if there is anything that this board doesn&amp;#39;t support... and I&amp;#39;ll try other USB examples in the meantime.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO NRF52840 BLE - USB and BLE Issues</title><link>https://devzone.nordicsemi.com/thread/443102?ContentTypeID=1</link><pubDate>Fri, 25 Aug 2023 07:18:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12470b00-35e7-4df2-bf44-e0c2f4af31b2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Nick,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m glad to hear that you were able to find the problem with the BLE example. I&amp;#39;m not sure what the problem was though - Make should only invoke the toolchain specified in Makefile.Windows. It does not look for toolchains in PATH env. variable.&amp;nbsp;&lt;/p&gt;
[quote user="NutNick"]I&amp;#39;ve modified the linker script to have the same components as the &amp;quot;ble_app_hids_keyboard&amp;quot; project but it doesn&amp;#39;t seem to work:[/quote]
&lt;p&gt;The USBD example does not include the softdevice/ble stack so the application must be linked to start on top of the MBR at 0x1000 instead. Please try with this memory layout instead:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;MEMORY
{
  FLASH (rx) : ORIGIN = 0x1000, LENGTH = 0xff000
  RAM (rwx) :  ORIGIN = 0x20000008, LENGTH = 0x3fff8
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Flash layout with bootloader and MBR&lt;/strong&gt;&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/pastedimage1692947868482v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO NRF52840 BLE - USB and BLE Issues</title><link>https://devzone.nordicsemi.com/thread/443052?ContentTypeID=1</link><pubDate>Thu, 24 Aug 2023 22:02:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d49a6e2-0d36-43a7-bb4e-0b59a19b2801</guid><dc:creator>NutNick</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I found the problem. I had &amp;quot;arm-none-eabi-gcc --version&amp;quot; pointing to a bin folder that contained version 10.3.1 but my SDK ($(sdk_location)/components/toolchain/gcc/makefile.windows) was pointing to a local bin of version 9.3.1. Changing my &amp;quot;path&amp;quot; in windows environment variables to my local bin of version 9.3.1 fixed the issues with bluetooth. I can now see the &amp;quot;Nordic_Keyboard&amp;quot; in the bluetooth digest after installing the &amp;quot;ble_app_hids_keyboard&amp;quot; example to my board.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Still, I cannot get the &amp;quot;usbd_hid_composite&amp;quot; example to work on my board though. It seems as though every time I run the example... it overwrites my soft device in flash.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve modified the linker script to have the same components as the &amp;quot;ble_app_hids_keyboard&amp;quot; project but it doesn&amp;#39;t seem to work:&lt;/p&gt;
&lt;p&gt;FLASH (rx) : ORIGIN = 0x27000, LENGTH = 0xd9000&lt;br /&gt; RAM (rwx) : ORIGIN = 0x20002260, LENGTH = 0x3dda0&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO NRF52840 BLE - USB and BLE Issues</title><link>https://devzone.nordicsemi.com/thread/442680?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2023 06:37:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a634b325-b0e4-40f6-9ed5-f5ae54ef9007</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Nick,&lt;/p&gt;
&lt;p&gt;When you try to add the BLE keyboard, is the problem that you are not able to discover it, or that it fails to connect?&lt;/p&gt;
&lt;p&gt;I tried the example without any modifications on a 52840 DK and a Windows 11 PC:&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/pastedimage1692772609813v2.jpeg" alt=" " /&gt;&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/thumbnail_5F00_after_5F00_connection.jpg" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO NRF52840 BLE - USB and BLE Issues</title><link>https://devzone.nordicsemi.com/thread/442676?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2023 06:06:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce588f99-4b58-415b-9f5c-d531948f60c1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Nick,&lt;/p&gt;
&lt;p&gt;Sorry, I somehow overlooked the fact that you were able to connect the HID BLE example with your phone, even though you highlighted it in your initial post. This suggests that the BLE firmware was built and programmed correctly, ruling out a configuration issue. I will find a Windows 11 PC here and see if I can reproduce the problem on my side.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO NRF52840 BLE - USB and BLE Issues</title><link>https://devzone.nordicsemi.com/thread/442666?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2023 03:36:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6fa033c-a790-4c89-affc-fa6d20c6fff5</guid><dc:creator>NutNick</dc:creator><description>&lt;p&gt;Hi Vidar, thank you for your response.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I changed the clock from external to internal and &lt;strong&gt;nothing changed&lt;/strong&gt; for both the BLE keyboard and USB HID composite projects. I can still see the device via the nrf connect app on my phone when running the BLE keyboard project but not windows.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;That makes sense, and I checked just in case. This xiao ble/seeed studio nrf52840 has a 32 KHz crystal and a 32 MHz crystal. I&amp;#39;ll double check the sdk_config.h settings to see if the settings are incorrect (thank you, I forgot about this file).&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/pastedimage1692761660305v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m unsure if you can use this link, but this is the board schematic:&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://files.seeedstudio.com/wiki/XIAO-BLE/Seeed-Studio-XIAO-nRF52840-Sense-v1.1.pdf"&gt;https://files.seeedstudio.com/wiki/XIAO-BLE/Seeed-Studio-XIAO-nRF52840-Sense-v1.1.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, thank you for the tip about the linker script; I used the original setup.&lt;/p&gt;
&lt;p&gt;MEMORY&lt;br /&gt;{&lt;br /&gt; FLASH (rx) : ORIGIN = 0x27000, LENGTH = 0xd9000&lt;br /&gt; RAM (rwx) : ORIGIN = 0x20002260, LENGTH = 0x3dda0&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;Two questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;do you know of anything else I can do in the meantime while I review the sdk_config.h file for issues?&lt;/li&gt;
&lt;li&gt;do you know why windows 11 wont detect the device via bluetooth?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO NRF52840 BLE - USB and BLE Issues</title><link>https://devzone.nordicsemi.com/thread/442512?ContentTypeID=1</link><pubDate>Tue, 22 Aug 2023 11:23:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fb1dad2-02b3-480a-a2ac-4645ce5c69a9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Nick,&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Please try changing the low-frequency clock source from the default 32 kHz crystal oscillator (which is the default for all nRF5 SDK BLE projects) to the internal 32 kHz RC oscillator. Then, see if you get the same result. The 32 kHz crystal is optional, and I&amp;#39;m not sure if it is included in your BT module. If you select the crystal oscillator and run the code on a board that doesn&amp;#39;t have the crystal mounted, the startup code will enter an infinite loop, waiting for the crystal to ramp up.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;sdk_config.h settings to select the internal RC oscillator:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;/h&amp;gt; 
//==========================================================

// &amp;lt;h&amp;gt; Clock - SoftDevice clock configuration

//==========================================================
// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_SRC_RC 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_SRC_XTAL 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_SRC_SYNTH 

#ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
#ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 8
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
// &amp;lt;i&amp;gt; How often (in number of calibration intervals) the RC oscillator shall be calibrated
// &amp;lt;i&amp;gt;  if the temperature has not changed.

#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_ACCURACY_250_PPM 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_ACCURACY_500_PPM 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_ACCURACY_150_PPM 
// &amp;lt;3=&amp;gt; NRF_CLOCK_LF_ACCURACY_100_PPM 
// &amp;lt;4=&amp;gt; NRF_CLOCK_LF_ACCURACY_75_PPM 
// &amp;lt;5=&amp;gt; NRF_CLOCK_LF_ACCURACY_50_PPM 
// &amp;lt;6=&amp;gt; NRF_CLOCK_LF_ACCURACY_30_PPM 
// &amp;lt;7=&amp;gt; NRF_CLOCK_LF_ACCURACY_20_PPM 
// &amp;lt;8=&amp;gt; NRF_CLOCK_LF_ACCURACY_10_PPM 
// &amp;lt;9=&amp;gt; NRF_CLOCK_LF_ACCURACY_5_PPM 
// &amp;lt;10=&amp;gt; NRF_CLOCK_LF_ACCURACY_2_PPM 
// &amp;lt;11=&amp;gt; NRF_CLOCK_LF_ACCURACY_1_PPM 

#ifndef NRF_SDH_CLOCK_LF_ACCURACY
#define NRF_SDH_CLOCK_LF_ACCURACY 1
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Regarding the linker scripts, the Softdevice/App will fail to boot when you set the RAM base address to&amp;nbsp;0x20000000 as you did (see &lt;a title="Memory resource map and usage" href="https://infocenter.nordicsemi.com/topic/sds_s140/SDS/s1xx/mem_usage/mem_resource_map_usage.html?cp=5_7_4_0_13_0"&gt;Memory resource map and usage&lt;/a&gt;). But you should be able to use the original one provided by the&amp;nbsp;&lt;span&gt;ble_app_hids_keyboard example.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>