Error in Arduino IDE with Sparkfun Pro miniNRF52840

I programmed my Sparkfun Pro mini nrf52840 with Arduino IDE, as explained in the link:

https://learn.sparkfun.com/tutorials/nr … cuitpython

Till a month ago my sketches worked, as the BLE example in the link above. Later I worked with some programs of serial port emulators, as TeraTerm adn Virtual Serial Port Driver (maybe this could be the problem) and now when I upload my sketches (that worked 1 month ago) on Sparkfun I have this error:

<<Sketch uses 56940 bytes (6%) of program storage space. Maximum is 815104 bytes.

Global variables use 12096 bytes (4%) of dynamic memory, leaving 236736 bytes for local variables. Maximum is 248832 bytes.

Upgrading target on COM1 with DFU package C:\Users\matte\AppData\Local\Temp\arduino_build_790505\BLE_Example_SparkFun.ino.zip. Flow control is disabled, Single bank, Touch disabled

Timed out waiting for acknowledgement from device.

Failed to upgrade target. Error is: No data received on serial port. Not able to proceed.

Traceback (most recent call last):

File “nordicsemi_main_.py”, line 294, in serial

File “nordicsemi\dfu\dfu.py”, line 235, in dfu_send_images

File “nordicsemi\dfu\dfu.py”, line 200, in _dfu_send_image

File “nordicsemi\dfu\dfu_transport_serial.py”, line 179, in send_start_dfu

File “nordicsemi\dfu\dfu_transport_serial.py”, line 243, in send_packet

File “nordicsemi\dfu\dfu_transport_serial.py”, line 282, in get_ack_nr

nordicsemi.exceptions.NordicSemiException: No data received on serial port. Not able to proceed.

Possible causes:

  • Selected Bootloader version does not match the one on Bluefruit device.

Please upgrade the Bootloader or select correct version in Tools->Bootloader.

  • Baud rate must be 115200, Flow control must be off.

  • Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode.

What is the problem?

-I can select only one Bootloader: s140 6.1.1 r0. IDE doesn’t allow my other versions;

-Baud rate should be 9600. If I select 115200 in the serial monitor of IDE Arduino nothing changes;

What can I do?

Uninstalling the IDE and re-installing didn’t help (neither did deinstalling and reinstalling the SF AVR board defs through the Board Manager). I concluded that it was a corrupted file among those not routinely replaced when installing the IDE. These can be tracked down using he same Preference panel used to associate the Boards Managers. Just below the BM line the IDE helpfully tells you where to go to hand-edit your Preferences file. There will be many other files in this folder, including the .json files defining additional boards. I deleted the entire folder, …\Arduino 15 in my case. It was not necessary to thereafter reinstall the IDE, just restarting it, navigating to the Board Manager and reinstalling the vanished SF AVR .json did the trick. Naturally I had to similarly reinstall all the other aftermarket board defs, but helpfully most of the IDE settings were not in that file, so the Board Manager still had all the URLs handy, and the other choices (such as Sketchbook location) were unaffected. it does make one wonder where those live, if not in the indicated preferences.txt file. A mystery for another day.