boards/ti/cc3235sf_launchxl/doc/index.html · boards/ti/cc3235sf_launchxl/doc/index.rst 공식 원문 ↗

Zephyr 3.7.0 · Boards · TI · Dual-band Wi-Fi

TI CC3235SF LaunchXL

2.4/5GHz Wi-Fi NWP, provisioning과 secure socket offload를 설명합니다.

Official pathboards/ti/cc3235sf_launchxl/doc/index.html
Source fileboards/ti/cc3235sf_launchxl/doc/index.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

지원표 4행과 원문 CMake 경로, SOP·OpenOCD, Fast Connect·certificate 절차를 보존했습니다.

MCU

80MHz Cortex-M4

Bands

2.4 / 5GHz

Wi-Fi

802.11 a/b/g/n

Security

TLS offload

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 8EEDFD89573200524509598EDE25E89C468DA5777E369170049F62EE93DE0E50
.. _cc3235sf_launchxl:

CC3235SF LaunchXL
#################

Overview
********
The SimpleLink Wi-Fi CC3235SF LaunchPad development kit (CC3235SF-LAUNCHXL)
highlights CC3235SF, a single-chip wireless microcontroller (MCU) with
1MB internal flash, 4MB external serial flash, 256KB of RAM, and enhanced
security features. It supports 802.11 a/b/g/n, both 2.4 GHz and 5 GHz.

See the `TI CC3235 Product Page`_ for details.

Features:
=========

* Two separate execution environments: a user application dedicated ARM
  Cortex-M4 MCU and a network processor MCU to run all Wi-Fi and
  internet logical layers
* 40-pin LaunchPad standard leveraging the BoosterPack ecosystem
* On-board accelerometer and temperature sensor
* Two buttons and a RGB LED for user interaction
* UART through USB to PC
* BoosterPack plug-in module for adding graphical displays, audio
  codecs, antenna selection, environmental sensing, and more
* Power from USB for the LaunchPad and optional external BoosterPack
* XDS110-based JTAG emulation with serial port for flash programming

Details on the CC3235SF LaunchXL development board can be found in the
`CC3235SF LaunchPad Dev Kit Hardware User's Guide`_.

Hardware
********

The CC3235SF SoC has two MCUs:

#. Applications MCU - an ARM |reg| Cortex |reg|-M4 Core at 80 MHz, with 256Kb RAM,
   and access to external serial 4MB flash with bootloader and peripheral
   drivers in ROM.

#. Network Coprocessor (NWP) - a dedicated ARM MCU, which completely
   offloads Wi-Fi and internet protocols from the application MCU.

Complete details of the CC3235SF SoC can be found in the `CC3235 TRM`_.

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

Zephyr has been ported to the Applications MCU, with basic peripheral
driver support.

+-----------+------------+-----------------------+
| Interface | Controller | Driver/Component      |
+===========+============+=======================+
| UART      | on-chip    | serial port-interrupt |
+-----------+------------+-----------------------+
| GPIO      | on-chip    | gpio                  |
+-----------+------------+-----------------------+
| I2C       | on-chip    | i2c                   |
+-----------+------------+-----------------------+
| SPI_0     | on-chip    | Wi-Fi host driver     |
+-----------+------------+-----------------------+

.. note::

   For consistency with TI SimpleLink SDK and BoosterPack examples,
   the I2C driver defaults to I2C_BITRATE_FAST mode (400 kHz) bus speed
   on bootup.

The accelerometer, temperature sensors, or other peripherals
accessible through the BoosterPack, are not currently supported.

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

TI officially supports development on the CC3235SF using the TI
`CC32xx SDK`_ on Windows and Linux using TI tools: Code Composer
Studio for debugging and `UniFlash`_ for flashing.

For Windows developers, see the `CC32xx Quick Start Guide`_ for
instructions on installation of tools, and how to flash the board using
UniFlash.

Note that ``zephyr.bin`` produced by the Zephyr SDK may not load via
UniFlash tool.  If encountering difficulties, use the ``zephyr.elf``
file and openocd instead (see below).

The following instructions are geared towards Linux developers who
prefer command line tools to an IDE.

Before flashing and debugging the board, there are a few one-time board
setup steps to follow.

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

#. Download and install the latest version of `UniFlash`_.
#. Jumper SOP[2..0] (J15) to [010], and connect the USB cable to the PC.

   This should result in a new device "Texas Instruments XDS110 Embed
   with CMSIS-DAP" appearing at /dev/ttyACM1 and /dev/ttyACM0.

#. Update the service pack, and place the board in "Development Mode".

   Setting "Development Mode" enables the JTAG interface, necessary
   for subsequent use of OpenOCD and updating XDS110 firmware.

   Follow the instructions in Section 2.4 "Download the Application",
   in the `CC32xx Quick Start Guide`_, except for steps 5 and 6 in
   Section 2.4.1 which select an MCU image.

#. Ensure the XDS-110 emulation firmware 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/``.

#. Switch Jumper SOP[2..0] (J15) back to [001].

   Remove power from the board (disconnect USB cable) before switching jumpers.

#. 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

   If you had previously installed TI OpenOCD, you can simply switch to use
   the one in the Zephyr SDK. If for some reason you wish to continue to use
   your TI OpenOCD installation, you can set the OPENOCD and
   OPENOCD_DEFAULT_PATH variables in
   :zephyr_file:`boards/ti/cc3220sf_launchxl/board.cmake` to point the build
   to the paths of the OpenOCD binary and its scripts, before
   including the common openocd.board.cmake file:

   .. code-block:: cmake

      set(OPENOCD "/usr/local/bin/openocd" CACHE FILEPATH "" FORCE)
      set(OPENOCD_DEFAULT_PATH /usr/local/share/openocd/scripts)
      include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

#. Ensure CONFIG_XIP=y (default) is set.

   This locates the program into flash, and sets CONFIG_CC3235SF_DEBUG=y,
   which prepends a debug header enabling the flash to persist over
   subsequent reboots, bypassing the bootloader flash signature
   verification.

   See Section 21.10 "Debugging Flash User Application Using JTAG" of the
   `CC3235 TRM`_ for details on the secure flash boot process.


Once the above prerequisites are met, applications for the ``_cc3235sf_launchxl``
board can be built, flashed, and debugged with openocd and gdb per the Zephyr
Application Development Primer (see :ref:`build_an_application` and
:ref:`application_run`).

Flashing
========

To build and flash an application, execute the following commands for <my_app>:

.. zephyr-app-commands::
   :zephyr-app: <my_app>
   :board: cc3235sf_launchxl
   :goals: flash

This will load the image into flash.

To see program output from UART0, connect a separate terminal window:

.. code-block:: console

  % screen /dev/ttyACM0 115200 8N1

Then press the reset button (SW1) on the board to run the program.

When using OpenOCD from Zephyr SDK to flash the device, you may notice
the program hangs when starting the network processor on the device, if the
program uses it. There is a known issue with how that version of OpenOCD
resets the network processor. You would need to manually hit the reset button
on the board to properly reset the device after flashing.

Debugging
=========

To debug a previously flashed image, after resetting the board, use the 'debug'
build target:

.. zephyr-app-commands::
   :zephyr-app: <my_app>
   :board: cc3235sf_launchxl
   :maybe-skip-config:
   :goals: debug


Wi-Fi Support
*************

The SimpleLink Host Driver, imported from the SimpleLink SDK, has been ported
to Zephyr, and communicates over a dedicated SPI to the network co-processor.
It is available as a Zephyr Wi-Fi device driver in
:zephyr_file:`drivers/wifi/simplelink`.

Usage:
======

Set :kconfig:option:`CONFIG_WIFI_SIMPLELINK` and :kconfig:option:`CONFIG_WIFI` to ``y``
to enable Wi-Fi.
See :zephyr_file:`samples/net/wifi/boards/cc3235sf_launchxl.conf`.

Provisioning:
=============

SimpleLink provides a few rather sophisticated Wi-Fi provisioning methods.
To keep it simple for Zephyr development and demos, the SimpleLink
"Fast Connect" policy is enabled, with one-shot scanning.
This enables the cc3235sf_launchxl to automatically reconnect to the last
good known access point (AP), without having to restart a scan, and
re-specify the SSID and password.

To connect to an AP, first run the Zephyr Wi-Fi shell sample application,
and connect to a known AP with SSID and password.

See :zephyr:code-sample:`wifi-shell`

Once the connection succeeds, the network co-processor keeps the AP identity in
its persistent memory.  Newly loaded Wi-Fi applications then need not explicitly
execute any Wi-Fi scan or connect operations, until the need to change to a new AP.

Secure Socket Offload
*********************

The SimpleLink Wi-Fi driver provides socket operations to the Zephyr socket
offload point, enabling Zephyr BSD socket API calls to be directed to the
SimpleLink Wi-Fi driver, by setting :kconfig:option:`CONFIG_NET_SOCKETS_OFFLOAD`
to ``y``.

Secure socket (TLS) communication is handled as part of the socket APIs,
and enabled by:

- setting both :kconfig:option:`CONFIG_NET_SOCKETS_SOCKOPT_TLS`
  and :kconfig:option:`CONFIG_TLS_CREDENTIAL_FILENAMES` to ``y``,
- using the TI Uniflash tool to program the required certificates and
  keys to the secure flash filesystem, and enabling the TI Trusted
  Root-Certificate Catalog.

See :zephyr:code-sample:`sockets-http-get` and
:zephyr_file:`samples/net/sockets/http_get/boards/cc3235sf_launchxl.conf` for an
example.

See the document `Simplelink Wi-Fi Certificates Handling`_ for details on
using the TI UniFlash tool for certificate programming.

References
**********

TI SimpleLink MCUs:
    http://www.ti.com/microcontrollers/simplelink-mcus/overview.html

.. _TI CC3235 Product Page:
    http://www.ti.com/product/cc3235SF

.. _CC3235 TRM:
   http://www.ti.com/lit/pdf/swru543

.. _CC3x20/CC3x35 SimpleLink Wi-Fi and IoT Network Processor Programmer's Guide:
   http://www.ti.com/lit/pdf/swru455

.. _CC32xx Quick Start Guide:
   http://dev.ti.com/tirex/content/simplelink_cc32xx_sdk_2_40_01_01/docs/simplelink_mcu_sdk/Quick_Start_Guide.html

.. _UniFlash:
   http://processors.wiki.ti.com/index.php/Category:CCS_UniFlash

.. _CC32xx SDK:
   http://www.ti.com/tool/download/SIMPLELINK-CC32xx-SDK/2.40.01.01

.. _CC3235SF LaunchPad Dev Kit Hardware User's Guide:
   http://www.ti.com/lit/pdf/swru539

..  _XDS-110 emulation package:
   http://processors.wiki.ti.com/index.php/XDS_Emulation_Software_Package#XDS_Emulation_Software_.28emupack.29_Download

..  _Simplelink Wi-Fi Certificates Handling:
   http://www.ti.com/lit/pdf/swpu332

Part 3

한국어 전문 번역

개요

SimpleLink Wi-Fi CC3235SF LaunchPad(CC3235SF-LAUNCHXL)는 internal Flash 1MB, external serial Flash 4MB, RAM 256KB와 enhanced security를 갖춘 single-chip wireless MCU 개발 kit입니다. 802.11 a/b/g/n과 2.4GHz·5GHz를 지원합니다.

주요 기능

  • user application용 Cortex-M4 MCU와 Wi-Fi·Internet logical layer용 network processor MCU의 분리된 실행 환경
  • BoosterPack ecosystem 40-pin LaunchPad
  • on-board accelerometer·temperature sensor
  • user button 2개와 RGB LED
  • PC USB UART
  • display·audio codec·antenna selection·environment sensor용 BoosterPack
  • LaunchPad와 optional external BoosterPack USB power
  • flash programming serial port가 있는 XDS110 JTAG emulation

하드웨어

  1. Application MCU: 80MHz Cortex-M4, RAM 256KB, external serial Flash 4MB 접근, ROM bootloader·peripheral driver
  2. Network Coprocessor(NWP): Wi-Fi와 Internet protocol을 application MCU에서 완전히 offload하는 dedicated Arm MCU

Zephyr 지원 기능

Zephyr는 Application MCU에 포팅되었고 basic peripheral driver를 지원합니다.

InterfaceControllerDriver/Component
UARTon-chipserial port-interrupt
GPIOon-chipgpio
I2Con-chipi2c
SPI_0on-chipWi-Fi host driver

Accelerometer, temperature sensor와 기타 BoosterPack peripheral은 아직 지원되지 않습니다.

프로그래밍과 디버깅

TI는 Windows/Linux에서 CC32xx SDK, Code Composer Studio, UniFlash를 공식 지원합니다. Zephyr SDK의 zephyr.bin이 UniFlash로 load되지 않으면 zephyr.elf와 OpenOCD를 사용합니다. 아래는 Linux command-line 중심 절차입니다.

최초 한 번 수행할 board 설정

  1. 최신 UniFlash를 설치합니다.
  2. SOP[2..0] J15를 [010]에 두고 USB를 연결합니다. Texas Instruments XDS110 Embed with CMSIS-DAP가 /dev/ttyACM1과 /dev/ttyACM0에 나타납니다.
  3. service pack을 update하고 Development Mode로 전환해 JTAG를 enable합니다. Guide section 2.4를 따르되 MCU image를 선택하는 2.4.1의 step 5·6은 제외합니다.
  4. 최신 XDS-110 emulation firmware를 설치합니다. xdsdfu는 <install_dir>/ccs_base/common/uscif/xds110/에 있을 수 있습니다.
  5. 전원을 제거한 뒤 SOP[2..0] J15를 [001]로 되돌립니다.
  6. Zephyr SDK OpenOCD를 설치하고 PATH에 추가합니다.
export PATH=$ZEPHYR_SDK_INSTALL_DIR/sysroots/x86_64-pokysdk-linux/usr/bin/openocd:$PATH

TI OpenOCD를 계속 쓸 경우 OPENOCD와 OPENOCD_DEFAULT_PATH를 board CMake에 설정합니다.

set(OPENOCD "/usr/local/bin/openocd" CACHE FILEPATH "" FORCE)
set(OPENOCD_DEFAULT_PATH /usr/local/share/openocd/scripts)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

기본 CONFIG_XIP=y를 유지합니다. Program을 Flash에 배치하고 CONFIG_CC3235SF_DEBUG=y를 설정해 reboot 후에도 Flash가 유지되도록 debug header를 prepend하고 bootloader signature verification을 우회합니다.

원문은 준비 완료 뒤 board 이름을 _cc3235sf_launchxl처럼 앞에 underscore를 붙여 표기합니다.

Flash

west build -b cc3235sf_launchxl 
west flash

UART0 출력:

% screen /dev/ttyACM0 115200 8N1

SW1 reset button을 누릅니다. Zephyr SDK OpenOCD가 NWP를 reset하는 방식에는 알려진 문제가 있어 network processor 시작 시 멈추면 flash 뒤 board reset을 직접 눌러야 합니다.

Debug

west build -b cc3235sf_launchxl 
west debug

Wi-Fi 지원

SimpleLink SDK에서 가져온 Host Driver는 dedicated SPI로 NWP와 통신하며 drivers/wifi/simplelink의 Zephyr Wi-Fi driver로 제공됩니다. CONFIG_WIFI_SIMPLELINK=y와 CONFIG_WIFI=y를 설정하고 samples/net/wifi/boards/cc3235sf_launchxl.conf를 참조합니다.

Provisioning

Zephyr demo에서는 one-shot scan과 SimpleLink Fast Connect policy를 사용합니다. Wi-Fi shell sample에서 SSID/password로 알려진 AP에 한 번 연결하면 NWP persistent memory가 AP identity를 저장합니다. 이후 application은 다른 AP로 바꾸기 전까지 scan·connect를 다시 실행하지 않아도 됩니다.

Secure socket offload

CONFIG_NET_SOCKETS_OFFLOAD=y로 Zephyr BSD socket API를 SimpleLink driver로 전달합니다. TLS에는 CONFIG_NET_SOCKETS_SOCKOPT_TLS=y와 CONFIG_TLS_CREDENTIAL_FILENAMES=y를 설정하고, UniFlash로 certificate·key를 secure Flash filesystem에 쓰며 TI Trusted Root-Certificate Catalog를 enable합니다. sockets-http-get sample과 samples/net/sockets/http_get/boards/cc3235sf_launchxl.conf를 참조합니다.

참고 자료

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.