Upload error - SAM-BA operation failed

Hi,

I have an error when I try to upload a program in a MKR GSM 1400 board.
When I upload the program the usb is disconnected then reconnected with an other port.

I did the following tests :

  • use an other USB cable => error
  • upload from an other PC => ok
  • upload from the same PC with linux OS => ok
  • uninstall/reinstall arduino IDE and driver => error

Here is the log :

Arduino: 1.8.1 (Windows 7), Board: "Arduino MKR GSM 1400"

Sketch uses 10904 bytes (4%) of program storage space. Maximum is 262144 bytes.
Forcing reset using 1200bps open/close on port COM55
PORTS {COM1, COM3, COM55, } / {COM1, COM3, COM55, } => {}
PORTS {COM1, COM3, COM55, } / {COM1, COM3, COM54, } => {COM54, }
Found upload port: COM54
C:\Users\duchesne\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0/bossac.exe -i -d --port=COM54 -U true -i -e -w -v C:\Users\duchesne\AppData\Local\Temp\arduino_build_239561/sketch_dec04a.ino.bin -R
Set binary mode
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
version()=v2.0 [Arduino:XYZ] Oct 4 2017 08:53:16
chipId=0x10010005
Connected at 921600 baud
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Atmel SMART device 0x10010005 found
write(addr=0x20004000,size=0x34)
writeWord(addr=0x20004030,value=0x10)
writeWord(addr=0x20004020,value=0x20008000)
Device : ATSAMD21G18A
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Chip ID : 10010005
version()=v2.0 [Arduino:XYZ] Oct 4 2017 08:53:16
Version : v2.0 [Arduino:XYZ] Oct 4 2017 08:53:16
Address : 8192
Pages : 3968
Page Size : 64 bytes
Total Size : 248KB
Planes : 1
Lock Regions : 16
Locked : readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
none
readWord(addr=0x41004018)=0
Security : false
Boot Flash : true
readWord(addr=0x40000834)=0x7000a
BOD : true
readWord(addr=0x40000834)=0x7000a
BOR : true
Arduino : FAST_CHIP_ERASE
Arduino : FAST_MULTI_PAGE_WRITE
Arduino : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
chipErase(addr=0x2000)
done in 0.869 seconds

Write 11176 bytes to flash (175 pages)
write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x2000, size=0x1000)

[========== ] 36% (64/175 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x3000, size=0x1000)

[===================== ] 73% (128/175 pages)write(addr=0x20005000,size=0xbc0)
writeBuffer(scr_addr=0x20005000, dst_addr=0x4000, size=0xbc0)

SAM-BA operation failed
An error occurred while uploading the sketch

[==============================] 100% (175/175 pages)
done in 0.092 seconds

Verify 11176 bytes of flash with checksum.
checksumBuffer(start_addr=0x2000, size=0x1000) = e590
checksumBuffer(start_addr=0x3000, size=0x1000) = 2a43
checksumBuffer(start_addr=0x4000, size=0xba8) = e6ad
Verify successful
done in 0.016 seconds
CPU reset.
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
writeWord(addr=0xe000ed0c,value=0x5fa0004)

Has anyone ever had this error?