Git Product home page Git Product logo

micro-sam-ba's People

Contributors

loiclefort avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

micro-sam-ba's Issues

uart programming

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 },

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.