0

Cannot 'Upload' sketch from Arduino IDE to nRF52832 feather
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Cannot 'Upload' sketch from Arduino IDE to nRF52832 feather

by maansaake on Sun Jun 27, 2021 9:03 am

Hi,

I have been following this https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide/introduction religiously since I'm new to feather programming and I have run into an issue after updating the bootloader. The bootloader update goes well, I get the expected "Device programmed." and the process takes around 30 or so seconds. After updating, the builtin LED is flashing around 3-4 times per second, not that this behavior is described in the guide, but still thought it is worth mentioning.

At this point, I cannot upload a sketch to the feather, each upload fails with a NordicSemiException due to that "no data was received on serial port". I am using the same USB cable I used to update the bootloader, so it has data transfer capabilities. I actually tried with a few ones, same result with each cable. Since I have a nRF52832 I have also installed the CP2104 driver.

System specs:
Mac OS: Big Sur 11.4
Arduino IDE: 1.8.15
BSP: Adafruit nRF52 0.23.0
Selected board: Adafruit Feather nRF52832
SoftDevice: S132 6.1.1
Port: /dev/cu.SLAB_USBtoUART
Programmer: Bootloader DFU for Bluefruit nRF52

I would be very thankful for any insights that can help to troubleshoot what I am doing wrong. I'm currently assuming the Feather is fine since the bootloader update procedure was successful, I actually even re-did it once (again, successfully getting the "Device programmed." message). Nothing but the micro-USB is connected to the Feather.

maansaake
 
Posts: 13
Joined: Sun Apr 19, 2020 3:24 pm

Re: Cannot 'Upload' sketch from Arduino IDE to nRF52832 feat

by maansaake on Sat Jul 10, 2021 11:05 am

Thanks but I have tried multiple different USB cables, all of which have data capabilities.

maansaake
 
Posts: 13
Joined: Sun Apr 19, 2020 3:24 pm

Re: Cannot 'Upload' sketch from Arduino IDE to nRF52832 feat

by adafruit_support_carter on Mon Jul 12, 2021 2:52 pm

Does this happen even if you try to upload the basic blink example? Sounds like you're having issues at this step?
https://learn.adafruit.com/bluefruit-nr ... 2860620-12

What you describe sounds like this FAQ:
https://learn.adafruit.com/bluefruit-nr ... aq-3024309
But you say you updated the bootloader, so not sure.

adafruit_support_carter
 
Posts: 21122
Joined: Tue Nov 29, 2016 2:45 pm

Re: Cannot 'Upload' sketch from Arduino IDE to nRF52832 feat

by maansaake on Sun Jul 18, 2021 11:30 am

Correct, that's where I'm stuck. The bootloader updating successfully really stumps me, I have purchased another, identical, feather that I intend to try out as well.

Do you have any tips for further troubleshooting? Can I verify that the correct versions are in used in some way, or did the above look up-to-date?

maansaake
 
Posts: 13
Joined: Sun Apr 19, 2020 3:24 pm

Re: Cannot 'Upload' sketch from Arduino IDE to nRF52832 feat

by adafruit_support_carter on Tue Jul 20, 2021 3:09 pm

Let's get some more info on what's happening. Can you turn on verbose output in the Arduino IDE and then copy and paste here all of the messages that get printed out when you try to upload a sketch and it fails.

adafruit_support_carter
 
Posts: 21122
Joined: Tue Nov 29, 2016 2:45 pm

Re: Cannot 'Upload' sketch from Arduino IDE to nRF52832 feat

by maansaake on Wed Jul 28, 2021 4:22 pm

Alright, here is the full output from an upload attempt, *updated to exclude the compilation output*:
Code: Select all | TOGGLE FULL SIZE
Sketch uses 39568 bytes (13%) of program storage space. Maximum is 290816 bytes.
Global variables use 6004 bytes (11%) of dynamic memory, leaving 46220 bytes for local variables. Maximum is 52224 bytes.
/Users/mansthornvik/Library/Arduino15/packages/adafruit/hardware/nrf52/0.23.0/tools/adafruit-nrfutil/macos/adafruit-nrfutil --verbose dfu serial -pkg /var/folders/nj/7chxc_wx52jgyfbr6hs3z_380000gn/T/arduino_build_666736/blink_feather_nRF52832.ino.zip -p /dev/cu.SLAB_USBtoUART -b 115200 --singlebank
Upgrading target on /dev/cu.SLAB_USBtoUART with DFU package /private/var/folders/nj/7chxc_wx52jgyfbr6hs3z_380000gn/T/arduino_build_666736/blink_feather_nRF52832.ino.zip. Flow control is disabled, Single bank, Touch disabled
Opened serial port /dev/cu.SLAB_USBtoUART
Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 39576
Sending DFU start packet
Sending DFU init packet
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 "__main__.py", line 296, in serial
  File "dfu/dfu.py", line 235, in dfu_send_images
  File "dfu/dfu.py", line 203, in _dfu_send_image
  File "dfu/dfu_transport_serial.py", line 155, in send_init_packet
  File "dfu/dfu_transport_serial.py", line 243, in send_packet
  File "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.

maansaake
 
Posts: 13
Joined: Sun Apr 19, 2020 3:24 pm

Re: Cannot 'Upload' sketch from Arduino IDE to nRF52832 feat

by maansaake on Wed Jul 28, 2021 4:45 pm

To carry out some troubleshooting of my own on the side, I have prepared the second feather (also a nRF52832), I tried to upload a sketch before anything else, but it failed with the same error as before.

I proceeded with a bootloader update hoping that would be why, here is its bootloader update output:
Code: Select all | TOGGLE FULL SIZE
/Users/mansthornvik/Library/Arduino15/packages/adafruit/hardware/nrf52/0.24.0/tools/adafruit-nrfutil/macos/adafruit-nrfutil --verbose dfu serial -pkg /Users/mansthornvik/Library/Arduino15/packages/adafruit/hardware/nrf52/0.24.0/bootloader/feather_nrf52832/feather_nrf52832_bootloader-0.6.0_s132_6.1.1.zip -p /dev/cu.SLAB_USBtoUART -b 115200 --touch 1200
Upgrading target on /dev/cu.SLAB_USBtoUART with DFU package /Users/mansthornvik/Library/Arduino15/packages/adafruit/hardware/nrf52/0.24.0/bootloader/feather_nrf52832/feather_nrf52832_bootloader-0.6.0_s132_6.1.1.zip. Flow control is disabled, Dual bank, Touch 1200
Touched serial port /dev/cu.SLAB_USBtoUART
Opened serial port /dev/cu.SLAB_USBtoUART
Starting DFU upgrade of type 3, SoftDevice size: 147792, bootloader size: 21800, application size: 0
Sending DFU start packet
Sending DFU init packet
Sending firmware file
########################################
########################################
########################################
########################################
########################################
########################################
########################################
########################################
############
Activating new firmware

Device programmed.
DFU upgrade took 35.77075934410095s


So that part went well, same for this board is that the red LED next to the micro USB port is now the only LED consistently blinking post update. Prior to the update, the red and blue LEDs were both blinking.

After updating the bootloader the upload still fails for this feather as well.

maansaake
 
Posts: 13
Joined: Sun Apr 19, 2020 3:24 pm

Re: Cannot 'Upload' sketch from Arduino IDE to nRF52832 feat

by maansaake on Wed Jul 28, 2021 6:01 pm

PROGRESS! I tried on my old Windows desktop instead and now it works, so the problem is Mac-specific. On windows I first tried to upload directly, which failed with the same error. I then proceeded to successfully update the bootloader and tried to upload again, works!

I followed the exact same steps on my Mac, but seems there is a problem there, perhaps related to this forum post I browsed through: viewtopic.php?f=24&p=778851. I am using the latest MacOS version so I would not be surprised if that is causing some problems. Anyway, good to know the board wasn't damaged or anything. Do you think we could continue troubleshooting the Mac issue though? Would be nice not to have to plug in the clunky desktop setup every time I need to make a change. I'd be happy to provide any information you need.

maansaake
 
Posts: 13
Joined: Sun Apr 19, 2020 3:24 pm

Re: Cannot 'Upload' sketch from Arduino IDE to nRF52832 feat

by maansaake on Thu Jul 29, 2021 10:24 am

Final update on the two feathers I have: I have now updated the bootloader and uploaded the basic blink sketch successfully from my Windows desktop. Both boards in a fine condition that is :-)

maansaake
 
Posts: 13
Joined: Sun Apr 19, 2020 3:24 pm

Re: Cannot 'Upload' sketch from Arduino IDE to nRF52832 feat

by adafruit_support_carter on Thu Jul 29, 2021 11:27 am

Good troubleshooting! Did anything in that other thread help for getting it to work on your Mac?

adafruit_support_carter
 
Posts: 21122
Joined: Tue Nov 29, 2016 2:45 pm

Re: Cannot 'Upload' sketch from Arduino IDE to nRF52832 feat

by maansaake on Thu Jul 29, 2021 11:32 am

Nothing helped, what I tried was to install the Silabs driver again since someone mentioned that it may have been ruined in some way after a recent software update. So I ran the uninstaller and installed it again. After that I ran through the same procedure as before: update bootloader -> upload sketch. Bootloader update succeeded as normal, but upload failed. What's funny is that before I could get the boards to play nice on the Windows machine, I first had to run the bootloader update via Windows as well. So it can't have been that successful via the Mac.

maansaake
 
Posts: 13
Joined: Sun Apr 19, 2020 3:24 pm

Re: Cannot 'Upload' sketch from Arduino IDE to nRF52832 feat

by adafruit_support_carter on Thu Jul 29, 2021 1:26 pm

Is your Mac reporting any issues with the CP2104?

adafruit_support_carter
 
Posts: 21122
Joined: Tue Nov 29, 2016 2:45 pm

Re: Cannot 'Upload' sketch from Arduino IDE to nRF52832 feat

by maansaake on Sat Jul 31, 2021 7:00 am

Not that I can find, no errors or such during installation/use. Also, the "cu.SLAB_USBtoUART" port did not appear until after successfully installing the Silabs driver.

maansaake
 
Posts: 13
Joined: Sun Apr 19, 2020 3:24 pm

Re: Cannot 'Upload' sketch from Arduino IDE to nRF52832 feat

by adafruit_support_carter on Mon Aug 02, 2021 2:44 pm

OK, what's the exact full version info for the MacOS version you are running?

Also, what is the version of the SiLabs driver you installed?

adafruit_support_carter
 
Posts: 21122
Joined: Tue Nov 29, 2016 2:45 pm

Re: Cannot 'Upload' sketch from Arduino IDE to nRF52832 feat

by maansaake on Thu Aug 12, 2021 11:59 am

MacOS Big Sur 11.5.1
Silabs CP210x v6.0.1

maansaake
 
Posts: 13
Joined: Sun Apr 19, 2020 3:24 pm

Please be positive and constructive with your questions and comments.