1.. zephyr:board:: cc26x2r1_launchxl
2
3Overview
4********
5
6The Texas Instruments CC26x2R LaunchPad |trade| (LAUNCHXL-CC26X2R1) is a
7development kit for the SimpleLink |trade| multi-Standard CC2652R wireless MCU.
8
9See the `TI CC26x2R LaunchPad Product Page`_ for details.
10
11Hardware
12********
13
14The CC26x2R LaunchPad |trade| development kit features the CC2652R wireless MCU.
15The board is equipped with two LEDs, two push buttons and BoosterPack connectors
16for expansion. It also includes an integrated (XDS110) debugger.
17
18The CC2652 wireless MCU has a 48 MHz Arm |reg| Cortex |reg|-M4F SoC and an
19integrated 2.4 GHz transceiver supporting multiple protocols including Bluetooth
20|reg| Low Energy and IEEE |reg| 802.15.4.
21
22See the `TI CC2652R Product Page`_ for additional details.
23
24Supported Features
25==================
26
27The CC26x2R LaunchPad board configuration supports the following hardware
28features:
29
30+-----------+------------+----------------------+
31| Interface | Controller | Driver/Component     |
32+===========+============+======================+
33| GPIO      | on-chip    | gpio                 |
34+-----------+------------+----------------------+
35| MPU       | on-chip    | arch/arm             |
36+-----------+------------+----------------------+
37| NVIC      | on-chip    | arch/arm             |
38+-----------+------------+----------------------+
39| PINMUX    | on-chip    | pinmux               |
40+-----------+------------+----------------------+
41| UART      | on-chip    | serial               |
42+-----------+------------+----------------------+
43| I2C       | on-chip    | i2c                  |
44+-----------+------------+----------------------+
45| SPI       | on-chip    | spi                  |
46+-----------+------------+----------------------+
47| WDT       | on-chip    | watchdog             |
48+-----------+------------+----------------------+
49| AUX_ADC   | on-chip    | adc                  |
50+-----------+------------+----------------------+
51| HWINFO    | on-chip    | hwinfo               |
52+-----------+------------+----------------------+
53
54Other hardware features have not been enabled yet for this board.
55
56Connections and IOs
57===================
58
59All I/O signals are accessible from the BoosterPack connectors. Pin function
60aligns with the LaunchPad standard.
61
62+-------+-----------+---------------------+
63| Pin   | Function  | Usage               |
64+=======+===========+=====================+
65| DIO0  | GPIO      |                     |
66+-------+-----------+---------------------+
67| DIO1  | GPIO      |                     |
68+-------+-----------+---------------------+
69| DIO2  | UART0_RX  | UART RXD            |
70+-------+-----------+---------------------+
71| DIO3  | UART0_TX  | UART TXD            |
72+-------+-----------+---------------------+
73| DIO4  | I2C_MSSCL | I2C SCL             |
74+-------+-----------+---------------------+
75| DIO5  | I2C_MSSDA | I2C SDA             |
76+-------+-----------+---------------------+
77| DIO6  | GPIO      | Red LED             |
78+-------+-----------+---------------------+
79| DIO7  | GPIO      | Green LED           |
80+-------+-----------+---------------------+
81| DIO8  | SSI0_RX   | SPI MISO            |
82+-------+-----------+---------------------+
83| DIO9  | SSI0_TX   | SPI MOSI            |
84+-------+-----------+---------------------+
85| DIO10 | SSI0_CLK  | SPI CLK             |
86+-------+-----------+---------------------+
87| DIO11 | SSIO_CS   | SPI CS              |
88+-------+-----------+---------------------+
89| DIO12 | GPIO      |                     |
90+-------+-----------+---------------------+
91| DIO13 | GPIO      | Button 1            |
92+-------+-----------+---------------------+
93| DIO14 | GPIO      | Button 2            |
94+-------+-----------+---------------------+
95| DIO15 | GPIO      |                     |
96+-------+-----------+---------------------+
97| DIO16 |           | JTAG TDO            |
98+-------+-----------+---------------------+
99| DIO17 |           | JTAG TDI            |
100+-------+-----------+---------------------+
101| DIO18 | UART0_RTS | UART RTS / JTAG SWO |
102+-------+-----------+---------------------+
103| DIO19 | UART0_CTS | UART CTS            |
104+-------+-----------+---------------------+
105| DIO20 | GPIO      | Flash CS            |
106+-------+-----------+---------------------+
107| DIO21 | GPIO      |                     |
108+-------+-----------+---------------------+
109| DIO22 | GPIO      |                     |
110+-------+-----------+---------------------+
111| DIO23 | AUX_IO    | A0                  |
112+-------+-----------+---------------------+
113| DIO24 | AUX_IO    | A1                  |
114+-------+-----------+---------------------+
115| DIO25 | AUX_IO    | A2                  |
116+-------+-----------+---------------------+
117| DIO26 | AUX_IO    | A3                  |
118+-------+-----------+---------------------+
119| DIO27 | AUX_IO    | A4                  |
120+-------+-----------+---------------------+
121| DIO28 | AUX_IO    | A5                  |
122+-------+-----------+---------------------+
123| DIO29 | AUX_IO    | A6                  |
124+-------+-----------+---------------------+
125| DIO30 | AUX_IO    | A7                  |
126+-------+-----------+---------------------+
127
128Programming and Debugging
129*************************
130
131Before flashing or debugging ensure the RESET, TMS, TCK, TDO, and TDI jumpers
132are in place. Also place jumpers on the TXD and RXD signals for a serial
133console using the XDS110 application serial port.
134
135Prerequisites:
136==============
137
138#. Ensure the XDS-110 emulation firmware on the board is updated.
139
140   Download and install the latest `XDS-110 emulation package`_.
141
142   Follow these `xds110 firmware update directions
143   <http://software-dl.ti.com/ccs/esd/documents/xdsdebugprobes/emu_xds110.html#updating-the-xds110-firmware>`_
144
145   Note that the emulation package install may place the xdsdfu utility
146   in ``<install_dir>/ccs_base/common/uscif/xds110/``.
147
148#. Install OpenOCD
149
150   You can obtain OpenOCD by following these
151   :ref:`installing the latest Zephyr SDK instructions <toolchain_zephyr_sdk>`.
152
153   After the installation, add the directory containing the OpenOCD executable
154   to your environment's PATH variable. For example, use this command in Linux:
155
156   .. code-block:: console
157
158      export PATH=$ZEPHYR_SDK_INSTALL_DIR/sysroots/x86_64-pokysdk-linux/usr/bin/openocd:$PATH
159
160Flashing
161========
162
163Applications for the ``CC26x2R LaunchPad`` board configuration can be built and
164flashed in the usual way (see :ref:`build_an_application` and
165:ref:`application_run` for more details).
166
167Here is an example for the :zephyr:code-sample:`hello_world` application.
168
169First, run your favorite terminal program to listen for output.
170
171.. code-block:: console
172
173   $ screen <tty_device> 115200
174
175Replace :code:`<tty_device>` with the port where the XDS110 application
176serial device can be found. For example, :code:`/dev/ttyACM0`.
177
178Then build and flash the application in the usual way.
179
180.. zephyr-app-commands::
181   :zephyr-app: samples/hello_world
182   :board: cc26x2r1_launchxl
183   :goals: build flash
184
185Debugging
186=========
187
188You can debug an application in the usual way.  Here is an example for the
189:zephyr:code-sample:`hello_world` application.
190
191.. zephyr-app-commands::
192   :zephyr-app: samples/hello_world
193   :board: cc26x2r1_launchxl
194   :maybe-skip-config:
195   :goals: debug
196
197Bootloader
198==========
199
200The ROM bootloader on CC13x2 and CC26x2 devices is enabled by default. The
201bootloader will start if there is no valid application image in flash or the
202so-called backdoor is enabled (via option
203:kconfig:option:`CONFIG_CC13X2_CC26X2_BOOTLOADER_BACKDOOR_ENABLE`) and BTN-1 is held
204down during reset. See the bootloader documentation in chapter 10 of the `TI
205CC13x2 / CC26x2 Technical Reference Manual`_ for additional information.
206
207Power Management and UART
208=========================
209
210System and device power management are supported on this platform, and
211can be enabled via the standard Kconfig options in Zephyr, such as
212:kconfig:option:`CONFIG_PM`, :kconfig:option:`CONFIG_PM_DEVICE`.
213
214When system power management is turned on (CONFIG_PM=y),
215sleep state 2 (standby mode) is allowed, and polling is used to retrieve input
216by calling uart_poll_in(), it is possible for characters to be missed if the
217system enters standby mode between calls to uart_poll_in(). This is because
218the UART is inactive while the system is in standby mode. The workaround is to
219disable sleep state 2 while polling:
220
221.. code-block:: c
222
223    pm_policy_state_lock_get(PM_STATE_STANDBY, PM_ALL_SUBSTATES);
224    <code that calls uart_poll_in() and expects input at any point in time>
225    pm_policy_state_lock_put(PM_STATE_STANDBY, PM_ALL_SUBSTATES);
226
227
228References
229**********
230
231CC26X2R1 LaunchPad Quick Start Guide:
232  http://www.ti.com/lit/pdf/swru528
233
234.. _TI CC26x2R LaunchPad Product Page:
235   http://www.ti.com/tool/launchxl-cc26x2r1
236
237.. _TI CC2652R Product Page:
238   http://www.ti.com/product/cc2652r
239
240.. _TI CC26x2R LaunchPad Quick Start Guide:
241   http://www.ti.com/lit/pdf/swru528
242
243.. _TI CC2652R Datasheet:
244   http://www.ti.com/lit/pdf/swrs207
245
246.. _TI CC13x2 / CC26x2 Technical Reference Manual:
247   http://www.ti.com/lit/pdf/swcu185
248
249..  _XDS-110 emulation package:
250   http://processors.wiki.ti.com/index.php/XDS_Emulation_Software_Package#XDS_Emulation_Software_.28emupack.29_Download
251