Feather nRF52832 - Bootloader and Sketch uploads problem.

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rickygai
 
Posts: 4
Joined: Tue Nov 23, 2021 6:31 am

Feather nRF52832 - Bootloader and Sketch uploads problem.

Post by rickygai »

IDE: Arduino IDE ver 1.8.16
MCU: Adafruit Feather nRF52832 https://www.digikey.my/en/products/deta ... 06/7034992
OS: Windows 10 Pro ver 21H1 (OS Build 19043.1348)

I am unable to update the bootloader with the following setup:
Arduino ide 1.8.16 - Adafruit Feather nRF52832 configurations.png
Arduino ide 1.8.16 - Adafruit Feather nRF52832 configurations.png (16.97 KiB) Viewed 668 times
and resulted errors below ( where the user name is "RICKY GAI" ):

Code: Select all

java.io.IOException: Cannot run program "C:\Users\RICKY": CreateProcess error=193, %1 is not a valid Win32 application
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:26)
	at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)
	at cc.arduino.packages.uploaders.SerialUploader.runCommand(SerialUploader.java:383)
	at cc.arduino.packages.uploaders.SerialUploader.burnBootloader(SerialUploader.java:375)
	at processing.app.Editor.lambda$handleBurnBootloader$61(Editor.java:2385)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
	at java.lang.ProcessImpl.start(ProcessImpl.java:137)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 6 more
Error while burning bootloader
I cannot even upload a simple sketch below as well:

Code: Select all

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}
resulted in erros below:

Code: Select all

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.

I referred to the links below but still cannot burn the bootloader and upload a sketch using merely the USB serial COM7 that detected as "Silicon Labs CP210x USB to UART Bridge (COM7)".

https://learn.adafruit.com/bluefruit-nr ... bootloader
https://learn.adafruit.com/bluefruit-nr ... bootloader

QUESTIONS:

1. Can I just use the USB Serial COM7 to burn bootloader and upload sketch without using J-LINK ?

2. Is there any tutorial video that shown how to burn the bootloader and upload sketch to Adafruit Feather nRF52832 without using J-LINK ?


Please advise.

User avatar
rickygai
 
Posts: 4
Joined: Tue Nov 23, 2021 6:31 am

Re: Feather nRF52832 - Bootloader and Sketch uploads problem

Post by rickygai »

I found the solution:

The Adafruit Feather nRF52832 bootloader is old version, need to be updated to version S32 6.1.1, but you cannot update to latest version of bootloader using serial COM port yet because the old bootloader is not compatible.

So, you have to use J-LINK as shown picture below:
1.png
1.png (164.54 KiB) Viewed 591 times
Now, goto the Arduino IDE > Tools > Programmer: > choose "J-Link for Bluefruit nRF52" then click on the "Burn Bootloader" option, if the bootloader is updated successfully, you should be seeing result picture below:
2.png
2.png (74.11 KiB) Viewed 591 times
From here, you can start to upload sketch and burn new bootloader using either serial COM port or J-LINK, in this case I am going to use serial COM port so you may disconnect the J-LINK.

Set the Arduino IDE > Tools > Programmer: to "Bootloader DFU for Bluefruit nRF52" for any new bootloader to burn in the future.

To upload sketch, click on the upload button, the success process should be like below:
4.png
4.png (60.05 KiB) Viewed 591 times
DONE.

Hopes this help.

User avatar
hathach
 
Posts: 1271
Joined: Tue Apr 23, 2013 1:02 am

Re: Feather nRF52832 - Bootloader and Sketch uploads problem

Post by hathach »

hmm strange, it should still be possible to update bootloader via DFU Serial port. Your issue seems to be the serial driver issue. But anyway, I am glad you find way to go around this.

User avatar
rickygai
 
Posts: 4
Joined: Tue Nov 23, 2021 6:31 am

Re: Feather nRF52832 - Bootloader and Sketch uploads problem

Post by rickygai »

hi hathach,

I am not sure your meanings, but the Feather nRF52832 with old bootloader also can be detected under Windows but failed to upload sketch initially until I burned the latest bootloader on it, only then the sketch can be uploaded via serial port.

Well, Arduino IDE 1.8.16 was used to do initial test merely, I do changed the programmer to "Bootloader DFU for Bluefruit nRF52" and executed the "Burn Bootloader" option, it failed.

Due to Arduino IDE 1.8.16 is legacy old IDE, I don't bother much as most of the time I used PlatformIO IDE which handled most of the dependencies well.

User avatar
hathach
 
Posts: 1271
Joined: Tue Apr 23, 2013 1:02 am

Re: Feather nRF52832 - Bootloader and Sketch uploads problem

Post by hathach »

Yeah, upgrading bootloader is required since the old one is bundled with older softdevice with different flash layout. What I mean is that you should be able to upgrade bootloader via arduino IDE with "Bootloader DFU for Bluefruit nRF52". It failed sounds like an bug/issue to me. Though, I am glad you got it resolved with jlink.

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”