1.. zephyr:board:: segger_trb_stm32f407
2
3Overview
4********
5
6The Cortex-M Trace Reference Board V1.2 (SEGGER-TRB-STM32F407 for short)
7board is a reference board, based on the ST Microelectronics STM32F407VE
8ARM Cortex-M4 CPU, to test hardware tracing with the SEGGER Trace-Pro
9debuggers. It is not meant for general prototype development because
10it is extremely limited when it comes to IO, and only has 3 LEDs.
11
12Hardware
13********
14
15Information about the board can be found at the `SEGGER website`_ .
16The `ST STM32F407VE website`_ contains the processor's information
17and the datasheet.
18
19Supported Features
20==================
21
22The SEGGER-TRB-STM32F407 board configuration supports the following
23hardware features:
24
25+------------+------------+------------------------------+
26| Interface  | Controller | Driver/Component             |
27+============+============+==============================+
28| NVIC       | on-chip    | nested vectored              |
29|            |            | interrupt controller         |
30+------------+------------+------------------------------+
31| SYSTICK    | on-chip    | system clock                 |
32+------------+------------+------------------------------+
33| GPIO       | on-chip    | gpio                         |
34+------------+------------+------------------------------+
35| WATCHDOG   | on-chip    | independent watchdog         |
36+------------+------------+------------------------------+
37| COUNTER    | on-chip    | rtc                          |
38+------------+------------+------------------------------+
39| RNG        | on-chip    | True Random number generator |
40+------------+------------+------------------------------+
41
42
43Other hardware features have not been enabled yet for this board.
44
45Pin Mapping
46===========
47
48LED
49---
50
51* LED0 (green) = PA8
52* LED1 (green) = PA9
53* LED2 (green) = PA10
54
55External Connectors
56-------------------
57
58JTAG/SWD debug
59
60+-------+--------------+-------+--------------+
61| PIN # | Signal Name  | Pin # | Signal Name  |
62+=======+==============+=======+==============+
63| 1     | VTref        | 2     | SWDIO/TMS    |
64+-------+--------------+-------+--------------+
65| 3     | GND          | 4     | SWCLK/TCK    |
66+-------+--------------+-------+--------------+
67| 5     | GND          | 6     | SWO/TDO      |
68+-------+--------------+-------+--------------+
69| 7     | ---          | 8     | TDI          |
70+-------+--------------+-------+--------------+
71| 9     | NC           | 10    | nRESET       |
72+-------+--------------+-------+--------------+
73| 11    | 5V-Supply    | 12    | TRACECLK     |
74+-------+--------------+-------+--------------+
75| 13    | 5V-Supply    | 14    | TRACEDATA[0] |
76+-------+--------------+-------+--------------+
77| 15    | GND          | 16    | TRACEDATA[1] |
78+-------+--------------+-------+--------------+
79| 17    | GND          | 18    | TRACEDATA[2] |
80+-------+--------------+-------+--------------+
81| 19    | GND          | 20    | TRACEDATA[3] |
82+-------+--------------+-------+--------------+
83
84
85System Clock
86============
87
88SEGGER-STM32F407-TRB has one external oscillator. The frequency of
89the main clock is 12 MHz. The processor can setup HSE to drive the
90master clock, which can be set as high as 168 MHz.
91
92Programming and Debugging
93*************************
94The SEGGER-TRB-STM32F407 board is specially designed to test the SEGGER
95Trace-Pro debuggers, so this example assumes a J-Trace or J-Link is used.
96
97Flashing an application to the SEGGER-TRB-STM32F407
98===================================================
99
100Connect the J-Trace/J-Link USB dongle to your host computer and to the JTAG
101port of the SEGGER-TRB-STM32F407 board. Then build and flash an application.
102
103Here is an example for the :zephyr:code-sample:`blinky` application.
104
105.. zephyr-app-commands::
106   :zephyr-app: samples/basic/blinky
107   :board: segger_trb_stm32f407
108   :goals: build flash
109
110After resetting the board, you should see LED0 blink with a 1 second interval.
111
112Debugging
113=========
114
115Here is an example for the :zephyr:code-sample:`blinky` application.
116
117.. zephyr-app-commands::
118   :zephyr-app: samples/basic/blinky
119   :board: segger_trb_stm32f407
120   :maybe-skip-config:
121   :goals: debug
122
123.. _SEGGER website:
124   https://www.segger.com/products/debug-probes/j-trace/accessories/trace-reference-boards/overview/
125
126.. _ST STM32F407VE website:
127   https://www.st.com/en/microcontrollers-microprocessors/stm32f407ve.html
128