Skip to content

Commit 44328f2

Browse files
rsalvetigalak
authored andcommitted
boards: add 96b_carbon board documentation
This patch adds documentation for 96b_carbon board. Change-Id: I2ffa8dc0dab579306474887023275d85d9a168da Signed-off-by: Ricardo Salveti <[email protected]> (cherry picked from commit 3f691f938ab3f29e6daa2f33a5ff66f85cdde3ae)
1 parent 6102147 commit 44328f2

File tree

2 files changed

+279
-0
lines changed

2 files changed

+279
-0
lines changed
Lines changed: 279 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,279 @@
1+
.. _96b_carbon_board:
2+
3+
96Boards Carbon
4+
###############
5+
6+
Overview
7+
********
8+
9+
Zephyr applications use the 96b_carbon configuration to run on the 96Boards
10+
Carbon hardware. It is based on the STMicroelectronics STM32F401RET Cortex-M4
11+
CPU and also contains a nRF51832 chip connected over SPI for BLE connectivity.
12+
13+
.. figure:: img/96b-carbon-front.png
14+
:width: 487px
15+
:align: center
16+
:alt: 96Boards Carbon
17+
18+
96Boards Carbon
19+
20+
Hardware
21+
********
22+
23+
96Boards Carbon provides the following hardware components:
24+
25+
- STM32F401RET6 in LQFP64 package
26+
- ARM®32-bit Cortex®-M4 CPU with FPU
27+
- 84 MHz max CPU frequency
28+
- VDD from 1.7 V to 3.6 V
29+
- 512 KB Flash
30+
- 96 KB SRAM
31+
- GPIO with external interrupt capability
32+
- 12-bit ADC with 16 channels
33+
- RTC
34+
- Advanced-control Timer
35+
- General Purpose Timers (7)
36+
- Watchdog Timers (2)
37+
- USART/UART (4)
38+
- I2C (3)
39+
- SPI (3)
40+
- SDIO
41+
- USB 2.0 OTG FS
42+
- DMA Controller
43+
- Bluetooth LE over SPI, provided by nRF51832
44+
45+
More information about STM32F401RE can be found here:
46+
- `STM32F401RE on www.st.com`_
47+
- `STM32F401 reference manual`_
48+
49+
Supported Features
50+
==================
51+
52+
The Zephyr 96b_carbon board configuration supports the following hardware
53+
features:
54+
55+
+-----------+------------+-------------------------------------+
56+
| Interface | Controller | Driver/Component |
57+
+===========+============+=====================================+
58+
| NVIC | on-chip | nested vector interrupt controller |
59+
+-----------+------------+-------------------------------------+
60+
| SYSTICK | on-chip | system clock |
61+
+-----------+------------+-------------------------------------+
62+
| UART | on-chip | serial port |
63+
+-----------+------------+-------------------------------------+
64+
| GPIO | on-chip | gpio |
65+
+-----------+------------+-------------------------------------+
66+
| PINMUX | on-chip | pinmux |
67+
+-----------+------------+-------------------------------------+
68+
| FLASH | on-chip | flash |
69+
+-----------+------------+-------------------------------------+
70+
| SPI | on-chip | spi |
71+
+-----------+------------+-------------------------------------+
72+
73+
More details about the board can be found at `96Boards website`_.
74+
75+
The default configuration can be found in the defconfig file:
76+
77+
``boards/arm/96b_carbon/96b_carbon_defconfig``
78+
79+
Pin Mapping
80+
===========
81+
82+
LED
83+
---
84+
85+
- LED1 / User1 LED = PD2
86+
- LED2 / User2 LED = PA15
87+
- LED3 / BT LED = PB5
88+
- LED4 / Power LED = VCC
89+
90+
Push buttons
91+
------------
92+
93+
- BUTTON = BOOT0 (SW1)
94+
- BUTTON = RST
95+
96+
External Connectors
97+
-------------------
98+
99+
Low Speed Header
100+
101+
+--------+-------------+----------------------+
102+
| PIN # | Signal Name | STM32F401 Functions |
103+
+========+=============+======================+
104+
| 1 | UART2_CTS | PA0 |
105+
+--------+-------------+----------------------+
106+
| 3 | UART2_TX | PA2 |
107+
+--------+-------------+----------------------+
108+
| 5 | UART2_RX | PA3 |
109+
+--------+-------------+----------------------+
110+
| 7 | UART2_RTS | PA1 |
111+
+--------+-------------+----------------------+
112+
| 9 | GND | GND |
113+
+--------+-------------+----------------------+
114+
| 11 | USB5V | USB5V |
115+
+--------+-------------+----------------------+
116+
| 13 | AIN12 | PC2 |
117+
+--------+-------------+----------------------+
118+
| 15 | AIN14 | PC4 |
119+
+--------+-------------+----------------------+
120+
| 17 | UART6_TX | PC6 |
121+
+--------+-------------+----------------------+
122+
| 19 | GPIO | PC8 |
123+
+--------+-------------+----------------------+
124+
| 21 | I2C1_SCL | PB6 |
125+
+--------+-------------+----------------------+
126+
| 23 | I2C1_SCA | PB7 |
127+
+--------+-------------+----------------------+
128+
| 25 | I2C2_SCA | PB3 |
129+
+--------+-------------+----------------------+
130+
| 27 | I2C2_SCL | PB10 |
131+
+--------+-------------+----------------------+
132+
| 29 | RST_BTN | RST_BTN |
133+
+--------+-------------+----------------------+
134+
135+
+--------+-------------+----------------------+
136+
| PIN # | Signal Name | STM32F401 Functions |
137+
+========+=============+======================+
138+
| 2 | SPI2_SS | PB12 |
139+
+--------+-------------+----------------------+
140+
| 4 | SPI2_MOSI | PB15 |
141+
+--------+-------------+----------------------+
142+
| 6 | SPI2_MISO | PB14 |
143+
+--------+-------------+----------------------+
144+
| 8 | SPI2_SCK | PB13 |
145+
+--------+-------------+----------------------+
146+
| 10 | GND | GND |
147+
+--------+-------------+----------------------+
148+
| 12 | VCC2 | VCC2 |
149+
+--------+-------------+----------------------+
150+
| 14 | AIN13 | PC3 |
151+
+--------+-------------+----------------------+
152+
| 16 | AIN15 | PC5 |
153+
+--------+-------------+----------------------+
154+
| 18 | UART6_RX | PC7 |
155+
+--------+-------------+----------------------+
156+
| 20 | GPIO | PC9 |
157+
+--------+-------------+----------------------+
158+
| 22 | I2C1_SCL | PB8 |
159+
+--------+-------------+----------------------+
160+
| 24 | I2C1_SDA | PB9 |
161+
+--------+-------------+----------------------+
162+
| 26 | AIN10 | PC0 |
163+
+--------+-------------+----------------------+
164+
| 28 | AIN11 | PC1 |
165+
+--------+-------------+----------------------+
166+
| 30 | NC | NC |
167+
+--------+-------------+----------------------+
168+
169+
System Clock
170+
============
171+
172+
STM32F4 has two external oscillators. The frequency of the slow clock is
173+
32.768 kHz. The frequency of the main clock is 16 MHz.
174+
175+
Flashing Zephyr onto 96Boards Carbon
176+
************************************
177+
178+
There are 2 main entry points for flashing STM32F4X SoCs, one using the ROM
179+
bootloader, and another by using the SWD debug port (which requires additional
180+
hardware). Flashing using the ROM bootloader requires a special activation
181+
pattern, which can be triggered by using the BOOT0 pin. The ROM bootloader
182+
supports flashing via USB (DFU), UART, I2C and SPI. You can read more about
183+
how to enable and use the ROM bootloader by checking the application
184+
note `AN2606`_, page 109.
185+
186+
Installing dfu-util
187+
===================
188+
189+
It is recommended to use at least v0.8 of `dfu-util`_. The package available in
190+
debian/ubuntu can be quite old, so you might have to build dfu-util from source.
191+
192+
Flashing an Application to 96Boards Carbon
193+
------------------------------------------
194+
195+
The sample application :ref:`hello_world` is being used in this tutorial:
196+
197+
.. code-block:: console
198+
199+
$<zephyr_root_path>/samples/hello_world
200+
201+
To build the Zephyr kernel and application, enter:
202+
203+
.. code-block:: console
204+
205+
$ cd <zephyr_root_path>
206+
$ source zephyr-env.sh
207+
$ cd $ZEPHYR_BASE/samples/hello_world/
208+
$ make BOARD=96b_carbon
209+
210+
Connect the micro-USB cable to the USB OTG Carbon port and to your computer.
211+
The board should power ON. Force the board into DFU mode by keeping the BOOT0
212+
switch pressed while pressing and releasing the RST switch.
213+
214+
Confirm that the board is in DFU mode:
215+
216+
.. code-block:: console
217+
218+
$ sudo dfu-util -l
219+
dfu-util 0.8
220+
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
221+
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
222+
This program is Free Software and has ABSOLUTELY NO WARRANTY
223+
Please report bugs to [email protected]
224+
Found DFU: [0483:df11] ver=2200, devnum=15, cfg=1, intf=0, alt=3, name="@Device Feature/0xFFFF0000/01*004 e", serial="3574364C3034"
225+
Found DFU: [0483:df11] ver=2200, devnum=15, cfg=1, intf=0, alt=2, name="@OTP Memory /0x1FFF7800/01*512 e,01*016 e", serial="3574364C3034"
226+
Found DFU: [0483:df11] ver=2200, devnum=15, cfg=1, intf=0, alt=1, name="@Option Bytes /0x1FFFC000/01*016 e", serial="3574364C3034"
227+
Found DFU: [0483:df11] ver=2200, devnum=15, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/04*016Kg,01*064Kg,03*128Kg", serial="3574364C3034"
228+
Found Runtime: [05ac:8290] ver=0104, devnum=2, cfg=1, intf=5, alt=0, name="UNKNOWN", serial="UNKNOWN"
229+
230+
You should see following confirmation on your Linux host:
231+
232+
.. code-block:: console
233+
234+
$ dmesg
235+
usb 1-2.1: new full-speed USB device number 14 using xhci_hcd
236+
usb 1-2.1: New USB device found, idVendor=0483, idProduct=df11
237+
usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
238+
usb 1-2.1: Product: STM32 BOOTLOADER
239+
usb 1-2.1: Manufacturer: STMicroelectronics
240+
usb 1-2.1: SerialNumber: 3574364C3034
241+
242+
Flash a new application to the board:
243+
244+
.. code-block:: console
245+
246+
$ sudo dfu-util -d [0483:df11] -a 0 -D outdir/96b_carbon/zephyr.bin -s 0x08000000
247+
248+
Connect the micro-USB cable to the USB UART (FTDI) port and to your computer.
249+
Run your favorite terminal program to listen for output.
250+
251+
.. code-block:: console
252+
253+
$ minicom -D <tty_device> -b 115200
254+
255+
Replace :code:`<tty_device>` with the port where the board 96Boards Carbon
256+
can be found. For example, under Linux, :code:`/dev/ttyUSB0`.
257+
The ``-b`` option sets baud rate ignoring the value from config.
258+
259+
Press the Reset button and you should see the the following message in your
260+
terminal:
261+
262+
.. code-block:: console
263+
264+
Hello World! arm
265+
266+
.. _dfu-util:
267+
http://dfu-util.sourceforge.net/build.html
268+
269+
.. _AN2606:
270+
http://www.st.com/content/ccc/resource/technical/document/application_note/b9/9b/16/3a/12/1e/40/0c/CD00167594.pdf/files/CD00167594.pdf/jcr:content/translations/en.CD00167594.pdf
271+
272+
.. _96Boards website:
273+
http://www.96boards.org/documentation
274+
275+
.. _STM32F401RE on www.st.com:
276+
http://www.st.com/en/microcontrollers/stm32f401re.html
277+
278+
.. _STM32F401 reference manual:
279+
http://www.st.com/resource/en/reference_manual/dm00096844.pdf
1.07 MB
Loading

0 commit comments

Comments
 (0)