Skip to content

Commit

Permalink
samg55 support with flash samba bootloader
Browse files Browse the repository at this point in the history
  • Loading branch information
tonokip committed Aug 12, 2017
1 parent e92cc91 commit 693f53b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/FlashFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,12 @@ FlashFactory::create(Samba& samba, uint32_t chipId, uint32_t extID)
case 0x1001001c:
flash = new NvmFlash( samba, "ATSAMR21E18A", 0x2000, 4096, 64, 1, 16, 0x20004000, 0x20008000, 0x41004000, true ) ;
break;

// SAMG55J19
case 0x24570ae0:
case 0x24570ae1:
flash = new EefcFlash(samba, "ATSAMG55J19", 0x00400000, 1024, 512, 1, 64, 0x20001000, 0x20001000, 0x400e0a00, false);
break;

// SAM4E
case 0xa3cc0ce0 :
Expand Down
14 changes: 11 additions & 3 deletions src/Samba.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,16 @@ Samba::init()

_port->timeout(TIMEOUT_NORMAL);

if (_debug)
printf("chipId=%#08x\n", cid);

uint8_t eproc = (cid >> 5) & 0x7;
uint8_t arch = (cid >> 20) & 0xff;

if (_debug)
{
printf("chipId=%#08x\n", cid);
printf("eproc=%#08x\n", eproc);
printf("arch=%#08x\n", arch);
}

// Check for ARM7TDMI processor
if (eproc == 2)
{
Expand Down Expand Up @@ -172,6 +176,10 @@ Samba::init()
if( arch == 0x3c )
return true;

// SAMG55 Architecture Identifier
if( arch == 0x45 )
return true;

if (_debug)
printf("Unsupported Cortex-M4 architecture\n");
}
Expand Down

0 comments on commit 693f53b

Please sign in to comment.