SAM R21 Xplained Pro

This port is ongoing. You can follow its status through the following issues:

key summary type created updated due assignee reporter priority status resolution
Loading...
Refresh

Once the port is complete, this page will contain an overview of the board, and a tutorial on how to use this board.

 

Download Atmel Studio

Atmel Studio 6.2 can be downloaded to build the SAM R21 Project. SAM R21 Xplained Pro has EDBG, which can be used for Debugging and Programming the SAM R21.

Program the user page UID-64bit before running OpenWSN Firmware.

[Atmel Studio 6.2 Download Link]

MAC Unique ID Programming

       This will allow one to program the attached a03.userpage, a04.userpage to SAMR21_Xplained_pro Boards.

        Note: Replace the MAC EUI-64 with your registered MAC EUI-64.

        To Program the userpage into flash memory follow the steps mentioned below:

 

Download the example userpage:

a03.userpage  a04.userpage

  1. Select the userpage file using the browse button as mentioned in the above Fig.
  2. Press program button to program the selected userpage into user page of SAM R21
  3. Press verify button to verify the userpage content in SAM R21
  4. Compile the 03oos_macpong project, after compilation. Go to Tool->Device Programming->Tool Select the Board and Select the Device, Interface should be ‘SWD’ and SWD Clock may set to 4MHz. Select the memories->program. Flash another SAMR21_Xplained_pro as well.
  5. Press the Reset button on SAMR21_Xplained_pro boards.
  6. User Page program will contains the UID-64 for each device and unique.
  7. To test the OpenWSN with more No.of devices, we need to change the user page
  8. Open the user page with notepad++ or some hex editing tool. In this case user page looks like below

:0200000400807A

:10400000FFC7E0D85DFCFFFF0004251918010A0373

:10401000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0

:10402000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA0

:10403000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF90

:00000001FF

 

9.To change the UID-64 change the Highlighted text.

  For example. To change UID-64 of 00-04-25-19-18-01-0A-03 to UID-64 00-04-25-19-18-01-0A-04 we need to calculate the checksum as well.

  Checksum will be calculated as follows,

  0x10+0x40+0x00+0x00+0xFF+0xC7+0xE0+0xD8+0x5D+0xFC+0xFF+0xFF+0x00+0x04+0x25+0x19+0x18+0x01+0x0A+0x04 = 0x8E

  Checksum = One’s Complement of 0x8E + 0x1

          = 0x72

  UID-64 00-04-25-19-18-01-0A-04 For Now the user page will be,

:0200000400807A

:10400000FFC7E0D85DFCFFFF0004251918010A0472

:10401000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0

:10402000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA0

:10403000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF90

:00000001F

10. Save the new userpage file and do the userpage programming before programming the OpenWSN firmware.