Application-specific flash options ignored: softreset does not work

To preface:

  • nRF Connect SDK 2.9.0
  • nRF9151 DK
  • Windows 11 PC

Hello,

I just stumbled upon a potential issue after trying to figure out why I couldn't use 'softreset' in my settings.json file per this guide:

https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/guides/build_bind_tasks.html#how-to-add-application-specific-flash-options

The above guide states to add the following to your settings.json to enable 'softreset' functionality:

{
    "nrf-connect.applicationOptions": {
        "/path/to/your/application": {
            "flash": {
                "softreset": true
            }
        }
    }
}

However, this didn't work for me. I tried adding it to my local workspace settings.json, then my user settings.json in AppData\Roaming\...

Nothing worked. Every time I programmed the devkit I could see the reset line pulse low (I am monitoring pin 10 on header P18 of the nRF9151DK).

Just when I was about to give up, I stumbled on this:

Upon checking the item highlighted in red, the following was added to my workspace settings.json file:

"nrf-connect.flash.softreset": true
   
Success! Programming my board no longer asserts the reset line. I now see "Applying system reset" instead of "Applying pin reset" in the VS Code terminal window 
 
"nrf-connect.flash.softreset": true does not match the documentation linked above.
 
Question 1: Is the documentation incorrect? If not, why doesn't the documentation's method work for me?
 
Question 2: Is there any issue or disadvantage to using 'softreset' for programming or debugging a nRF9151 module? Is there a preference?
 
We intend to use a single reset pin to reset two MCUs, hence the nature of this question.
 
I do see the following in the logs more frequently which is concerning:
 
[00:00:07.360,382] <wrn> nrf_modem_lib_netif: The modem has detected a reset loop. LTE network attach is now restricted for the next 30 minutes.
  
This makes me wonder how 'softreset' impacts the modem core reset procedure.
 
Question 3: When using 'softreset', does this also reset the modem core, or is the modem core only reset via nRESET?
 
Thanks,
Derek
Parents
  • Hi,

    Programming my board no longer asserts the reset line. I now see "Applying system reset" instead of "Applying pin reset" in the VS Code terminal window 

    Can you show the output of VS Code terminal window in both cases and provide description for each case?

    Is the documentation incorrect? If not, why doesn't the documentation's method work for me?

    Can you specify expected behavior? In which way documentation might be right or wrong? Can you elaborate?

    Is there any issue or disadvantage to using 'softreset' for programming or debugging a nRF9151 module? Is there a preference?

    Which module do you use? Which advantage/disadvantage do you think about, in terms of what? Can you provide additional details?

    When using 'softreset', does this also reset the modem core, or is the modem core only reset via nRESET?

    There are various reset types described in the documentation. There you can also find information about reset behavior.

    Best regards,
    Dejan

  • Hey Dejan,

    Thanks for your reply. After spending a couple more hours on it today, and typing up instructions to reproduce both cases per your request, I figured out how to make the instructions provided in the link in my original post work. The syntax of my app directory was incorrect. Sigh. Why does this stuff have to be so complicated Sweat smile. I miss the days of dropdown menus in Keil uVision.

    Anyway, for future reference for others, both of the following settings.json files within your local workspace will work to enable 'softreset'.

    Method 1 (Contents of settings.json):

    {
        "nrf-connect.applicationOptions": {
            "${workspaceFolder}": {
                "flash": {
                    "softreset": true
                }
            }
        }
    }

    Method 2 (Contents of settings.json):

    {
        "nrf-connect.flash.softreset": true
    }

    These settings can be combined with any other settings in your settings.json file.

    Location of settings.json relative to the rest of the project files [Using the HTTPS client sample (nrf/samples/net/https_client) as an example]:

    Which module do you use?

    Module: 

    nRF9151 DK

    Which advantage/disadvantage do you think about, in terms of what? Can you provide additional details?

    Well, the nRF Connect SDK nRF9151 sample projects toggle the reset line by default when programming or debugging. I would assume that this was chosen over 'softreset' for some reason? If not, can you confirm there is no foreseeable risk or disadvantage to using softreset instead of toggling the reset line when debugging an application?

    Per the reset behavior link you provided (thanks!), it states that "Debug" is not reset when using softreset. Will this cause any issues if I use the 'softreset' flag in my settings.json when debugging? Is toggling the reset line necessary for flashing or debugging?

    Thanks,

    Derek

  • Hi Derek,

    droberson said:

    Well, the nRF Connect SDK nRF9151 sample projects toggle the reset line by default when programming or debugging. I would assume that this was chosen over 'softreset' for some reason? If not, can you confirm there is no foreseeable risk or disadvantage to using softreset instead of toggling the reset line when debugging an application?

    Per the reset behavior link you provided (thanks!), it states that "Debug" is not reset when using softreset. Will this cause any issues if I use the 'softreset' flag in my settings.json when debugging? Is toggling the reset line necessary for flashing or debugging?

    There is currently no additional information about this in our documentation. Maybe you could try to look at ARM Cortex-M33 CPU documentation. Please let me know if you have any further questions.

    Best regards,
    Dejan

  • Hey Dejan,

    I couldn't find any additional information in the Cortex-M33 Technical Reference Manual, Cortex-M33 Generic User Guide, or the Cortex-M33 Processor Datasheet.

    Based on my testing, I can program and debug fine with softreset enabled. Hopefully something doesn't bite me after we build boards.

    Thanks,

    Derek

Reply Children
No Data
Related