To program SAM R21 Xplained Pro board with the
ZLLDemo_LEDDriver_ATSAMR21_DimmableLight_IAR_48MHz.hex image
follow the below steps. The appropriate .hex file is available in the attachment
associated with this document.
- 1.Connect a micro USB cable to the
EDBG USB receptacle of SAM R21 Xplained Pro board as shown in the following
figure.
Figure 1. Connection between SAM
R21 Xplained Pro to Micro USB cable
- 2.Open Atmel
Studio.
- 3.Open
Tools->Device Programming.
- 4.Select
EDBG from the Tool dropdown
menu.
- 5.Select
ATSAMR21G18A from the Device
dropdown menu.
- 6.Select the Interface as
SWD.
- 7.Click
Apply. If you are asked to do a firmware upgrade of
the EDBG, click Yes and wait untill EDBG
Firmware upgrade successful message is displayed. The following
figure shows the settings to be configured in the Device
Programming window.
Figure 2. Settings – Device
Programming – SAM R21
- 8.Read the Device Signature and
Target Voltage from the Device Programming window.
- 9.In the Device Programming window
move to Memories tab and choose the location of
ZLLDemo_LEDDriver_ATSAMR21_DimmableLight_IAR_48MHz.hex
file, in the Flash section.
- 10.Click the
Program button.
- 11.After successful programming of
the SAM R21 Xplained Pro board, based on the log messages at the bottom of the
Device Programming window, disconnect the Micro USB
cable from the SAM R21 Xplained Pro board.
Note: After successful programming of the
flash, ignore any message regarding Verification failure.