Figure 4-6 SAM D09 Device Selection Window
3.
Go to
Solution Explorer > main.c
file and add the below code snippet to the
main()
function.
int main(void)
{
SystemInit();
PM->APBBMASK.reg |= PM_APBBMASK_PORT;
PORT->Group[0].OUTSET.reg = PORT_PA09;
PORT->Group[0].DIRSET.reg = PORT_PA09;
while (1)
{
PORT->Group[0].OUTTGL.reg = PORT_PA09;
}
}
4.
Connect Atmel ICE debugger to
ATSAMD09D14A
available on the target board through SWG
interface. Refer the
User Guide of Atmel ICE
for more details on debugging a target board.
5.
In Tool view (
Tools > Device Programming
), set the configurations – Tool (
Atmel-ICE
), and
Interface (
SWD
).
6.
Build the project:
Build > Build solution or shortcut F7
.
7.
To load the code and debug, select
Debug > Start debugging and break (shortcut Alt + F5)
.
8.
The application is programmed and the debugger breaks in
main()
. To run the code, select
Debug
> Continue (shortcut F5)
.
Atmel AT06467: Getting started with SAM D09/D10/D11 [APPLICATION NOTE]
Atmel-42362B-Getting-Started-with-SAM-D09-D10-D11_AT06467_Application Note-11/2015
13