AM243 Guide

Overview

This Getting Started Guide demonstrates how to start evaluating the CC33xx “Thick MAC”. The reference platform contains the AM243x LaunchPad (AM243x-LP) and the CC33xx Lx Base Board. Below are the instructions for building and running the Wi-Fi example (Network Terminal) from the CC33xx MCU package on the reference platform. The MCU package is a plugin that is based on content (such as TI drivers for peripherals, LWIP network stack, FreeRTOS OS adaptation) available in the base SDK (MCU-PLUS-AM243X-SDK). Guidance about porting to other platforms is available through the CC33XX Host-Driver Porting Guide.

Prerequisites

Hardware
Software

Folder Structure of “cc33xx_mcu_package”

  • ccs_projects/ - Projects to build required libraries
    • ble_host_nimble
    • ble_interface
    • lwip
    • wifi_host_driver
    • wifi_interface
    • wifi_platform_cc33xx
  • docs/ - User guides and API references
  • examples/ - Example applications
    • CC3xx_ble_wifi_provisioning
    • CC3xx_thick_mac_network_terminal
  • source/ - Drivers and libraries source code
    • Wi-Fi Stack API is under source/ti/net/wifi_interface
    • cc33xx Driver is under source/ti/drivers/net/wifi
    • NimBLE Stack is under source/third_party/nimble
  • tools/ -
    • programing - contains flash programming (Python) scripts
    • wifi_fw - contains CC33xx .bin files

Setup - Sitara AM243x and CC33xx

For Information on the Sitara LaunchPad please refer to LP-AM243_EVM-SETUP.

To use the CC3301 with Linux you may stack the CC3301 BoosterPack to the Sitara EVM LP-AM243. When connecting make sure to align the 5v and GND of both boards to result in the picture below;

AM243_on_BP-CC3301

The table below shows the header pin interface between the AM243 LaunchPad and the BP-CC3301. For more information on the header pin assignment for the BP-CC3301, please refer to the BP-CC33XX Hardware User’s Guide.

Sitara Pin BP-CC3301 Description
21 P1.21 5V
22 P1.22 GND
3 P1.3 LP-AM243:RX / BP-CC3301: TX
4 P1.4 LP-AM243:TX / BP-CC3301: RX
5 P1.5 nRESET
8 P1.8 WLAN IRQ
7 P1.7 SPI CLK
37 P2.37 BP-CC3301: CTS
38 P2.36 BP-CC3301: RTS
18 P2.18 SPI CS
14 P2.15 SPI PICO
15 P2.14 SPI POCI

Power Connections:

  1. Connect the Sitara to its power supply and to the PC.

    Note

    The Sitara needs a 5V / 3A power supply. When powered correctly, 3 green LEDs will turn on.

  2. When Disconnecting/Connecting the Sitara, always make sure you do it in the following sequence:

    PLUG IN Connect Power (USB-C), then Connect Data (micro USB)
    PLUG OUT Disconnect Data (Micro USB), then Disconnect Power (USB-C)

Import projects and compile in CCS

  1. Go to File->Import
  2. Choose C/C++ -> CCS Projects
  3. Browse… -> <cc33xx_mcu_package>/
  4. Choose all - wifi_host_driver, wifi_platform_cc33xx, wifi_stack_interface, lwip, ble_host_nimble, ble_interface and CC3xxx_network_terminal
  5. First compile the Wi-Fi and BLE projects, then compile the network_terminal application

Program the Flash

Before running the example, the RAM bootloader and CC33xx Firmware need to be programmed to the flash on the AM243. The content of the 3 files can be found under <cc33xx_mcu_package>/tools/wifi_fw.

Note

  1. The image is loaded and executed from the AM243x MSRAM. To save RAM space the binaries are stored in the flash and read during the FW init.

  2. The binaries should be programmed to a pre-defined offset in the flash, as shown below:

    Binary Name Description Location Offset
    <app-name>.appimage Application Image (see 3) under app project output folder 0x00080000
    cc33xx_fw.bin CC33XX Firmware under tools/cc33xx_firmware/ 0x00800000
    cc33xx_2nd_loader.bin RAM Bootloader under tools/cc33xx_firmware/ 0x00900000
  3. The application image programming is optional. The application image can be executed from flash (see run from flash)

  4. After the successful compilation of the application, the binary image (.appimage or .appimage.hs_fs (for secure devices) file, e.g. cc3xxx_network_terminal.appimage) can be found in the Release/ folder inside the project.

Programming Instructions:

  1. Configure the LaunchPad to UART boot according to AM243x UART Boot Mode.

    ../../_images/UARTbootmode.png
  2. If you are using a secure MCU (LP-AM243 PROC1093B or newer) - open the <cc33xx_mcu_package>/tools/secured_programming folder (in a command line window). If you are using an older LP version - move to the <cc33xx_mcu_package>/tools/programming/ folder.

  3. Set up the programmer’s configuration file (if needed, see below)

    In the secured_programming folder, there are 2 configuration files:

    1. only_wifi_fw.cfg - contains just the Firmware binaries
    2. program_application_and_wifi_fw.cfg - contains both the Firmware binaries and the application image.

    By default the program_application_and_wifi_fw.cfg is set to the default locations of the firmware. The location of the application image cc3xxx_network_terminal.appimage.hs_fs will need to be set manually

  4. Run the uart_uniflash.py python script:

    1. In Windows:

      python3 uart_uniflash.py -p COM<XDS uart number> --cfg=<config-file-edited-in-step-3>.cfg
      
    2. In Linux:

      python3 uart_uniflash.py -p /dev/ttyACM<XDS uart number> --cfg=<config-file-edited-in-step-3>.cfg
      

      example:

      python3 uart_uniflash.py -p /dev/ttyACM3 --cfg=only_wifi_fw.cfg
      

Below is a screenshot of a successful execution:

../../_images/IMG-Programming.png

Fig. 3 Successful flash

  1. Exit from UART boot (return the switch pins).

    ../../_images/QSPIbootmode.png

Run the example from flash

When loading the code from flash (make sure to follow step 3.b in the Programing instructions), configure the LP for AM243x QSPI Boot Mode.

  1. Open a serial terminal (see Serial Terminal Configuration).
  2. Pressing the reset button (see platform_figure) on the launchpad will trigger the application.

Serial Terminal Configuration:

COM Port: Listed as Applications/User UART (see note below)
Baud-rate: 115200
Data bits: 8
Stop bits: 1
Parity: None
Flow Control: None

Note

The COM port can be determined via Device Manager in Windows or via ls /dev/tty* in Linux.