Skip to content

Commit 9181fb1

Browse files
committed
[bl] Updating project documentation
1 parent 6ef81c4 commit 9181fb1

File tree

2 files changed

+32
-52
lines changed

2 files changed

+32
-52
lines changed

bootloaders/zero/README.md

+32-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Arduino Zero Bootloader
2-
# -----------------------
32

43
## 1- Prerequisites
54

@@ -8,16 +7,18 @@ Makefile is present at project root and try to handle multi-platform cases.
87

98
Multi-plaform GCC is provided by ARM here: https://launchpad.net/gcc-arm-embedded/+download
109

10+
Atmel Studio contains both make and ARM GCC toolchain. You don't need to install them in this specific use case.
11+
1112
### Windows
1213

13-
Native command line:
14+
* Native command line
1415
Make binary can be obtained here: http://gnuwin32.sourceforge.net/packages/make.htm
1516

16-
* Cygwin/MSys/MSys2/Babun/etc...:
17+
* Cygwin/MSys/MSys2/Babun/etc...
1718
It is available natively in all distributions.
1819

19-
* Atmel Studio:
20-
An Atmel Studio Makefile-based project is present at project root, just open samd21_sam_ba.atsln file.
20+
* Atmel Studio
21+
An Atmel Studio **7** Makefile-based project is present at project root, just open samd21_sam_ba.atsln file in AS7.
2122

2223
### Linux
2324

@@ -37,11 +38,35 @@ Set the define SAM_BA_INTERFACE to
3738
* SAM_BA_USBCDC_ONLY for only USB CDC interface
3839
* SAM_BA_BOTH_INTERFACES for enabling both the interfaces
3940

40-
4141
## 3- Behaviour
4242

4343
This bootloader implements the double-tap on Reset button.
4444
By quickly pressing this button two times, the board will reset and stay in bootloader, waiting for communication on either USB or USART.
4545

4646
The USB port in use is the USB Native port, close to the Reset button.
47-
The USART in use is the one available on pins D0/D1, labelled respectively RX/TX.
47+
The USART in use is the one available on pins D0/D1, labelled respectively RX/TX. Communication parameters are a baudrate at 115200, 8bits of data, no parity and 1 stop bit (8N1).
48+
49+
## 4- Description
50+
51+
**Pinmap**
52+
The following pins are used by the program :
53+
PA25 : input/output (USB DP)
54+
PA24 : input/output (USB DM)
55+
PA11 : input (USART RX)
56+
PA10 : output (USART TX)
57+
58+
The application board shall avoid driving the PA25, PA24, PB23 and PB22 signals while the boot program is running (after a POR for example).
59+
60+
**Clock system**
61+
62+
CPU runs at 48MHz from Generic Clock Generator 0 on DFLL48M.
63+
Generic Clock Generator 1 is using external 32kHz oscillator and is the source of DFLL48M.
64+
USB and USART are using Generic Clock Generator 0 also.
65+
66+
**Memory Mapping**
67+
68+
Bootloader code will be located at 0x0 and executed before any applicative code.
69+
70+
Applications compiled to be executed along with the bootloader will start at 0x2000 (see linker script bootloader_samd21x18.ld).
71+
72+
Before jumping to the application, the bootloader changes the VTOR register to use the interrupt vectors of the application @0x2000.<- not required as application code is taking care of this.

bootloaders/zero/main.c

-45
Original file line numberDiff line numberDiff line change
@@ -17,51 +17,6 @@
1717
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818
*/
1919

20-
/**
21-
* --------------------
22-
* SAM-BA Implementation on SAMD21
23-
* --------------------
24-
* Requirements to use SAM-BA :
25-
*
26-
* Supported communication interfaces :
27-
* --------------------
28-
*
29-
* SERCOM5 : RX:PB23 TX:PB22
30-
* Baudrate : 115200 8N1
31-
*
32-
* USB : D-:PA24 D+:PA25
33-
*
34-
* Pins Usage (*outdated as of 2015/10/10*)
35-
* --------------------
36-
* The following pins are used by the program :
37-
* PA25 : input/output
38-
* PA24 : input/output
39-
* PB23 : input
40-
* PB22 : output
41-
* PA15 : input
42-
*
43-
* The application board shall avoid driving the PA25,PA24,PB23,PB22 and PA15 signals
44-
* while the boot program is running (after a POR for example)
45-
*
46-
* Clock system (*outdated as of 2015/10/10*)
47-
* --------------------
48-
* CPU clock source (GCLK_GEN_0) - 8MHz internal oscillator (OSC8M)
49-
* SERCOM5 core GCLK source (GCLK_ID_SERCOM5_CORE) - GCLK_GEN_0 (i.e., OSC8M)
50-
* GCLK Generator 1 source (GCLK_GEN_1) - 48MHz DFLL in Clock Recovery mode (DFLL48M)
51-
* USB GCLK source (GCLK_ID_USB) - GCLK_GEN_1 (i.e., DFLL in CRM mode)
52-
*
53-
* Memory Mapping
54-
* --------------------
55-
* SAM-BA code will be located at 0x0 and executed before any applicative code.
56-
*
57-
* Applications compiled to be executed along with the bootloader will start at
58-
* 0x2000 (see linker script bootloader_samd21x18.ld)
59-
* Before jumping to the application, the bootloader changes the VTOR register
60-
* to use the interrupt vectors of the application @0x2000.<- not required as
61-
* application code is taking care of this.
62-
*
63-
*/
64-
6520
#include <stdio.h>
6621
#include <sam.h>
6722
#include "sam_ba_monitor.h"

0 commit comments

Comments
 (0)