This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/LAUNCHXL-CC1352P: Porting RTLS project for CC26X2R1 to CC1352P

Part Number: LAUNCHXL-CC1352P
Other Parts Discussed in Thread: CC1352P

Tool/software: Code Composer Studio

Hi there, as previous post, I'm porting RTLS project for CC26X2R1 to CC1352P.

First, I was changing the project properties and codes as below:
================================================================================================

  • Hardware (BOOSTXL-AOA) jump for rtls_passive
    • BOOSTXL-AOA | LAUNCHXL-CC1352P-2
      ————————————————————
      DIO27 (Ax)         | DIO24
      DIO28 (Ax.1)      | DIO25
      DIO29 (Ax.2)      | DIO26
      DIO30 (Ax.3)      | DIO27
  • Project properties (rtls_master, rtls_slave, rtls_passive)
    • General
      • Project
        • Device -> Variant: CC1352P1F3
        • Tool-chain -> Linker command file: cc13x2_cc26x2_app.cmd
      • Products
        • Target: ti.targets.arm.elf.M4F
        • Platform: ti.platforms.simplelink:CC1352P1F3
    • Build
      • ARM Compiler
        • Predefined Symbols(DeviceFamily): DeviceFamily_CC13X2
      • ARM Linker
        • File Search Path (changed path)
          • ${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/ble5stack/libraries/cc1352p/OneLib_coc.a (master, slave)
          • ${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/ble5stack/libraries/cc1352p/StackWrapper_coc.a (master, slave)
          • ${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/ble5stack/libraries/cc1352p/ble_r2_coc.symbols (master, slave)
          • ${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/drivers/rf/lib/rf_multiMode_cc13x2.aem4f (master, slave, passive)
          • ${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/drivers/lib/drivers_cc13x2.aem4f (master, slave, passive)
          • ${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/kernel/tirtos/packages/ti/dpl/lib/dpl_cc13x2.aem4f (master, slave, passive)
  • Code changed
    • /Tools/Defines/rtls_xxxxx_app.opt (master, slave, passive)
      • Pre-define
        • -DCC13X2P
        • -DCC13X2P_2_LAUNCHXL
        • -DCC13XX
        • -DDeviceFamily_CC13X2
    • /Drivers/AOA/AOA.h (master, slave, passive)
      • line 91: #define ANT_ARRAY (24)
      • line 92: #define ANT1             (25)
      • line 93: #define ANT2             (26)
      • line 94: #define ANT3             (27)
    • /Drivers/TOF/TOF.c  (master, slave, passive)
      • line 41: #if defined(CC26X2) || defined(CC13X2P) 
      • line 64: #if defined(CC26X2) || defined(CC13X2P)
      • line 82: #if defined(CC26XX) || defined(CC13XX)
      • line 141: #elif defined(CC26X2) || defined(CC13X2P)
      • line 459: #if defined(CC26X2) || defined(CC13X2P)
    • /Startup/urfc.h (passive)
      • line 254: #if defined(CC13X2) --> Original code has a typo ')' is missed.
    • /Startup/urfc.c (passive)
      • line 89: #if defined(CC26XX_R2) || defined(CC26X2) || defined(CC13X2P)
      • line 105: #if defined(CC26XX) || defined(CC13XX)
      • line 107: #if defined(CC26X2) || defined(CC13X2P)
      • line 122: #define ANT1         (1<<25)
      • line 123: #define ANT2         (1<<26)
      • line 124: #define ANT3         (1<<27)
      • line 371: {TX_POWER_20_DBM, RF_TxPowerTable_HighPAEntry(56, 2, 1, 45, 63) } }; // 0x803F5BB8
        --> Original code has a typo, one more '};', it does mean the '{', '}' is not pair. So it removed.

================================================================================================


After complete all of above things, CC1352P cannot find any devices even if "RTLS_CMD_SCAN" is success (When turn on AoA and ToF).

But, CC1352P-2 Board can find slave device and is working with "AoA" when turn off "ToF" by removing below red colored codes:

  • /Master project/main.c
    • rtlsConfig.rtlsCapab = (rtlsCapabilities_e)(RTLS_CAP_RTLS_MASTER | RTLS_CAP_TOF_MASTER | RTLS_CAP_AOA_RX);
  • /Slave project/main.c
    • rtlsConfig.rtlsCapab = (rtlsCapabilities_e)(RTLS_CAP_RTLS_SLAVE | RTLS_CAP_TOF_SLAVE | RTLS_CAP_AOA_TX);
  • /Passive project/main.c
    • rtlsConfig.rtlsCapab = (rtlsCapabilities_e)(RTLS_CAP_RTLS_PASSIVE | RTLS_CAP_CM | RTLS_CAP_TOF_PASSIVE | RTLS_CAP_AOA_RX);

As a result, I find that the pOverrides_2M[] code is for CMD_RADIO_SETUP affect the operation and the pOverrides_2M[] for CC26X2 is not compatible with OneLib_coc.a for CC13X2P.

So, the below lists are what I request:

  1. The pOverrides_2M and pOverridesCommon codes for CC13X2P, the codes are in TOF.c and urfc.c (for passive).
  2. The urfc.c won't toggle the GPIO for Ax (DIO 24 is based on CC1352P and is jumped to DIO27 of BOOSTXL-AoA), can you provide any information about this?
    EDITED As shown as below, Figure 1. shows the Ax (DIO 27) GPIO is switched correctly.
    But, in Figure 2., Ax (DIO 24) is not switched and I think Ax.3 (DIO 27) is switched instead Ax (DIO 24)...
    I was trying to find where am I have to modify the code to switch Ax (DIO 24) instead of Ax.3 (DIO27).
    Unfortunately, I can't find it.


    Figure 1. The GPIO(DIO27 ~ DIO30 number is based the LAUNCHXL board) toggle status of CC26X2R1-LAUNCHXL with BOOSTXL-AoA



    Figure 2. The GPIO(DIO24 ~ DIO27 number is based the LAUNCHXL board) toggle status of CC1352P-LAUNCHXL with BOOSTXL-AoA

Best regards,
Inseob

  • Hi Inseob,

    Assigning an expert to review this thread. 

  • Report the current situation.

    Temporary, I determined to use the DIO 27 for Ax pin in CC1352P instead of DIO 24.
    Resultingly, the gpio jumped and modified codes as below:

    • BOOSTXL-AOA | LAUNCHXL-CC1352P-2
      ————————————————————
      DIO27 (Ax)         | DIO27
      DIO28 (Ax.1)      | DIO24
      DIO29 (Ax.2)      | DIO25
      DIO30 (Ax.3)      | DIO26
    • /Drivers/AOA/AOA.h (master, slave, passive)
      • line 91: #define ANT_ARRAY (27)
      • line 92: #define ANT1             (24)
      • line 93: #define ANT2             (25)
      • line 94: #define ANT3             (26)

    • /Startup/urfc.c (passive)
      • line 122: #define ANT1         (1<<24)
      • line 123: #define ANT2         (1<<25)
      • line 124: #define ANT3         (1<<26)

      After apply the changes, CC1352P devices can scan and connect each device.
      And AoA is working correctly when ToF is disabled in CC1352P.
      But, when ToF is enabled, ToF does not proceed any further after RTLS_CMD_TOF_ENABLE.


      Figure 3. The freezed progress of ToF in CC1352P-2.

      Device Time Identifier Message Type Subsystem Command Payload
      Host
      18:28:24
      {"control": {"req": "LIST_DEVICES"
      "devices": [{"name": "/dev/cu.usbmodemL43001C81" "port": "/dev/cu.usbmodemL43001C81" "identifier": "80:6F:B0:29:6B:8D" "caps": ["AOA_RX" "TOF_MASTER", "RTLS_MASTER"]}, {"name": "/dev/cu.usbmodemL430013O1",   "port": "/dev/cu.usbmodemL430013O1", "identifier": "80:6F:B0:29:6D:F9",   "caps": ["CM",   "AOA_RX", "TOF_PASSIVE", "RTLS_PASSIVE"]}]}}
      Master
      18:28:25
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_TERMINATE_LINK" "payload": {"raw_payload": "00"}}}
      Master
      18:28:25
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "AsyncReq" "subsystem": "RTLS" "command": "RTLS_EVT_DEBUG" "payload": {"debug_value": 65535,   "debug_string": "Connection Handle invalid"}}}
      Passive
      18:28:25
      {"identifier": "80:6F:B0:29:6D:F9"
      "message": {"originator": "Nwp" "type": "AsyncReq" "subsystem": "RTLS" "command": "RTLS_CMD_RESET_DEVICE" "payload": {"raw_payload": ""}}}
      Master
      18:28:25
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "AsyncReq" "subsystem": "RTLS" "command": "RTLS_CMD_RESET_DEVICE" "payload": {"raw_payload": ""}}}
      Master
      18:28:27
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_SCAN" "payload": {"status": "RTLS_SUCCESS"}}}
      Master
      18:28:27
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "AsyncReq" "subsystem": "RTLS" "command": "RTLS_CMD_SCAN" "payload": {"eventType": 19, "addrType": 0, "addr": "80:6F:B0:29:69:BF",   "rssi": -36,   "dataLen": 14,   "data": "0A:08:52:54:4C:53:53:6C:61:76:65:02:01:06"}}}
      Master
      18:28:29
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "AsyncReq" "subsystem": "RTLS" "command": "RTLS_CMD_SCAN_STOP" "payload": {"status": "RTLS_SUCCESS"}}}
      Master
      18:28:30
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_CONNECT" "payload": {"status": "RTLS_SUCCESS"}}}
      Master
      18:28:30
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "AsyncReq" "subsystem": "RTLS" "command": "RTLS_CMD_CONN_PARAMS" "payload": {"accessAddress": 1001571124,   "connInterval": 160,   "hopValue": 5,   "mSCA": 0,   "currChan": 5,   "chanMap": [255, 255, 255, 255, 31], "crcInit":10518911}}}
      Passive
      18:28:30
      {"identifier": "80:6F:B0:29:6D:F9"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_CONN_PARAMS" "payload": {"status": "RTLS_SUCCESS"}}}
      Passive
      18:28:31
      {"identifier": "80:6F:B0:29:6D:F9"
      "message": {"originator": "Nwp" "type": "AsyncReq" "subsystem": "RTLS" "command": "RTLS_CMD_CONNECT" "payload": {"status": "RTLS_SUCCESS"}}}
      Master
      18:28:31
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "AsyncReq" "subsystem": "RTLS" "command": "RTLS_CMD_CONNECT" "payload": {"status": "RTLS_SUCCESS"}}}
      Passive
      18:28:31
      {"identifier": "80:6F:B0:29:6D:F9"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_AOA_SET_PARAMS" "payload": {"status": "RTLS_SUCCESS"}}}
      Passive
      18:28:31
      {"identifier": "80:6F:B0:29:6D:F9"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_TOF_SET_PARAMS" "payload": {"status": "RTLS_SUCCESS"}}}
      Master
      18:28:31
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_AOA_SET_PARAMS" "payload": {"status": "RTLS_SUCCESS"}}}
      Master
      18:28:31
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_TOF_SET_PARAMS" "payload": {"status": "RTLS_SUCCESS"}}}
      Passive
      18:28:31
      {"identifier": "80:6F:B0:29:6D:F9"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_AOA_ENABLE" "payload": {"status": "RTLS_SUCCESS"}}}
      Master
      18:28:32
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_AOA_ENABLE" "payload": {"status": "RTLS_SUCCESS"}}}
      Master
      18:28:32
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_TOF_GET_SEC_SEED" "payload": {"seed": "FC:2B:86:63:CB:F8:1A:21:CD:12:E1:5B:06:D3:00:9B:55:B9:DF:AD:9B:36:70:A4:32:90:A8:84:1D:44:E4:7C"}}}
      Passive
      18:28:32
      {"identifier": "80:6F:B0:29:6D:F9"
      "message": {"originator": "Nwp" "type": "AsyncReq" "subsystem": "RTLS" "command": "RTLS_CMD_AOA_RESULT_ANGLE" "payload": {"angle": -1, "rssi": -50, "antenna": 2, "channel": 31}}}
      Passive
      18:28:32
      {"identifier": "80:6F:B0:29:6D:F9"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_TOF_SET_SEC_SEED" "payload": {"status": "RTLS_SUCCESS"}}}
      Passive
      18:28:32
      {"identifier": "80:6F:B0:29:6D:F9"
      "message": {"originator": "Nwp" "type": "AsyncReq" "subsystem": "RTLS" "command": "RTLS_CMD_AOA_RESULT_ANGLE" "payload": {"angle": -2, "rssi": -52, "antenna": 2, "channel": 4}}}
      Passive
      18:28:32
      {"identifier": "80:6F:B0:29:6D:F9"
      "message": {"originator": "Nwp" "type": "AsyncReq" "subsystem": "RTLS" "command": "RTLS_CMD_AOA_RESULT_ANGLE" "payload": {"angle": -4, "rssi": -47, "antenna": 2, "channel": 14}}}
      Passive
      18:28:32
      {"identifier": "80:6F:B0:29:6D:F9"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_TOF_CALIBRATE" "payload": {"status": "RTLS_SUCCESS"}}}
      Passive
      18:28:32
      {"identifier": "80:6F:B0:29:6D:F9"
      "message": {"originator": "Nwp" "type": "AsyncReq" "subsystem": "RTLS" "command": "RTLS_CMD_AOA_RESULT_ANGLE" "payload": {"angle": -6, "rssi": -48, "antenna": 2, "channel": 24}}}
      Master
      18:28:32
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_TOF_CALIBRATE" "payload": {"status": "RTLS_SUCCESS"}}}
      Passive
      18:28:33
      {"identifier": "80:6F:B0:29:6D:F9"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_TOF_ENABLE" "payload": {"status": "RTLS_SUCCESS"}}}
      Passive
      18:28:33
      {"identifier": "80:6F:B0:29:6D:F9"
      "message": {"originator": "Nwp" "type": "AsyncReq" "subsystem": "RTLS" "command": "RTLS_CMD_AOA_RESULT_ANGLE" "payload": {"angle": -7, "rssi": -50, "antenna": 2, "channel": 34}}}
      Master
      18:28:33
      {"identifier": "80:6F:B0:29:6B:8D"
      "message": {"originator": "Nwp" "type": "SyncRsp" "subsystem": "RTLS" "command": "RTLS_CMD_TOF_ENABLE" "payload": {"status": "RTLS_SUCCESS"}}}

      Table 1. RTLS Monitor Logs

      In this circumstances, I would like to get the information the following lists.

      1. The way to change DIO 27 pin for "Ax".
        I think pOverridesCommon in urfc.c (passive) is involved in this.
        (line 142: 0xC0040341, // Pointer to antenna switching table in next entry)
      2. pOverrides_2M codes for CC13X2P in TOF.c
      3. How to fix the freezing problem of ToF?
        The ToF cannot process "RTLS_CMD_TOF_CALIBRATE", after enable ToF.
        CC2652 is process the ToF sequence as below:
        Master  "type": "SyncRsp"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_GET_SEC_SEED"  "payload": {"seed": "CF:25:B3:DB:A1:62:33:FB:47:2A:E6:F6:83:8A:A5:EF:C7:F1:67:EE:39:81:B9:B4:84:5E:5A:E0:57:6E:AC:7B"}}}
        Passive  "type": "SyncRsp"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_SET_SEC_SEED"  "payload": {"status": "RTLS_SUCCESS"}}}
        Passive  "type": "SyncRsp"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_CALIBRATE"  "payload": {"status": "RTLS_SUCCESS"}}}
        Master  "type": "SyncRsp"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_CALIBRATE"  "payload": {"status": "RTLS_SUCCESS"}}}
        Passive  "type": "SyncRsp"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_ENABLE"  "payload": {"status": "RTLS_SUCCESS"}}}
        Master  "type": "SyncRsp"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_ENABLE"  "payload": {"status": "RTLS_SUCCESS"}}}
        Passive  "type": "AsyncReq"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_CALIBRATE"  "payload": {"calibVals": [{"freq": 2408 "tick": 524.2448181152344 "tickVariance": 0.5265231013298035 "rssi": -49 "numOk": 31} {"freq": 2412 "tick": 524.2315368652344 "tickVariance": 0.5429900169372559 "rssi": -49 "numOk": 29} {"freq": 2418 "tick": 524.2874877929687 "tickVariance": 0.4573494166135788 "rssi": -49 "numOk": 32} {"freq": 2424 "tick": 524.1654235839844 "tickVariance": 0.6796158850193024 "rssi": -49 "numOk": 30}]}}}
        Passive  "type": "AsyncReq"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_RESULT_DIST"  "payload": {"distance": 0.7031402587886362 "rssi": -48}}}
        Passive  "type": "AsyncReq"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_RESULT_DIST"  "payload": {"distance": 0.45285797119129967 "rssi": -49}}}
        Master  "type": "SyncRsp"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_CALIBRATE"  "payload": {"status": "RTLS_SUCCESS"}}}
        Master  "type": "AsyncReq"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_CALIBRATE"  "payload": {"calibVals": [{"freq": 0 "tick": 0.0 "tickVariance": 0.0 "rssi": -34 "numOk": 0} {"freq": 0 "tick": 0.0 "tickVariance": 0.0 "rssi": -34 "numOk": 0} {"freq": 0 "tick": 0.0 "tickVariance": 0.0 "rssi": -34 "numOk": 0} {"freq": 0 "tick": 0.0 "tickVariance": 0.0 "rssi": -34 "numOk": 0}]}}}
        Passive  "type": "AsyncReq"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_RESULT_DIST"  "payload": {"distance": -0.6928958892826529 "rssi": -48}}}

        But, the CC1352P is process only ToF enable as below:

        Master  "type": "SyncRsp"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_GET_SEC_SEED"  "payload": {"seed": "C6:5C:24:9D:67:3E:D9:DF:CE:31:66:7C:3A:CE:94:38:EF:F7:68:7C:CF:E9:9C:4A:B6:BD:68:D2:61:B3:99:CE"}}}
        Passive  "type": "SyncRsp"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_SET_SEC_SEED"  "payload": {"status": "RTLS_SUCCESS"}}}
        Passive  "type": "SyncRsp"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_CALIBRATE"  "payload": {"status": "RTLS_SUCCESS"}}}
        Master  "type": "SyncRsp"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_CALIBRATE"  "payload": {"status": "RTLS_SUCCESS"}}}
        Passive  "type": "SyncRsp"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_ENABLE"  "payload": {"status": "RTLS_SUCCESS"}}}
        Master  "type": "SyncRsp"  "subsystem": "RTLS"  "command": "RTLS_CMD_TOF_ENABLE"  "payload": {"status": "RTLS_SUCCESS"}}}

      4. A guidance to set tx power 20 dbm to rtls projects.

      Best regards,
      Inseob

    • Hi Kim,

      1-      One remark about the Ax pin: this pin basically enables the first or the second antennas-array. This pin is not directly handles by the radio (contrary to the regular antennas pins) but is basically toggled after each connection event. The application is responsible to do this toggling: this is why this pin is not involved in the overrides.

      Maybe obvious but, the radio doesn’t know if it is working with one or the other antennas-array: only the application knows.

      In summary: nothing to change in urfc.c. Just verify that this pin is not hard coded in the application (especially in AOA_setupNextRun()).

       

      2-      In a general way, the overrides can be found using Smart RF Studio. I would encourage you to have a look at it.

       

      3-      Regarding the problem of the freezing calibration.

      Once again, maybe an obvious comment, but ToF “filters” the incoming samples and discard the ones above a certain threshold (this to eliminate the packets which have been reflected). As you are not using exactly the same device and the same settings as in the out-of-the-box example, maybe this threshold is not any longer accurate and should be modify (however, before you modify it, you should basically try to run the calibration with a slightly longer distance between the devices).

       

      4-      Tx Power can be changed using HCI_EXT_SetTxPowerCmd().

       

      Regards,