Feather M0 flashing unstabilities

I encounter at least couple unstabilities when flashing to the Feather M0 adalogger board.

  1. As indicated on the RIOT page for this board, the bootloader needs a regular reset in order to flash a new time a program to the MCU. However on top of this behavior, the board after so many attempts at flashing becomes undetectable by the computer (meaning it is not attached to any port, default being /dev/ttyACM0). The board led slowly oscillate in intensity. The solution to “reactivate” the board has been to let the board disconnected from everything for some time (so far 2hrs seems to do the trick). I can then flash again programs for a short time until it goes back into the same behavior. Here is a sample of the dmesg -w output I get when plugging the board to the computer when it falls into this unresponsive state, and pushing the reset button with a double tap
[ 2606.272266] usb 3-4-port3: attempt power cycle
[ 2606.875569] usb 3-4.3: new full-speed USB device number 33 using xhci_hcd
[ 2612.019771] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[ 2617.395555] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[ 2617.603547] usb 3-4.3: device not accepting address 33, error -62
[ 2617.683526] usb 3-4.3: new full-speed USB device number 34 using xhci_hcd
[ 2622.771737] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[ 2627.919177] audit: type=1400 audit(1653386341.016:349): apparmor="ALLOWED" operation="open" profile="/usr/sbin/sssd" name="/proc/15522/cmdline" pid=987 comm="sssd_nss" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 2627.921137] audit: type=1400 audit(1653386341.020:350): apparmor="ALLOWED" operation="open" profile="/usr/sbin/sssd" name="/proc/15523/cmdline" pid=987 comm="sssd_nss" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 2628.147609] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[ 2628.355491] usb 3-4.3: device not accepting address 34, error -62
[ 2628.356057] usb 3-4-port3: unable to enumerate USB device
  1. When the unstability above is not occuring then the coordination of double reset and make all flash term leads to an aborted attempt at flashing. See here:
   text	   data	    bss	    dec	    hex	filename
 123392	    760	  14968	 139120	  21f70	/home/simonfi/github/wsn_riot/apps/wsn-shell/bin/feather-m0/wsn-shell.elf
stty -F /dev/ttyACM0 raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
stty: /dev/ttyACM0: No such file or directory
make: [/home/simonfi/github/wsn_riot/apps/wsn-shell/../../RIOT/Makefile.include:843: preflash] Error 1 (ignored)
sleep 2
/home/simonfi/github/wsn_riot/RIOT/dist/tools/bossa-1.9/bossac -p /dev/ttyACM0  -o 0x2000 -e -i -w -v -b -R /home/simonfi/github/wsn_riot/apps/wsn-shell/bin/feather-m0/wsn-shell.bin
Device       : ATSAMD21x18
Version      : v1.1 [Arduino:XYZ] Oct 27 2020 20:25:30
Address      : 0x0
Pages        : 4096
Page Size    : 64 bytes
Total Size   : 256KB
Planes       : 1
Lock Regions : 16
Locked       : none
Security     : false
BOD          : true
BOR          : true
Erase flash

Done in 0.839 seconds
Write 124152 bytes to flash (1940 pages)
[                              ] 0% (0/1940 pages)
SAM-BA operation failed
make: *** [/home/simonfi/github/wsn_riot/apps/wsn-shell/../../RIOT/Makefile.include:837: flash] Error 1
make: Leaving directory '/home/simonfi/github/wsn_riot/apps/wsn-shell'

In case you observe the same behavior please share, and any potential solutino welcome. Thanks

1 Like