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