Closed koenvervloesem closed 2 years ago
I have just tested, It seems like the update is complete regardless of the I/O error (due to bootloader reset itself). Which circuitpython version you are copying to. Try to use 6.x version, maybe there is some bug with 7.x one.
I've tried this with adafruit-circuitpython-feather_bluefruit_sense-nl-6.3.0.uf2. I've tried some other UF2 files too, but I'll see whether I can find some other ones to install.
@koenvervloesem with feather sense 6.3.0, does it work for you or it still has the issue.
Unfortunately I'm still having the same issue, and I'm not sure what to try next.
How do you enter bootloader mode on your device? One push of the RESET button, right?
yup, double reset to enter bootloader, can you post your info file contents here, this is mine. I have no issue with both cpy 6.3.0 and 7.0.0
UF2 Bootloader 0.6.0 lib/nrfx (v2.0.0) lib/tinyusb (0.10.1-41-gdf0cda2d) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
Model: Adafruit Feather nRF52840 Sense
Board-ID: nRF52840-Feather-Sense
SoftDevice: S140 version 6.1.1
Date: Jun 19 2021
My INFO_UF2.TXT
says:
UF2 Bootloader 0.6.0 lib/nrfx (v2.0.0) lib/tinyusb (0.10.1-41-gdf0cda2d) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
Model: Adafruit Feather nRF52840 Sense
Board-ID: nRF52840-Feather-Sense
SoftDevice: not found
Date: Jun 19 2021
This is the same as yours, except for the SoftDevice, which shouldn't make a difference because it's only the Bluetooth controller, right?
So installed the bootloader again, including the SoftDevice, and the info file now says:
UF2 Bootloader 0.6.0 lib/nrfx (v2.0.0) lib/tinyusb (0.10.1-41-gdf0cda2d) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
Model: Adafruit Feather nRF52840 Sense
Board-ID: nRF52840-Feather-Sense
SoftDevice: S140 version 6.1.1
Date: Jun 19 2021
Which is exactly the same as yours now.
Then I tried again: I reset the Feather Sense, dragged the adafruit-circuitpython-feather_bluefruit_sense-en_US-6.3.0
file to the drive, and again I get errors in dmesg
, even more now (I left out the complete stack trace):
[39927.902716] usb 1-3: USB disconnect, device number 33
[39927.917569] blk_update_request: I/O error, dev sdc, sector 11 op 0x1:(WRITE) flags 0x0 phys_seg 8 prio class 0
[39927.917583] buffer_io_error: 7 callbacks suppressed
[39927.917587] Buffer I/O error on dev sdc, logical block 11, lost async page write
[39927.917596] Buffer I/O error on dev sdc, logical block 12, lost async page write
[39927.917601] Buffer I/O error on dev sdc, logical block 13, lost async page write
[39927.917607] Buffer I/O error on dev sdc, logical block 14, lost async page write
[39927.917612] Buffer I/O error on dev sdc, logical block 15, lost async page write
[39927.917621] Buffer I/O error on dev sdc, logical block 16, lost async page write
[39927.917626] Buffer I/O error on dev sdc, logical block 17, lost async page write
[39927.917631] Buffer I/O error on dev sdc, logical block 18, lost async page write
[39927.917668] blk_update_request: I/O error, dev sdc, sector 269 op 0x1:(WRITE) flags 0x0 phys_seg 8 prio class 0
[39927.917673] Buffer I/O error on dev sdc, logical block 269, lost async page write
[39927.917679] Buffer I/O error on dev sdc, logical block 270, lost async page write
[39927.917740] blk_update_request: I/O error, dev sdc, sector 517 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 0
[39928.021680] ------------[ cut here ]------------
[39928.021684] bdi-(unknown) not registered
[39928.021706] WARNING: CPU: 0 PID: 918552 at fs/fs-writeback.c:2326 __mark_inode_dirty+0x19e/0x3b0
...
[39928.021970] ---[ end trace fe4d73a70c3d4b82 ]---
[39928.024449] FAT-fs (sdc): Directory bread(block 517) failed
[39928.024458] FAT-fs (sdc): Directory bread(block 518) failed
[39928.024462] FAT-fs (sdc): Directory bread(block 519) failed
[39928.024472] FAT-fs (sdc): Directory bread(block 520) failed
[39928.024497] FAT-fs (sdc): Directory bread(block 517) failed
[39928.024501] FAT-fs (sdc): Directory bread(block 518) failed
[39928.024504] FAT-fs (sdc): Directory bread(block 519) failed
[39928.024508] FAT-fs (sdc): Directory bread(block 520) failed
[39928.126692] FAT-fs (sdc): unable to read boot sector to mark fs as dirty
And still the CIRCUITPY drive doesn't appear. I tried other cables too, still the same.
Do you know anything else I could try?
are you using the EXACT feather sense board from adafruit or other board with similar schematics ?
Here are some pictures of the board. Looks legit to me, and I bought it from a reputable web shop.
Front:
Back:
Here are some pictures of the board. Looks legit to me, and I bought it from a reputable web shop.
It look very genuine to me, and I have no doubt for that. I asked since normally Adafruit will ship with an older bootloader and SD pre-flashed. It is typically not easy to erase SD without jlink.
Back to the issu,e I have no particular idea why the upgrade failed for you, however, I guess it could be due to the qspi flash (hint by the I/0 error) and that could somehow hanged the circuitpython to run. Here is a few uf2 that compiled from arduino repo. Please try it out bluefruit-sense-uf2.zip for further analysis
Please try them out, hopefully it will provide more info.
Yeah, the first thing I did before using the board was upgrading the bootloader, just a habit of me since I experienced some problems with another board that were solved by upgrading the bootloader. No idea why the SoftDevice disappeared, though.
I tried flashing these four UF2 files now, but all of them still have the same problem: I see the same errors as previously in dmesg
output.
At least the bleuart
firmware should show itself as a BLE device, right? I don't see anything, also no /dev/tty*
device appears or any other sign that Ubuntu discovers a USB device.
It doesn't seem like the code from the UF2 files is run, but that the errors happen during the flashing process.
So writing a bootloader UF2 file works (I could install the bootloader with SoftDevice previously, and I even successfully downgraded the bootloader to 0.5.1 to see whether this would make a difference), but writing any other UF2 file seems to fail.
Yeah, the first thing I did before using the board was upgrading the bootloader, just a habit of me since I experienced some problems with another board that were solved by upgrading the bootloader. No idea why the SoftDevice disappeared, though.
Yeah, that is great habit. The SD missing is a bit odd though, but it is resolved now I guess
I tried flashing these four UF2 files now, but all of them still have the same problem: I see the same errors as previously in
dmesg
output.At least the
bleuart
firmware should show itself as a BLE device, right? I don't see anything, also no/dev/tty*
device appears or any other sign that Ubuntu discovers a USB device.It doesn't seem like the code from the UF2 files is run, but that the errors happen during the flashing process.
So writing a bootloader UF2 file works (I could install the bootloader with SoftDevice previously, and I even successfully downgraded the bootloader to 0.5.1 to see whether this would make a difference), but writing any other UF2 file seems to fail.
hmm, seem like you have issue copying data from host to bootloader. One of the issue could be the host didn't cache the drive correctly, since the uf2 pretty discard other meta data and just extract the firmware payload to flash. If host system read back to verify the contents, it won't be able to response with the data that is written as host and could cause I/O error.
Do you have any other PC to try out the updating just for hw sanity check ?
Just tried this on another machine with the same Ubuntu 20.04 operating system, which shows the same error messages in dmesg
output and results in the same behaviour. I also tried this on a Mac. I don't see anything relevant in dmesg
output there, but the behaviour is the same: the code from the UF2 files doesn't run.
this is really weird, you are able to flash using the CDC interface (adafruit-nrfutil), but seems to have issue using msc (uf2). Would you mind trying out the arduino IDE, It is relatively easy https://github.com/adafruit/Adafruit_nRF52_Arduino#recommended-adafruit-nrf52-bsp-via-the-arduino-board-manager
Please select the Feather Sense board, then try to compile a few built-in example e.g blinky and/or bleuart to see if it could be flashed via CDC interface and run. Maybe it could help to recover from some of the existing flashing issue.
You may also try to upgrade bootloader using the Arduino IDE https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide/updating-the-bootloader .
@koenvervloesem this issue is probably fixed by #214 caused when circuitpython flash size is > 512KB. Please update bootloader to at least 0.6.2 and try again. Thank you very much.
I've just tested this with version 0.6.2 of the bootloader, and this works! Thanks for the reminder.
I am glad that works well, thank you for confirming it.
Set up
Describe the bug
When I want to copy a UF2 file to the bootloader's mounted storage device, I get I/O errors and the file isn't copied.
To Reproduce
Steps to reproduce the behavior:
I have also tried other UF2 files, other USB cables and other USB ports of the host system.
Dmesg output