<?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>calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60563/calling-nrf_ble_scan_filter_set-breaks-debugging</link><description>I am in the process of adding central functionality to ble_app_buttonless_dfu on a PCA10056. 
 
 When I call nrf_ble_scan_filter_set, the resulting builds debugging is broken, and loops in softdevice address space forever. Without the scan filter set</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 May 2020 16:55:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60563/calling-nrf_ble_scan_filter_set-breaks-debugging" /><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/248291?ContentTypeID=1</link><pubDate>Tue, 05 May 2020 16:55:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdc2398e-7ba3-4073-a8a5-b53f6ee18df5</guid><dc:creator>sschumac</dc:creator><description>&lt;p&gt;Thank you for the assistance Edvin!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/248053?ContentTypeID=1</link><pubDate>Tue, 05 May 2020 06:50:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba29cbc1-9ee3-4be5-ae28-661ed999c131</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;You shouldn&amp;#39;t really flash via SES when you have a bootloader, because of the bootloader. Even though you use the same project that the .hex file was generated from, SES doesn&amp;#39;t use the .hex file when you flash it. It uses the .elf or .out file (don&amp;#39;t remember which one on this IDE). However, this file is a little different from the hex file that the bootloader settings is generated from (different padding on [u]intN_t, N = 8, 16. This will ruin the bl_settings, because the CRC of the application will change. The details are not important, but in SES, there is an option in the &amp;quot;tools&amp;quot; menu, called &amp;quot;Attach debugger&amp;quot;. Use this so that SES doesn&amp;#39;t flash anything.&lt;/p&gt;
&lt;p&gt;Of course, remember to program the application hex file in your script. When you do this, you can debug your application in SES, even though SES hasn&amp;#39;t flashed it directly. Just add the line:&lt;/p&gt;
&lt;p&gt;nrfjprog --program Output/Debug/Exe/ble_app_buttonless_dfu_pca10056_s140.hex --verify&lt;/p&gt;
&lt;p&gt;before the &amp;quot;nrfjprog --reset&amp;quot; line, and use the &amp;quot;Attach Debugger&amp;quot; feature.&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: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/248036?ContentTypeID=1</link><pubDate>Tue, 05 May 2020 03:04:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03afdf82-d3d3-4c4f-a1cb-0ad5c14f4f1d</guid><dc:creator>sschumac</dc:creator><description>&lt;p&gt;Your assumptions are correct, I have just found the issue is only present when flashing the image via SES (which I was doing implicitly by hitting the play button).&amp;nbsp;&lt;br /&gt;&lt;br /&gt;When I use the project output from SES build and flashing via the command line, it appears to be working as expected, attaching the debugger via SES shows the correct output!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After running this script&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;mkdir files
make -j9 -C ../../../../../dfu/secure_bootloader/pca10056_s140_ble/armgcc
cp ../../../../../dfu/secure_bootloader/pca10056_s140_ble/armgcc/_build/nrf52840_xxaa_s140.hex files/bl.hex 
cp ../../../../../dfu/private.key files/private.key

nrfutil settings generate --family NRF52840 --application Output/Debug/Exe/ble_app_buttonless_dfu_pca10056_s140.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 --key-file files/private.key files/bl_settings.hex

nrfjprog -e
nrfjprog --program files/bl_settings.hex
nrfjprog --program files/bl.hex
nrfjprog --reset&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I can flash the application via SES with the lines commented and it works as expected&lt;/p&gt;
&lt;p&gt;When I run that script again, and then rebuild and reflash via SES with the lines uncommented, the chip goes into bootloader mode. Not exactly sure why flashing via SES works without those lines and stops working with them.&lt;/p&gt;
&lt;p&gt;As seeing as this is an issue localized to only SES flashing, I am at least grateful I can continue on with development.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/247771?ContentTypeID=1</link><pubDate>Mon, 04 May 2020 07:17:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4684c48-d19f-43d0-af57-e8f82725a418</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am trying to figure out what issue you are seeing, and whether or not the issue is what you actually think it is.&lt;/p&gt;
&lt;p&gt;Would you agree that if the device is stuck inside&amp;nbsp;nrf_ble_scan_filter_set(), and never move on, then&amp;nbsp;advertising_start() would never be called?&lt;/p&gt;
&lt;p&gt;Would you agree that if advertising_start() would never be called, then you would not be able to connect to it?&lt;/p&gt;
&lt;p&gt;The file that I sent you is a project based on your project where I am able to connect. I want to rule out that the issue is related to:&lt;/p&gt;
&lt;p&gt;1: Your build setup&lt;/p&gt;
&lt;p&gt;2: Your bootloader or your bootloader settings generation&lt;/p&gt;
&lt;p&gt;3: Debugging method&lt;/p&gt;
&lt;p&gt;4: HW&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So. Are you able to connect to the attached hex file? And do you agree that if you can connect to it, nrf_ble_scan_filter_set() is called successfully, given that you believe that I included that function call in the .hex file?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please correct me if any of my assumptions are incorrect.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/247637?ContentTypeID=1</link><pubDate>Thu, 30 Apr 2020 17:40:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4ffb79b-e389-49b8-9c47-f56912be10d1</guid><dc:creator>sschumac</dc:creator><description>&lt;p&gt;I can flash that file and connect to it, to confirm, that application hex is successfully calling nrf_ble_scan_filter_set?&amp;nbsp;&lt;br /&gt;If so, I will audit all of my build steps again and update this thread with the verified answer. Still a bit confused on how a faulty build step could create an issue where one application hex will boot and the other wont, under the same exact build and load steps.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/247504?ContentTypeID=1</link><pubDate>Thu, 30 Apr 2020 10:47:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b9bbcf7-f8a2-4425-b563-a61995f389ad</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Try to flash the attached file:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-865d4219b384460aba1d149e817102aa/nw_5F00_ex.hex"&gt;devzone.nordicsemi.com/.../nw_5F00_ex.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Remember to erase the flash first. The attached file is a merge of the softdevice and all the other needed files. Are you able to connect to this one?&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: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/247428?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 23:48:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:732f8b30-c0be-4be5-bd51-e834ba969cd9</guid><dc:creator>sschumac</dc:creator><description>&lt;p&gt;Apologies, there is a chance I sent you the hex with the filter_set commented (which is working for me)&lt;br /&gt;I just tried your exact build commands with both hexes, and found the same result. Working with the comments, not working without.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am on an unmodified NRF52840 DK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On a side note, I was under the impression the -bl-settings-version was supposed to be 2 for SDK versions&amp;nbsp; &amp;gt;15.3.0, is that no longer the case?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks to your comments, I did see the app was getting stuck in the bootloader when the lines were uncommented. I am not sure how uncommenting those lines can cause the bootloader to no longer think there is a valid application in flash (application flash placement?)&lt;br /&gt;&lt;br /&gt;For clarity, I renamed and tested both of these hexes so I didnt get one mixed again.&amp;nbsp;&lt;br /&gt;Can you confirm with the commands above, both are working for you?&amp;nbsp;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/commented_5F00_filter_5F00_set_5F00_WORKING.hex"&gt;devzone.nordicsemi.com/.../commented_5F00_filter_5F00_set_5F00_WORKING.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/uncommented_5F00_filter_5F00_set_5F00_NOT_5F00_WORKING.hex"&gt;devzone.nordicsemi.com/.../uncommented_5F00_filter_5F00_set_5F00_NOT_5F00_WORKING.hex&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/247286?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 10:14:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76488515-ea64-4c58-965e-09447c5dd1dd</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I was able to run that application as well, and connect to it. The log said it was connected, so the application is not stuck.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just to straighten up a few things.&lt;/p&gt;
&lt;p&gt;You are indeed using a normal nRF52840 DK, right?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you say that it is stuck in the softdevice, you did try to set a breakpoint before that function call to check that it was reached? I just want to check whether what you are seeing is not that the device is stuck in bootloader mode? Because when I tried to flash the file nRF_Connect_Programmer_1587578570497.hex, it was stuck in DFU mode. I guess because the bootloader settings doesn&amp;#39;t match the application. Did you update the bootloader settings when you changed your application?&lt;/p&gt;
&lt;p&gt;Have a look at the attached .bat script if you are not familiar with bootloader settings.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;mkdir files
make -j9 -C ..\..\..\..\..\dfu\secure_bootloader\pca10056_s140_ble\armgcc
copy ..\..\..\..\..\dfu\secure_bootloader\pca10056_s140_ble\armgcc\_build\nrf52840_xxaa_s140.hex files\bl.hex 
copy ..\..\..\..\..\dfu\private.key files\private.key

nrfutil settings generate --family NRF52840 --application Output\Debug\Exe\ble_app_buttonless_dfu_pca10056_s140.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 --key-file files\private.key files\bl_settings.hex

nrfjprog -e
nrfjprog --program ..\..\..\..\..\..\components\softdevice\s140\hex\s140_nrf52_7.0.1_softdevice.hex --verify
nrfjprog --program Output\Debug\Exe\ble_app_buttonless_dfu_pca10056_s140.hex --verify
nrfjprog --program files\bl_settings.hex
nrfjprog --program files\bl.hex
nrfjprog --reset
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/247152?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 15:48:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0f2928d-264b-4f1e-9e45-2139bea73d85</guid><dc:creator>sschumac</dc:creator><description>&lt;p&gt;&lt;span&gt;Here is the application hex, outputted from ble_app_buttonless_dfu/pca10056/s140/ses/Output/Debug/Exe/ble_app_buttonless_dfu_pca10056_s140.hex&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;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5050.ble_5F00_app_5F00_buttonless_5F00_dfu_5F00_pca10056_5F00_s140.hex"&gt;devzone.nordicsemi.com/.../5050.ble_5F00_app_5F00_buttonless_5F00_dfu_5F00_pca10056_5F00_s140.hex&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/246978?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 07:15:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1dda142c-9254-4dff-b8f6-8b97d3bcce05</guid><dc:creator>Edvin</dc:creator><description>[quote user="sschumac"]On pausing the execution I get dropped into a branch execution somewhere in softdevice address space.[/quote][quote user="sschumac"]If I try and resume execution, the processor will Hard Fault.&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;This is not unexpected. The hardfault is caused by the pause in the execution, and when you pause, it may very well be running in the softdevice.&lt;/p&gt;
&lt;p&gt;Can you compile the application and send me the hex file? Please also tell me the path to where you copied the application hex file from.&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><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/246961?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 05:47:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:504e9801-9658-4328-9f75-cff797e4ebc6</guid><dc:creator>sschumac</dc:creator><description>&lt;p&gt;I have copied the files to a fresh SDK copy, as well as made your prescribed modifications to the SES project, but am still running into the same issue.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;My exact steps for reproduction with the files moved into a clean SDK are as follows.&lt;br /&gt;&lt;br /&gt;1. Build the bootloader via gcc&lt;br /&gt;2. mergehex the bootloader with the s140 softdevice 7.0.1&lt;/p&gt;
&lt;p&gt;3. nrfjprog program the chip with --chiperase, with the merged bootloader softdevice hex&lt;br /&gt;4. Build the application in SES, build configuration = Debug&lt;br /&gt;5. generate a bootloader settings page with&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil settings generate --family NRF52840 --application {SES_OUTPUT_DIR_HERE} --application-version 1 --bootloader-version 1 --bl-settings-version 2 ./Output/settings.hex;&lt;/pre&gt;6. merge the settings hex file with the application hex file&lt;br /&gt;7. program with nrfjprog with the --sectorerase flag&lt;br /&gt;&lt;br /&gt;When I do steps 4 though 7 with those lines commented out, I get the expected behavior of the application, with my debugging logs showing up in SES console, and source maps working as expected.&amp;nbsp;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-from-2020_2D00_04_2D00_27-22_2D00_18_2D00_04.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I redo steps 4 though 7 with those lines uncommented, I do not get the expected output from SES.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;No RTT logs, will not fault unless paused.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-from-2020_2D00_04_2D00_27-22_2D00_21_2D00_03.png" /&gt;&lt;/p&gt;
&lt;p&gt;On pausing the execution I get dropped into a branch execution somewhere in softdevice address space.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-from-2020_2D00_04_2D00_27-22_2D00_21_2D00_14.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If I try and resume execution, the processor will Hard Fault.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-from-2020_2D00_04_2D00_27-22_2D00_21_2D00_32.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/246736?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2020 09:38:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b4e994a-bfd1-415e-b55f-851f422a6b92</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Do I understand your description correctly if the issue was that if you uncommented the commented lines in this snippet, the bottom&amp;nbsp;APP_ERROR_CHECK(err_code) was never reached?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void scan_init(void)
{
    ret_code_t          err_code;
    nrf_ble_scan_init_t init_scan;

    memset(&amp;amp;init_scan, 0, sizeof(init_scan));

    init_scan.p_scan_param     = &amp;amp;m_scan_param;
    init_scan.connect_if_match = true;
    init_scan.conn_cfg_tag     = APP_BLE_CONN_CFG_TAG;

    err_code = nrf_ble_scan_init(&amp;amp;m_scan, &amp;amp;init_scan, scan_evt_handler);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_ble_scan_filters_enable(&amp;amp;m_scan,
                                           NRF_BLE_SCAN_NAME_FILTER,
                                           false);

//    APP_ERROR_CHECK(err_code);
//    err_code = nrf_ble_scan_filter_set(&amp;amp;m_scan,
//                                       SCAN_NAME_FILTER,
//                                       &amp;quot;Viecar&amp;quot;);

    APP_ERROR_CHECK(err_code);

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If that is the case, then I am not able to reproduce the issue.&lt;/p&gt;
&lt;p&gt;Please note that I did a couple of changes:&lt;/p&gt;
&lt;p&gt;I copied only the ble_app_buttonless folder to an unmodified SDK, and copied your folders:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;shiftac_ble_elm327_interface_c&lt;br /&gt;shiftac_controller_service&lt;/p&gt;
&lt;p&gt;to the ble_app_buttonless folder, and included this path to the preprocessor&amp;#39;s user include directories (which is the proper way to include .h files. Don&amp;#39;t include them in the project explorer, like you did), and I removed all files in your project explorer&amp;#39;s &amp;quot;Shiftac Services&amp;quot; folder, and re-included the .c files (only!), so now it looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-865d4219b384460aba1d149e817102aa/pastedimage1587980093106v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can you try this?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is the APP_ERROR_CHECK() on the bottom of the scan_init() reached?&lt;/p&gt;
&lt;p&gt;Or did I misunderstand your issue?&lt;/p&gt;
&lt;p&gt;If the issue remains after copying it into a clean, unmodified SDK, and including the custom files like described above, what output .hex file do you use? the &amp;quot;Debug&amp;quot; or &amp;quot;Release&amp;quot; configuration?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Let me know if any of the instructions wasn&amp;#39;t clear.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/246585?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2020 15:40:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c370bb7-671f-45ea-ad78-cde36ed6b5a2</guid><dc:creator>sschumac</dc:creator><description>&lt;p&gt;Apologies!&lt;br /&gt;&lt;br /&gt;Also yes, that is correct,&lt;br /&gt;&lt;br /&gt;SDK 16.0.0, SES&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here is the full SDK zip with my custom services&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3010.sdk_5F00_16_5F00_app.zip"&gt;devzone.nordicsemi.com/.../3010.sdk_5F00_16_5F00_app.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/246391?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2020 06:39:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5711b5bf-fc2f-421c-b5a2-1695d9f8ad28</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I assume you are using SDK16.0.0 and SES?&lt;/p&gt;
&lt;p&gt;Can you please upload the ble_app_buttonless_dfu.zip with the content of the pca10056 folder as well? All I saw was the main.c file and the IAR project file, but the folders:&lt;/p&gt;
&lt;p&gt;hex&lt;br /&gt;pca10040&lt;br /&gt;pca10040e&lt;br /&gt;pca10056&lt;br /&gt;pca10056e&lt;/p&gt;
&lt;p&gt;Were all empty. I can&amp;#39;t compile the project with only the main.c file, because I see that you have included a lot of files.&lt;/p&gt;
&lt;p&gt;Try unzipping your zip file in an unmodified SDK before uploading it, to make sure that it behaves as you expect. Remember that that is the way the project will behave on my computer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/246383?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2020 03:13:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b65a227c-a331-444a-bb1d-28e471cc4070</guid><dc:creator>sschumac</dc:creator><description>&lt;p&gt;I have tried flipping the auto connect setting, I tried removing const from adapter_name, with no dice.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ill try seeing what I can do FEATURE_JLINK_MONITOR&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/246372?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2020 01:05:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf6872ca-e8d8-40f7-8adc-6141b5f91da6</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Unlikely long shot, maybe DMA is involved, try removing &amp;quot;const&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static char const adapter_name[7] = &amp;quot;Viecar&amp;quot;;

static char adapter_name[7] = &amp;quot;Viecar&amp;quot;;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also try&amp;nbsp;J-Link Monitor which allows you to single step debug while the SoftDevice runs happily in the background without dropping the BLE connection. Try this which I just posted in another stream (assuming you don&amp;#39;t already have it enabled):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#if defined(FEATURE_JLINK_MONITOR)
   // This allows all interrupts higher than _PRIO_SD_LOW (ie 4, BLE SD stuff) to continue execution even during a break
   // note Two J-Link commands are required in command file:
   // SetMonModeDebug = 1
   // SetMonModeVTableAddr = ADDR
   //  where ADDR is the application&amp;#39;s vector table located in FLASH, ie the start address for the
   // application, probably either 0x1B000 or 0x1C000 or 0x26000 depending on SoftDevice
   // See https://github.com/NordicPlayground/j-link-monitoring-mode-debugging
   NVIC_SetPriority(DebugMonitor_IRQn, _PRIO_SD_LOW);
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Enable FEATURE_JLINK_MONITOR in the project preprocessor (so it&amp;#39;s easy to turn feature on and off). Add the commands noted above in Debug-&amp;gt;J-Link-&amp;gt;Command Options for SES; other IDEs are similar, I use both SES and IAR.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/246371?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2020 00:57:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21028edf-95c5-4b27-b67d-e48813e9c14c</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;You did try allowing the match, I suppose (I have it true):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    err_code = nrf_ble_scan_filters_enable(&amp;amp;m_scan,
                                           NRF_BLE_SCAN_NAME_FILTER,
                                           true); //&amp;lt;==
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/246370?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2020 23:28:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ec2dbbe-df73-4a7d-94eb-5423f59ac10b</guid><dc:creator>sschumac</dc:creator><description>&lt;p&gt;Unfortunately, I did try this as well, more as a sanity check that something else wasn&amp;#39;t broken. This section of the docs have led me to believe this is supported as well.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Filters can be set and removed dynamically while the application is running, regardless of whether they are enabled or disabled.&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/246369?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2020 22:59:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46b05d40-8a95-472c-970e-4af430200b89</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;I would suggest &lt;em&gt;filter_set()&lt;/em&gt; must be invoked prior to &lt;em&gt;filters_enable()&lt;/em&gt;, worth a try&amp;nbsp;:-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calling nrf_ble_scan_filter_set breaks debugging.</title><link>https://devzone.nordicsemi.com/thread/246367?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2020 22:45:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f906b1e-468c-44a3-9bb7-62aeaada5d42</guid><dc:creator>sschumac</dc:creator><description>&lt;p&gt;What I have tried:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;1. Increasing the ram start for more SD ram (by up to 5kb)&lt;/p&gt;
&lt;p&gt;2. Re-flashing the SD and Bootloader&lt;br /&gt;&lt;br /&gt;3. replacing the string literal in the call with static const char adapter_name[] (although it works with a string literal in my other project)&lt;/p&gt;
&lt;p&gt;4. If I pause and restart the debugger enough, a HardFault is thrown (I am assuming because its trying to perform a debugging action with no debugger explicitly attached), the value at&amp;nbsp;&lt;span&gt;(xSP+0x18) does not bring me to an instruction in my own code.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I havent done any more HardFault debugging, as the CPU does not fault unless I do strange things with the debugger.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>