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