atmelcorp / micro-sam-ba Goto Github PK
View Code? Open in Web Editor NEWMicro SAM-BA
License: GNU General Public License v2.0
Micro SAM-BA
License: GNU General Public License v2.0
Note: I use this code for production programming of devices as it is (for whatever reason) significantly faster and more robust than the tcl scriptable programmer. great job there.
for some reason the code as-is only supports usb programming despite the protocol for uart being identical - the baud is configured, but incorrectly for the sam-ba uart. note that baud is ignored for cdc serial and doesn't affect the data rate
tiny patch to enable programming over uart:
diff --git a/comm.c b/comm.c
index 0183c2a..af91a21 100644
--- a/comm.c
+++ b/comm.c
@@ -70,7 +70,7 @@ int samba_open(const char* device)
return -1;
}
- if (!configure_tty(fd, B4000000)) {
+ if (!configure_tty(fd, B115200)) {
close(fd);
return -1;
}
also note for any users here, the chip ids need updating for new device revisions. eg:
diff --git a/chipid.c b/chipid.c
index eb5e60b..041fb77 100644
--- a/chipid.c
+++ b/chipid.c
@@ -29,7 +29,8 @@ static const struct _chip _chips_samx7[] = {
{ "SAMS70Q21", 0xa1120e00, 0x00000002, 0x400e0c00, 0x00400000, 2048, 9 },
{ "SAMS70Q20", 0xa1120c00, 0x00000002, 0x400e0c00, 0x00400000, 1024, 9 },
{ "SAMS70Q19", 0xa11d0a00, 0x00000002, 0x400e0c00, 0x00400000, 512, 9 },
- { "SAMS70N21", 0xa1120e00, 0x00000001, 0x400e0c00, 0x00400000, 2048, 9 },
+ { "SAMS70N21A", 0xa1120e00, 0x00000001, 0x400e0c00, 0x00400000, 2048, 9 },
+ { "SAMS70N21B", 0xa1120e01, 0x00000001, 0x400e0c00, 0x00400000, 2048, 9 },
{ "SAMS70N20", 0xa1120c00, 0x00000001, 0x400e0c00, 0x00400000, 1024, 9 },
{ "SAMS70N19", 0xa11d0a00, 0x00000001, 0x400e0c00, 0x00400000, 512, 9 },
{ "SAMS70J21", 0xa1120e00, 0x00000000, 0x400e0c00, 0x00400000, 2048, 9 },
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.