This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

On Windows, after calling sd_rpc_conn_reset(SYS_RESET) and sd_rpc_close, sd_rpc_open always fails

I have a nRF52840 dongle (from Fanstel) that is set up as a virtual COM port on my Windows 7 machine, and which I am accessing using pc-ble-driver.

I want to be able to programatically reset my nRF52840.  The only function I see to do this is sd_rpc_conn_reset, which I call with the SYS_RESET option.  I call sd_rpc_conn_reset, and on my Windows 7 system, the virtual COM port for the nRF52840 gets errors (as expected, since the device is resetting), I see a USB device removal for the device, followed a second later by a USB device arrival. At this point the virtual COM port again exists in Windows. But if I try to open that virtual COM port, the file-open operation gets "The system cannot find the file specified" (which causes sd_rpc_open to given the error NRF_ERROR_SD_RPC_H5_TRANSPORT_STATE).   I've tried inserting a delay between when I get the USB device arrival and when I try to open the COM port (to be sure it's ready) but even a 10 second delay still results in the same error.

How can I programatically reset the nRF52840 and then access it again afterwards in Windows 7 using pc-ble-driver?

Thanks,

-Paul Bradford

Parents Reply
  • HI Paul, 

     the conn_systemreset_enc() API is an internal one used by the serialization codec. sd_rpc_conn_reset is the correct command to perform a SoftReset of the NRF52840. 

    Paul Bradford said:
    Therefore I want an nRF52840 software reset that is as close to power off/power on as I can get.   What is my best option?

     The SoftReset will reset the modules listed in the Reset behavior table in the nRF52840 Product Specification. If you want a pin reset, then you will have to add a custom command that can be sent to the nRF52840 over the serial interface that pulls a GPIO that is connected to the RESET pin low. This is what we do with the NRF52840 Dongle when resetting it in bootloader mode, see DFU Trigger Library (USB) .

    Best regards

    Bjørn

Children
No Data
Related