微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI蓝牙设计交流 > cc2650 4x4封装IAR+XDS100V3仿真问题

cc2650 4x4封装IAR+XDS100V3仿真问题

时间:10-02 整理:3721RD 点击:

相同程序,有时候仿真没问题,有时候会进入到EasyLink_init函数中出不来。跟进去发现主要是memcpy和RF_runCmd(设置频点时)两函数,无法继续运行。不知道大家有没有碰到过,不知道啥时就好了,软硬件都没动啊!

不论是什么封装,和仿真是没有关系的,都是那几根线,主要注意的是board.c文件的调整,说明如下:

file:///C:/ti/simplelink_cc2640r2_sdk_1_35_00_33/docs/blestack/ble_sw_dev_guide/html/ble-stack/index.html?highlight=4x4

Package Type and Board Files

Most of the examples within the SimpleLink CC2640R2 SDK will run on the CC2640R2 Launchpad out of the box. Board files based on the TI CC26xx evaluation module (EM) reference designs are also provided for your convenience. (See TI Provided Board Files for more info) However, for custom hardware designs it may be necessary to modify the provided board files based on your selected package and RF configuration.

The board file for CC2640R2_LAUNCHXL is made for the 7x7 mm QFN package using differential RF front end and internal biasing. To convert this board file to use for other smaller device packages (5x5 mm and 4x4 mm QFN), the board file will need to be modified since limited number of IO pins are available in the smaller packages.

Note

It is recommended to start customizing board file(s) based on a reference design that is most similar to your selected package type and RF configuration. For example a design for a 5x5 mm QFN package with a differential front end and external bias should use the CC2640R2DK_5XD board files as a reference.

Refer to the datasheet for all the package options and IO descriptions: CC2640R2 Datasheet

For example, to change to the 4x4 package, remove all defines for all IOs not available (IOID_10 and higher) since the 4x4 package has only 10 DIO pins as listed in the datasheet.

The table below shows the number of GPIOs supported by each package:

Package OptionTotal GPIO PinsMAX IOID
7x7 mm QFN 31 IOID_30
5x5 mm QFN 15 IOID_14
4x4 mm QFN 10 IOID_9
2.7 x 2.7 mm WCSP 14 IOID_13

Creating a Custom Board File

TI-RTOS drivers rely on “board files” for their board-specific configuration parameters. The convention is to name these files based on the development kits provided by TI in addition to a generic Board.h with Board_* definitions to map the proper pins defined by ioc.h.

For example, for the simple_peripheral project, the following comprise the set of board files used by the CC2640R2 LaunchPad development kit:

Board.h CC2640R2_LAUNCHXL.h CC2640R2_LAUNCHXL.c

Note

simple_peripheral board files are located in <SDK_INSTALL_DIR>\source\ti\boards\CC2640R2_LAUNCHXL

TI recommends to start with these existing set of board files when porting a BLE application to custom development boards. When modifying or porting these board files, user should consult with TI Driver APIs.

Tip

Board files provided by TI include TI-RTOS driver configuration data structures for various drivers. If the application does not use the associated TI-RTOS drivers, the linker will simply omit them from the application image.

The following steps provide guidance on customizing board files for a BLE-Stack 3.00.01 project.

  1. Duplicate existing board files from existing CC2640R2_LAUNCHXL board files.

    • These files can be found at: <SDK_INSTALL_DIR>\source\ti\boards\CC2640R2_LAUNCHXL
    • Create a copy of the CC2640R2_LAUNCHXL directory and give it a unique meaningful name for your development platform. In this example, we call it MYBOARD.

    Caution

    The SimpleLink CC2640R2 SDK also contains board files for TI-RTOS kernel and driver examples. These are not compatible with the BLE-Stack 3.00.01 because of differences in RF driver SWI priorities and custom drivers (e.g. TRNG) required by the BLE-Stack. For BLE-Stack 3.00.01 projects, use the files specified above for reference from simple_peripheral.

    • In the MYBOARD directory, rename CC2640R2_LAUNCHXL.c and CC2640R2_LAUNCHXL.h to their MYBOARD.c and MYBOARD.hrespectively.
    • Search and replace all references of CC2640R2_LAUNCHXL with MYBOARD in Board.hMYBOARD.c and MYBOARD.h.

  2. Add a new preprocessor define in your project’s board.c and board.h files.

    Continuing with the MYBOARD example, modify board.c and board.h in <SDK_INSTALL_DIR>\source\ti\target

    • Replace CC2640R2_LAUNCHXL by MYBOARD in your project’s application predefined symbols (See Accessing Preprocessor Symbols or Accessing Preprocessor Symbols)

    • In board.h, add the highlighted lines shown below:

      1
      2
      3
      4

      #elif defined(CC2640R2_LAUNCHXL)
          #include "./cc2640r2lp/cc2640r2lp_board.h"
      #elif defined(MYBOARD)  #include "../../boards/MYBOARD/MYBOARD.h" 

    • In board.c, add the highlighted lines shown below:

      1
      2
      3
      4
      5

      #elif defined(CC2640R2_LAUNCHXL)
          #include "./cc2640r2lp/cc2640r2lp_board.c"
      #elif defined(MYBOARD)  #include "../../boards/MYBOARD/Board.h"  #include "../../boards/MYBOARD/MYBOARD.c" 

    • Explicit references to CC2640R2_LAUNCHXL.h need to be replaced by MYBOARD.h

  3. Modify board files to match application requirements

    • PIN structure to match the layout of the board. See Package Type and Board Files.
    • Add peripheral driver initialization objects according to the board design. See Drivers for more information on drivers.
    • For RF driver configuration, see Configuring the RF Front-End for Custom Hardware

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top