我在Windows中测试新的 MKR1000 。我每次将新代码上传到电路板时都会遇到一个恼人的问题,导致Windows在另一个端口重新安装Arduino驱动程序。例如:
如果Arduino安装在 COM4 上,当我将代码上传到主板时,Windows决定在 COM5 上安装Arduino。这导致IDE告诉我上传过程失败(因为在COM5上没有连接Arduino),但奇怪的是,代码实际上正确上传。
如果我想打开串口监视器,我需要进入IDE并将Arduino端口更改回COM4。每次我将新代码上传到Arduino时,Windows都会通过驱动程序安装程序,这非常烦人。
一些通用信息:
Arduino IDE中的错误是:
Arduino: 1.6.11 (Windows 7), Board: "Arduino/Genuino MKR1000"
Sketch uses 7,972 bytes (3%) of program storage space. Maximum is 262,144 bytes.
Forcing reset using 1200bps open/close on port COM4
PORTS {COM3, COM4, } / {COM3, } => {}
PORTS {COM3, } / {COM3, } => {}
PORTS {COM3, } / {COM3, } => {}
PORTS {COM3, } / {COM3, COM5, } => {COM5, }
Found upload port: COM5
C:\Users\40009929\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.6.1-arduino/bossac.exe -i -d --port=COM5 -U true -i -e -w -v C:\Users\40009929\AppData\Local\Temp\build9c9ef3bdfe2fccb480bc6e4bac749e41.tmp/Blink.ino.bin -R
Set binary mode
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
version()=v2.0 [Arduino:XYZ] Nov 24 2015 11:35: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] Nov 24 2015 11:35:16
Version : v2.0 [Arduino:XYZ] Nov 24 2015 11:35: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.823 seconds
Write 8124 bytes to flash (127 pages)
write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x2000, size=0x1000)
SAM-BA operation failed
An error occurred while uploading the sketch
[=============== ] 50% (64/127 pages)write(addr=0x20005000,size=0xfc0)
writeBuffer(scr_addr=0x20005000, dst_addr=0x3000, size=0xfc0)
[==============================] 100% (127/127 pages)
done in 0.051 seconds
Verify 8124 bytes of flash with checksum.
checksumBuffer(start_addr=0x2000, size=0x1000) = 7923
checksumBuffer(start_addr=0x3000, size=0xfbc) = b6c0
Verify successful
done in 0.010 seconds
CPU reset.
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
writeWord(addr=0xe000ed0c,value=0x5fa0004)
在Arduino中创建问题是一样的:
Atmel SMART device 0x10010005 found
Device : ATSAMD21G18A
Chip ID : 10010005
Version : v2.0 [Arduino:XYZ] Nov 24 2015 11:35:16
Address : 8192
Pages : 3968
Page Size : 64 bytes
Total Size : 248KB
Planes : 1
Lock Regions : 16
Locked : none
Security : false
Boot Flash : true
BOD : true
BOR : true
Arduino : FAST_CHIP_ERASE
Arduino : FAST_MULTI_PAGE_WRITE
Arduino : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
done in 0.822 seconds
Write 8116 bytes to flash (127 pages)
[=============== ] 50% (64/127 pages)
[==============================] 100% (127/127 pages)
done in 0.052 seconds
Verify 8116 bytes of flash with checksum.
Verify successful
done in 0.010 seconds
CPU reset.
SAM-BA operation failed
Could not program the board
答案 0 :(得分:1)
您好,根据您的输出,可能是这样做的原因。 如果我错了,其他开发人员可以纠正我。
将代码上传到ATSAMD21时,
->所用的IDE /开发环境将使开发板进入引导加载程序模式5秒钟。 (1200bps)// STEP 1
->但是,当它将程序上传到板上时,引导加载程序将在成功上传后锁定并更改其端口// STEP 2
->在步骤1中,微型计算机用作NATIVE USB端口并调用PROGRAMMING USB端口
->在STEP 2上,微控制器完成编程,并且在复位后返回默认状态-NATIVE USB端口(这是您的COM端口更改为下一个端口的位置)。
->如果您在打开超级终端并在5秒内以1200bps的速度打开连接的Arduino端口(例如COM4)时仔细观察,在设备管理器中,您会注意到USB串行设备代替了Arduino MKR板。
希望有帮助。
答案 1 :(得分:0)
答案 2 :(得分:0)
这是我对SAM-BA操作失败的修复。 情况 具有USB3端口的Windows 7(以前只能在仅具有USB2端口的Windows 7计算机上使用) 上载到Sparkfun Redboard Turbo
在PC和开发板之间放置一个USB 2集线器。
不再发生SAM-BA错误