Skip to content

Commit

Permalink
boards: ti: Add support of CC1352P7 Launchpad
Browse files Browse the repository at this point in the history
This adds support of CC1352P7 Lauchpad.
This based on the CC1352R1 LaunchXL.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
  • Loading branch information
anobli authored and nashif committed Jul 28, 2024
1 parent 200e8d4 commit 988e4cf
Show file tree
Hide file tree
Showing 11 changed files with 333 additions and 0 deletions.
3 changes: 3 additions & 0 deletions boards/ti/cc1352p7_launchpad/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(${ZEPHYR_BASE}/boards/ti/common/ ${CMAKE_CURRENT_BINARY_DIR}/common)
6 changes: 6 additions & 0 deletions boards/ti/cc1352p7_launchpad/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# TI CC1352P7 LaunchPad board

# Copyright (c) 2024 Alexandre Bailon
# SPDX-License-Identifier: Apache-2.0

source "boards/ti/common/Kconfig"
7 changes: 7 additions & 0 deletions boards/ti/cc1352p7_launchpad/Kconfig.cc1352p7_lp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# TI CC1352P7 LaunchPad board

# Copyright (c) 2024 Alexandre Bailon
# SPDX-License-Identifier: Apache-2.0

config BOARD_CC1352P7_LP
select SOC_CC1352P7
5 changes: 5 additions & 0 deletions boards/ti/cc1352p7_launchpad/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2021 Florin Stancu
#
# SPDX-License-Identifier: Apache-2.0

include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
5 changes: 5 additions & 0 deletions boards/ti/cc1352p7_launchpad/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: cc1352p7_lp
vendor: ti
socs:
- name: cc1352p7
17 changes: 17 additions & 0 deletions boards/ti/cc1352p7_launchpad/cc1352p7_lp.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (c) 2024 Alexandre Bailon
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;

#include <ti/cc1352r7.dtsi>
#include "../common/launchxl.dtsi"
#include "../common/launchxl-flash-p7.dtsi"
#include "../common/launchxl_sky13317.dtsi"

/ {
model = "TI CC1352P7 LaunchPad";
compatible = "ti,lp-cc1352p7";
};
17 changes: 17 additions & 0 deletions boards/ti/cc1352p7_launchpad/cc1352p7_lp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
identifier: cc1352p7_lp
name: TI SimpleLink CC1352P7 LaunchPad
type: mcu
arch: arm
ram: 144
flash: 704
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- gpio
- i2c
- spi
- watchdog
- hwinfo
vendor: ti
24 changes: 24 additions & 0 deletions boards/ti/cc1352p7_launchpad/cc1352p7_lp_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Copyright (c) 2021 Florin Stancu
#
# SPDX-License-Identifier: Apache-2.0
#

CONFIG_BUILD_OUTPUT_HEX=y
# custom callback for the antenna switch
CONFIG_CC13X2_CC26X2_HAS_CUSTOM_RF_HWATTRS=y

CONFIG_CC13X2_CC26X2_BOOTLOADER_ENABLE=y
CONFIG_CC13X2_CC26X2_BOOTLOADER_BACKDOOR_ENABLE=y
CONFIG_CC13X2_CC26X2_BOOTLOADER_BACKDOOR_PIN=15

# Enable MPU and hardware stack protection
CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y

CONFIG_PINCTRL=y
CONFIG_GPIO=y
CONFIG_SERIAL=y

CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
248 changes: 248 additions & 0 deletions boards/ti/cc1352p7_launchpad/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
.. _cc1352p7_lp:

CC1352P7 LaunchPad
##################

Overview
********

The Texas Instruments CC1352P7 LaunchPad |trade| (LP-CC1352P7) is a
development kit for the SimpleLink |trade| multi-Standard CC1352P7 wireless MCU.

See the `TI CC1352P7 LaunchPad Product Page`_ for details.

.. figure:: img/lp-cc1352p7-top.jpg
:width: 400px
:align: center
:alt: TI CC1352P7 LaunchPad

Texas Instruments CC1352P7 LaunchPad |trade|

Hardware
********

The CC1352P7 LaunchPad |trade| development kit features the CC1352P7 wireless MCU.
The board is equipped with two LEDs, two push buttons, antenna switch and
BoosterPack connectors for expansion. It also includes an integrated (XDS110)
debugger.

The CC1352P7 wireless MCU has a 48 MHz Arm |reg| Cortex |reg|-M4F SoC and an
integrated sub-1GHz and 2.4 GHz transceiver with integrated 20dBm power amplifier
(PA) supporting multiple protocols including Bluetooth |reg| Low Energy and IEEE
|reg| 802.15.4.

See the `TI CC1352P7 Product Page`_ for additional details.

Supported Features
==================

The CC1352P7 LaunchPad board configuration supports the following hardware
features:

+-----------+------------+----------------------+
| Interface | Controller | Driver/Component |
+===========+============+======================+
| GPIO | on-chip | gpio |
+-----------+------------+----------------------+
| MPU | on-chip | arch/arm |
+-----------+------------+----------------------+
| NVIC | on-chip | arch/arm |
+-----------+------------+----------------------+
| PINMUX | on-chip | pinmux |
+-----------+------------+----------------------+
| UART | on-chip | serial |
+-----------+------------+----------------------+
| I2C | on-chip | i2c |
+-----------+------------+----------------------+
| SPI | on-chip | spi |
+-----------+------------+----------------------+
| WDT | on-chip | watchdog |
+-----------+------------+----------------------+
| HWINFO | on-chip | hwinfo |
+-----------+------------+----------------------+

Other hardware features have not been enabled yet for this board.

Connections and IOs
===================

All I/O signals are accessible from the BoosterPack connectors. Pin function
aligns with the LaunchPad standard.

+-------+-----------+---------------------+
| Pin | Function | Usage |
+=======+===========+=====================+
| DIO3 | GPIO | |
+-------+-----------+---------------------+
| DIO4 | I2C_MSSCL | I2C SCL |
+-------+-----------+---------------------+
| DIO5 | I2C_MSSDA | I2C SDA |
+-------+-----------+---------------------+
| DIO6 | GPIO | Red LED |
+-------+-----------+---------------------+
| DIO7 | GPIO | Green LED |
+-------+-----------+---------------------+
| DIO8 | SSI0_RX | SPI MISO |
+-------+-----------+---------------------+
| DIO9 | SSI0_TX | SPI MOSI |
+-------+-----------+---------------------+
| DIO10 | SSI0_CLK | SPI CLK |
+-------+-----------+---------------------+
| DIO11 | SSIO_CS | SPI CS |
+-------+-----------+---------------------+
| DIO12 | UART0_RX | UART RXD |
+-------+-----------+---------------------+
| DIO13 | UART0_TX | UART TXD |
+-------+-----------+---------------------+
| DIO14 | GPIO | Button 2 |
+-------+-----------+---------------------+
| DIO15 | GPIO | Button 1 |
+-------+-----------+---------------------+
| DIO16 | | JTAG TDO |
+-------+-----------+---------------------+
| DIO17 | | JTAG TDI |
+-------+-----------+---------------------+
| DIO18 | UART0_RTS | UART RTS / JTAG SWO |
+-------+-----------+---------------------+
| DIO19 | UART0_CTS | UART CTS |
+-------+-----------+---------------------+
| DIO20 | GPIO | Flash CS |
+-------+-----------+---------------------+
| DIO21 | GPIO | |
+-------+-----------+---------------------+
| DIO22 | GPIO | |
+-------+-----------+---------------------+
| DIO23 | AUX_IO | A0 |
+-------+-----------+---------------------+
| DIO24 | AUX_IO | A1 |
+-------+-----------+---------------------+
| DIO25 | AUX_IO | A2 |
+-------+-----------+---------------------+
| DIO26 | AUX_IO | A3 |
+-------+-----------+---------------------+
| DIO27 | AUX_IO | A4 |
+-------+-----------+---------------------+
| DIO28 | AUX_IO | A5 |
+-------+-----------+---------------------+
| DIO29 | AUX_IO | A6 |
+-------+-----------+---------------------+
| DIO30 | AUX_IO | A7 |
+-------+-----------+---------------------+

Programming and Debugging
*************************

Before flashing or debugging ensure the RESET, TMS, TCK, TDO, and TDI jumpers
are in place. Also place jumpers on the TXD and RXD signals for a serial
console using the XDS110 application serial port.

Prerequisites:
==============

#. Ensure the XDS-110 emulation firmware on the board is updated.

Download and install the latest `XDS-110 emulation package`_.

Follow these `xds110 firmware update directions
<http://software-dl.ti.com/ccs/esd/documents/xdsdebugprobes/emu_xds110.html#updating-the-xds110-firmware>`_

Note that the emulation package install may place the xdsdfu utility
in ``<install_dir>/ccs_base/common/uscif/xds110/``.

#. Install OpenOCD

You can obtain OpenOCD by following these
:ref:`installing the latest Zephyr SDK instructions <toolchain_zephyr_sdk>`.

After the installation, add the directory containing the OpenOCD executable
to your environment's PATH variable. For example, use this command in Linux:

.. code-block:: console
export PATH=$ZEPHYR_SDK_INSTALL_DIR/sysroots/x86_64-pokysdk-linux/usr/bin/openocd:$PATH
Flashing
========

Applications for the ``CC1352P7 LaunchPad`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).

Here is an example for the :ref:`hello_world` application.

First, run your favorite terminal program to listen for output.

.. code-block:: console
$ screen <tty_device> 115200
Replace :code:`<tty_device>` with the port where the XDS110 application
serial device can be found. For example, :code:`/dev/ttyACM0`.

Then build and flash the application in the usual way.

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: cc1352p7_lp
:goals: build flash

Debugging
=========

You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: cc1352p7_lp
:maybe-skip-config:
:goals: debug

Bootloader
==========

The ROM bootloader on CC13x2x7 and CC26x2x7 devices is enabled by default. The
bootloader will start if there is no valid application image in flash or the
so-called backdoor is enabled (via option
:kconfig:option:`CONFIG_CC13X2_CC26X2_BOOTLOADER_BACKDOOR_ENABLE`) and BTN-1 is held
down during reset. See the bootloader documentation in chapter 10 of the `TI
CC13x2x7 / CC26x2x7 Technical Reference Manual`_ for additional information.

Power Management and UART
=========================

System and device power management are supported on this platform, and
can be enabled via the standard Kconfig options in Zephyr, such as
:kconfig:option:`CONFIG_PM`, :kconfig:option:`CONFIG_PM_DEVICE`.

When system power management is turned on (CONFIG_PM=y),
sleep state 2 (standby mode) is allowed, and polling is used to retrieve input
by calling uart_poll_in(), it is possible for characters to be missed if the
system enters standby mode between calls to uart_poll_in(). This is because
the UART is inactive while the system is in standby mode. The workaround is to
disable sleep state 2 while polling:

.. code-block:: c
pm_policy_state_lock_get(PM_STATE_STANDBY, PM_ALL_SUBSTATES);
<code that calls uart_poll_in() and expects input at any point in time>
pm_policy_state_lock_put(PM_STATE_STANDBY, PM_ALL_SUBSTATES);
References
**********

CC1352P7 LaunchPad Quick Start Guide:
https://www.ti.com/lit/pdf/swru573

.. _TI CC1352P7 LaunchPad Product Page:
https://www.ti.com/tool/LP-CC1352P7

.. _TI CC1352P7 Product Page:
https://www.ti.com/product/CC1352P7

.. _TI CC13x2x7 / CC26x2x7 Technical Reference Manual:
https://www.ti.com/lit/ug/swcu192/swcu192.pdf

.. _XDS-110 emulation package:
http://processors.wiki.ti.com/index.php/XDS_Emulation_Software_Package#XDS_Emulation_Software_.28emupack.29_Download
1 change: 1 addition & 0 deletions boards/ti/cc1352p7_launchpad/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source [find board/ti_cc26x2x7_launchpad.cfg]

0 comments on commit 988e4cf

Please sign in to comment.