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.

CC2652R7: Read device ID of R1 and R7

Part Number: CC2652R7

Hi,

We have both CC2652R1 and CC2652R7 chipsets loaded with host_test BLE binary. How we read the chipset version(R1 or R7) using vendor specific API?

Note: We know, how to read the deviceID using SBL. Need a help with vendor specific or HCI API. 

Tried this and got the reply, not sure how to interpret. 

>>> UTIL_NVRead:             01 81 FE 02 28 01
<<< UTIL_NVRead  Reply: 04 FF 06 7F 06 02 81 FE 00

Thanks

  • Hi,

    Thank you for reaching out.

    I am not sure the approach you have chosen is actually correct. Here, it looks like you are reading the NV ID 0x28 that should corresponds to one of the entries to store the bonds (see here).

    As far as I know, there is no HCI (nor HCI extended) command to read the device ID.

    You could consider using the HCIExt_BuildRevisionCmd to differentiate the two devices - it will take you to set the different initial values for the two devices.

    You could also consider sending the device ID through UART at each device boot.

    I hope these will help,

    Best regards,

  • Thanks Clement.

    I found this from the forum: "The Build Revision can be set and read. However, after power-cycling, this value is reset to '0'. "

    Looks like we need to read from SBL. 

  • Hi,

    Looks like we need to read from SBL. 

    If it is easier, you could consider to slightly modify the host_test example to have a different default value in  the structure buildRev in host_test_app.c

    I'll let you assess which option you prefer.

    Best regards,

  • Thanks Clement, 

    Not sure, we could modify anything here.. 

    typedef struct _ICall_BuildRevision_
    {
    uint32_t stackVersion; //!< stack revision
    uint16_t buildVersion; //!< build revision
    uint8_t stackInfo; //!< stack info
    uint16_t ctrlInfo; //!< controller info
    uint16_t hostInfo; //!< host info
    } ICall_BuildRevision;

    ble_dispatch_lite.c

    #if !defined(STACK_REVISION)
    #define STACK_REVISION 0x010200
    #endif // STACK_REVISION

    extern const uint16 ll_buildRevision;

    *********************************************************************
    * @fn buildRevision
    *
    * @brief Read the Build Revision used to build the BLE stack.
    *
    * @param pBuildRev - pointer to variable to copy build revision into
    *
    * @return SUCCESS: Operation was successfully.
    * INVALIDPARAMETER: Invalid parameter.
    */
    uint8 buildRevision(ICall_BuildRevision *pBuildRev)
    {
    if (pBuildRev!= NULL)
    {
    pBuildRev->stackVersion = (uint32)STACK_REVISION;
    pBuildRev->buildVersion = (uint16)ll_buildRevision;

    // Stack info (Byte 5)
    // Bit 0: IAR used to build stack project (0: no, 1: yes)
    // Bit 1: CCS used to build stack project (0: no, 1: yes)
    // Bits 2-3: Reserved
    // Bit 4: IAR used to build stack library (0: no, 1: yes)
    // Bits 5-6: Reserved
    // Bit 7: ROM build (0: no, 1: yes)
    pBuildRev->stackInfo =
    #if defined(__IAR_SYSTEMS_ICC__)
    BLDREV_STK_IAR_PROJ |
    #endif // __IAR_SYSTEMS_ICC__
    #if defined(__TI_COMPILER_VERSION__)
    BLDREV_STK_CCS_PROJ |
    #endif // __TI_COMPILER_VERSION__
    #if defined(FLASH_ROM_BUILD)
    BLDREV_STK_IAR_LIB |
    BLDREV_STK_ROM_BLD |
    #endif // FLASH_ROM_BUILD
    0;

    // Controller info - part 1 (Byte 6)
    // Bit 0: ADV_NCONN_CFG (0: not included, 1: included)
    // Bit 1: ADV_CONN_CFG (0: not included, 1: included)
    // Bit 2: SCAN_CFG (0: not included, 1: included)
    // Bit 3: INIT_CFG (0: not included, 1: included)
    // Bit 4: PING_CFG (0: not included, 1: included)
    // Bit 5: SLV_FEAT_EXCHG_CFG (0: not included, 1: included)
    // Bit 6: CONN_PARAM_REQ_CFG (0: not included, 1: included)
    // Bit 7: Reserved
    pBuildRev->ctrlInfo =
    #if defined(CTRL_CONFIG)
    CTRL_CONFIG |
    #endif // CTRL_CONFIG
    BLDREV_CTRL_PING_CFG |
    BLDREV_CTRL_SLV_FEAT_EXCHG_CFG |
    BLDREV_CTRL_CONN_PARAM_REQ_CFG |
    0;

    // Host info - part 1 (Byte 8)
    // Bit 0: BROADCASTER_CFG (0: not included, 1: included)
    // Bit 1: OBSERVER_CFG (0: not included, 1: included)
    // Bit 2: PERIPHERAL_CFG (0: not included, 1: included)
    // Bit 3: CENTRAL_CFG (0: not included, 1: included)
    // Bit 4: GAP_BOND_MGR (0: not included, 1: included)
    // Bit 5: L2CAP_CO_CHANNELS (0: not included, 1: included)
    // Bits 6-7: Reserved
    pBuildRev->hostInfo =
    #if defined(HOST_CONFIG)
    HOST_CONFIG |
    #endif // HOST_CONFIG
    #if defined(GAP_BOND_MGR)
    BLDREV_HOST_GAP_BOND_MGR |
    #endif // GAP_BOND_MGR
    #if defined(BLE_V41_FEATURES) && (BLE_V41_FEATURES & L2CAP_COC_CFG)
    BLDREV_HOST_L2CAP_CO_CHANNELS |
    #endif //(BLE_V41_FEATURES & L2CAP_COC_CFG)
    0;

    return (SUCCESS);
    }

    return (INVALIDPARAMETER);
    }