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