Professional Documents
Culture Documents
Atmel IC LCD
LCD LCD
AVR AVR MCU
AVR
D21 wgsxsm
02
.......................................................................................................................................02
Atmel SAM D21 ...............................................05
1. Atmel SAM DMCU..............................................................................................05
1.1 ..............................................................................................................................................05
1.2 Atmel SAM DMCU..........................................................................................................05
1.3 Atmel SAM D21 MCU.......................................................................................07
2. Atmel SAM D21 Xplained Pro.........................................................................................08
2.1 ..........................................................................................................................08
2.1.1 .............................................................................................08
2.1.2 D20D21.................................................................................11
2.2 .........................................................................................................14
2.2.1 Atmel Studio 6.2beta....................................................................14
2.2.2 Atmel Studio 6.2beta................................................................25
2.2.3 KeilAtmel SAM D21.......................................................................................30
03
................................................................................................................ 104
........................................................................................................................ 105
........................................................................................................................ 106
04
Atmel SAM D
05
CPU
(SERCOM)
SAM D11 1
Atmel
QTouch
8KB 256KB 14 64
06
DMA
SAM
12
70A/MHz
USB
10 DAC
QFP
07
EDBG AT32UC3A4256J 32
AVR MCU SWD
USB UART
Atmel Data Gateway Interface SPI TWI
GPIO
08
SAMD21J18A
SAMD21J18A
ARM Cortex-M0+ 48MHz2.14 Coremark/MHz
70uA/MHz ARMCortex-M0+
EventSystem
256KB FLASH 32KB SRAM
ARMCortex-M0+
64 Pin QFN
6 Serial Communication Interface,
SERCOMUART/USARTSPII2C
USB2.0
96MHz PLL I2S
09
SAMD21J18A
http://bbs.eeworld.com.cn/thread-447538-1-1.html
http://bbs.eeworld.com.cn/thread-447681-1-1.html
http://bbs.eeworld.com.cn/thread-447598-1-1.html
10
Evaluation Kit
11
1. D21 USB
2. D21 DATAFLASH
3. D21
4. D20 Atmel arm
5. D21 D20
12
2 Atmel
http://bbs.eeworld.com.cn/thread-450104-1-1.html
13
2.2
2.2.1 Atmel Studio 6.2beta
IDEAtmel Studio Atmel SAM D21
6.2beta
14
Atmel
15
16
17
18
Full/Custom
19
USB
20
21
22
23
24
25
New ExampleProject
26
LED Toggle
27
OK
28
http://bbs.eeworld.com.cn/thread-447871-1-1.html
29
LED Blinky
MDK
MDK4.73 keil.SAMD21_dfp.1.0.0
SAMD21 Series ATSAMD21J ATSAMD21J18A
30
MDK5 MDK4
Startup
main.c
main.cSAMD21
8MHz GCLK CPU PM PORT
LED
LED PB30.
31
= PORT_PB30;
= PORT_PB30;
= PORT_PB30;
= PORT_PB30;
main(void)
LED_Init();
while(1)
{
LED_ON();
delay(10000);
LED_OFF();
delay(100000);
}
http://bbs.eeworld.com.cn/thread-447420-1-1.html
32
Keil PC IDE
SAMD21
ARM Cortex-M0+ MCU 48MHz
48MHz SAM D21
DFLL48M
Atmel IDEAtmelStudio Example
Keil
Atmel-42119-SAM-D20-D21-System-Clock-Management-Driver-SYSTEM-CLOCK_
Application-Note_AT03259
1MHz
#include "SAMD21.h"
void LED_Init(void)
{
PORT->Group[1].DIRSET.reg = PORT_PB30;
PORT->Group[1].OUTSET.reg = PORT_PB30;
}
void LED_ON(void)
{
PORT->Group[1].OUTCLR.reg = PORT_PB30;
}
void LED_OFF(void)
33
34
35
DFLL48M
Boot NMI
NMI Reset NMI
Boot
NMI NMI
OK
8 OSC8M
36
37
void configure_gclk_gen_dfll(void)
{
/* Change system clock to DFLL */
GCLK_GENCTRL_Type genctrl;
GCLK_GENDIV_Type gendiv;
genctrl.reg = 0;
gendiv.reg = 0;
genctrl.bit.ID = GCLK_CLKCTRL_GEN_GCLK0_Val;
gendiv.bit.ID = GCLK_CLKCTRL_GEN_GCLK0_Val;
genctrl.bit.SRC = GCLK_SOURCE_DFLL48M;
genctrl.bit.DIVSEL = 0;
genctrl.bit.IDC = 0;
genctrl.bit.OOV = 0;
genctrl.bit.RUNSTDBY = 0;
genctrl.bit.OE = 0;
gendiv.bit.DIV = 0;
configure_gclk(genctrl, gendiv);
}
main
int ieo=0;
int main(void)
{
while(ieo!=5);
configure_osc8m_8m();
configure_dfll_open_loop();
38
ieo
SysTick_Config CM 1/4
1/2 Tick
1/4 Tick 32
main.zip
http://download.eeworld.com.cn/detail/phantom7/550573
http://bbs.eeworld.com.cn/thread-448782-1-1.html
39
Atmel SAM
D21
1. Atmel SAM D21 Xplained Pro
1.1 Studio .
tmel D21 Studio .
USB
EDBG EDBG
USB
EDBG
40
http://bbs.eeworld.com.cn/forum.php?mod=viewthread&tid=447603
41
1.2 D21
Hi,
I just installed the SAMD21 xplained board and Atmel studio 6.2. Towards the end of the
install it decided to update the debug firmware from 1.12 to 1.18 (if memory serves correct)
but stopped with a timeout before it had finished. I could see the EDBG debug tool before the
upgrade, but now I can't see it. Any way to restart the firmware upgrade?
Regards, Alan
Known issue with the beta. Go to Tools|Command Prompt and write atfw -h
Full command to force upgrade is something like (given only 1 edbg connected)
atfw -t edbg -a \tools\EDBG\edbg_fw.zip
atfw
42
D21
c:\Program Files\Atmel\Atmel Studio 6.2\atbackend> atfw
EDBG c:\Program Files\Atmel\Atmel Studio 6.2\tools\EDBG
XPlained
http://bbs.eeworld.com.cn/thread-447769-1-1.html
43
1.3 ASF
ASF Atmel Software Framework, Atmel
ASF
44
SW0 LED
http://bbs.eeworld.com.cn/thread-447875-1-1.html
45
1.4 PWM
Studio6.2, ASF
D21 LED ASF ASF
timer TC ADD
APPLY,
46
47
http://bbs.eeworld.com.cn/thread-449790-1-1.html
48
D21
io LED
49
pin pin
find reference sw0 SAMD21_xplained_pro.h
led PB30 PA15
50
IO
http://bbs.eeworld.com.cn/thread-449453-1-1.html
51
UART.rar
http://download.eeworld.com.cn/detail/phantom7/550574
http://bbs.eeworld.com.cn/thread-449179-1-1.html
52
LEDPWM .pdf
http://download.eeworld.com.cn/detail/phantom7/550575
http://www.Atmel.com/tools/Atmelstudio.aspx?tab=overview Atmelstudio
6.2
53
SAMD21-X-PLAINEDAtmelstudio
LEDctrlbypwm
54
SAMD21-X-PLAINED
IO
55
ASF
56
LED0 IO pwm
Atmelstudio TCC asf TCC
57
copy main.c
58
http://bbs.eeworld.com.cn/thread-447772-1-1.html
59
5. SAM D21
5.1
EEWORLD SAM D21
EEWORLD Atmel
tool
F5
60
WIN7
WIN7 XP XP
61
WIN7
WIN7
GHOST GHOST
http://bbs.eeworld.com.cn/thread-447593-1-1.html
62
5.2
SAM D21 +
GHOST
Atmel
C:\Windows\inf
mdmcpq.inf
C:\Windows\System32\drivers usbser.sys
Atmel win7
63
win7
http://bbs.eeworld.com.cn/thread-447656-1-1.html
64
int BSP_Init(void)
{
SysTick_Init();
LED_Init();
return 0;
}
BSP_Init()
int BSP_Init(void)
{
SysTick_Init();
LED_Init();
return 0;
}
65
LED
#define LED_BIT
0x1<<30
void LED_Init(void)
{
REG_PORT_OUTSET1 = LED_BIT; // PB30 1
LED
REG_PORT_DIRSET1 = LED_BIT;
// PB30
66
// LED
500ms 498ms
http://bbs.eeworld.com.cn/thread-449628-1-1.html
67
68
4 ( )
http://bbs.eeworld.com.cn/thread-449800-1-1.html
69
Atmel SAM
D21 Xplained Pro
1.SAM D21 Xplained Pro
Atmel AVR Studio 4Atmel ARM Atmel
( + )Atmel Studio 6.2
(
)
Atmel SAM D21
32.768Khz
LED PB30
70
32768hz
1024
32768/1024=3232 1
48
16
LED
71
LED IO
http://download.eeworld.com.cn/detail/phantom7/550580
http://bbs.eeworld.com.cn/thread-449183-1-1.html
72
ADXL345 0x53
LED0
73
ADXL345
74
http://bbs.eeworld.com.cn/forum.php?mod=viewthread&tid=449894
set as start up
LEDlib
math libm
75
76
poll callback
77
78
79
as
80
14M
http://bbs.eeworld.com.cn/thread-449572-1-1.html
81
xplained adc
adc
ADC uart
asf project uart secom
uart uart mcu D21 secom uart
82
while(port_pin_get_input_level(BUTTON_0_PIN) == BUTTON_0_ACTIVE);
as asf
int
{
main (void)
uint16_t result,vres;
uint8_t string[] = v=0.000\r\n;
system_init();
configure_adc();
configure_usart();
83
port_pin_set_output_level(LED_0_PIN, LED_0_ACTIVE);
adc_start_conversion(&adc_instance);
do {
/* Wait for conversion to be done and read out
result */
sizeof(string));
}else {
// No, so turn LED off.
port_pin_set_output_level(LED_0_PIN, !LED_0_ACTIVE);
}
}
}
http://bbs.eeworld.com.cn/thread-449588-1-1.html
84
85
OLED --
-------------------VCC--VCC
GND --GND
RES--PA27
CS --PB17
DC--PB30
SCLK--PB23
SDIN--PB22
0.9612864OLED
86
87
http://bbs.eeworld.com.cn/forum.php?mod=viewthread&tid=447722
88
89
AtmelStudio-6.0 ( ).doc
http://bbs.eeworld.com.cn/thread-449632-1-1.html
90
UART
1 IIC
Atmel STUDIO
IO PA08--I2C_SDA,PA09--I2C_SCL, datasheet
SERCOM2
91
SERCOM2 IO PCF8563
DATASHEET 0x02,
I2C
0x02
92
93
OLED
2. UART
PC PC
10 0x55 0xAA
94
http://bbs.eeworld.com.cn/thread-450183-1-1.html
95
http://bbs.eeworld.com.cn/thread-449632-1-1.html
96
SAMD21_xplained_pro.h
10
97
http://bbs.eeworld.com.cn/thread-449815-1-1.html
98
BruceLone AVR,COTEX-M3
SAM D21
MCUAtmel MCU
MCU, SAM D21
hh376158101 avr
SAM D21 SAM D21
USBDMA ad
zjbwxl Atmel SAM D
bjwl_6338 SAM D21 Xplained Pro
2.
3.
4. ,AVR ,
5.
6. ADC, ADC , , ,
99
7. PGA, ,1/2--16 , ,
. 12 ADC 17 , ,
8.
SAM D21 Xplained Pro M0
AT89
jofficer D21 mcu M0+
MCU J 64 pin256K flash32K ram
R7F0C8
SAM D21
R7F0C8 1
D21 AD 2
D21 AD 3
DDS D21 DA
4 R7F0C8 10pin TFT
DavidZH Atmel Atmel SAM D21
Xplained Pro CortexM0+ MCU Atmel SAM D21
Xplained Pro
zch_genius
MCU
IO 1. MCU 2.
3.
sjtitrSAM D21
916636D21 Atmel
MCU D21
lun0144
mcu
william228 AT89S52 AVR
STM8/32 Atmel, D21 D21
100
MCU
Atmel MCU
MCU
zqjqq881. AT 2. FRE ST 3.
4. 5. M0/M3
ddllxxrr MEGA16MEGA8 AT89C51.AVR
SAMD21J18A USB, USB USB
AVR AVR AtmelStudio 6 ASF,
Atmel SAM D21 Xplained Pro cortex m0+
SDM D21 Atmel Xplained
mcu
KevenZhang Atmel
Atmel 51
yimapingchuan MCU Atmel MCU
Atmel MCU
MCU
ainiyiwangnian ARM
Atmel SAM D21 ARM Cortex-M0+
101
AD
ctqvsly M0 Atmel M0
1. JTAG 2. USB
8Mb Flash 3. FATFS FLASHH 4.
5. M0 USB 6. 16-bit ADC
12-bit DAC
lyncxy119 Atmel M0 Atmel
CPU
gxliu08 / /
102
SAM D21
PC FPS
PC SAM D21 I2C UART
DMA CPU
USB PC
Kinectwii PC
bingling_894
Atmel SAM D21 Xplained Pro
103
104
EEWORLD
Atmel D MCU
Atmel
EEWORLD
2015.1.4
105
4 Atmel EEWORLD
106