Skip to content

Arduino branch, Support for Atmel ATSAMR21E18A #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 19, 2015

Conversation

zrecore
Copy link
Contributor

@zrecore zrecore commented Jun 15, 2015

Adding in support for the Atmel ATSAMR21E18A, which is just a SAM D21 with on-board AT86RF233 RF functionality.

@@ -34,6 +34,7 @@

#define ATSAMD_CHIPID_MASK (0xFFFF00FFul) // mask for DIE & REV bitfields removal in Samba::chipId()
#define ATSAMD_BOOTLOADER_SIZE (0x00002000ul) // 8192 bytes
#define ATSAMR_BOOTLOADER_SIZE (0x00001000ul) // 4096 bytes, USB-CDC only
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the SAMR completely without USB?

I'm wondering if the BOOTLOADER_SIZE should be set here or should be given as a parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SAM R21 line of chips have native USB lines (D+/D-) ....and since it's still a SAM D21 (but with a built in RF chip on a SERCOM SPI set of lines), the SAM-BA bootloader works on all R21 chips.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, bootloader size should be given as a parameter, because for samd21e/g/j exist SAM-BA bootloaders with 4kB size (one interface) and 8kB size (UART+USB).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, SAM R21 USB works only if you copy/refactor the SAM D21 CMSIS Atmel
headers and C files to reference SAM R21. As an example, check the atsamr21
bootloader for FemtoBeacon (inside Atmel folder)

https://github.com/femtoio/ArduinoCore-atsamd21e18a/tree/master/bootloaders/zero_osc32k/ATMEL

... unfortunately, the original headers that ship from Atmel for thr SAM
R21 did not (as of this writing) work when attempting to use USB. In fact,
non of the LwMesh examples even came with USB enabled.

It took me a lot of work to figure out USB + Wireless + Arduino support
for the SAM R21

Enjoy! :-)
On Jun 21, 2016 7:44 AM, "MartinManduch" [email protected] wrote:

In src/Devices.h
#12 (comment):

@@ -34,6 +34,7 @@

#define ATSAMD_CHIPID_MASK (0xFFFF00FFul) // mask for DIE & REV bitfields removal in Samba::chipId()
#define ATSAMD_BOOTLOADER_SIZE (0x00002000ul) // 8192 bytes
+#define ATSAMR_BOOTLOADER_SIZE (0x00001000ul) // 4096 bytes, USB-CDC only

Yes, bootloader size should be given as a parameter, because for
samd21e/g/j exist SAM-BA bootloaders with 4kB size (one interface) and 8kB
size (UART+USB).


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/shumatech/BOSSA/pull/12/files/a90a0ca610b4722239c0cd27e24099ea78d4e56e#r67882145,
or mute the thread
https://github.com/notifications/unsubscribe/AAaLbMWytzV4CvZs_oG7iW3INNpJJ2l-ks5qN_jhgaJpZM4FD3z6
.

@bobricius
Copy link

YES.WORKING !!!! YOU ARE GREAT !!!

cmaglie added a commit that referenced this pull request Jun 19, 2015
Arduino branch, Support for Atmel ATSAMR21E18A
@cmaglie cmaglie merged commit 63cdfbb into shumatech:arduino Jun 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants