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.

CC1352P7: Network start-up process in TI15.4 Non-beacon mode

Part Number: CC1352P7

I have a question regarding to the network start-up process of the collector in Non-beacon mode. From cllc.c, I can not find where the status Cllc_coordStates_scanEdCnf is set.

There is only one call of switchState(Cllc_coordStates_scanEdCnf) in Cllc_startNetwork, but it is in the case of CONFIG_FH_ENABLE = true. A UART printf debug log can also verify the case is never called in Non-beacon mode.

However, the UART log also shows case Cllc_coordStates_scanEdCnf in processState is entered after the active scan confirm is received, which really confused me.

Can you please help locate where the Cllc_coordStates_scanEdCnf is set in the code?

BR,

Shuyang

  • Hi Shuyang,

    In Non-beacon mode the coordinator will perform energy detect scan followed by active scan when starting up the network. See Figure 59 in TI 15.4-Stack User's Guide - Non-Beacon Mode - Network Start-Up

    In the collector example in non-beacon mode, Cllc_startNetwork will switch the state to Cllc_coordStates_scanEnergyDetect (and not Cllc_coordStates_scanEdCnf as you correctly mentioned). This will cause the collector to perform energy detect scan (see Cllc_coordStates_scanEnergyDetect case in processState). After the energy detect scan, the collector will perform an active scan. See the pData->scanType == ApiMac_scantype_energyDetect case in scanCnfCb (this function will be called after the energy detect scan).
    After the active scan, the state will change to Cllc_coordStates_scanActiveCnf (See the pData->scanType == ApiMac_scantype_active case in scanCnfCb)

    The Cllc_coordStates_scanActiveCnf case will be handled in processState. This case falls through to the Cllc_coordStates_scanEdCnf case, which might be why you think that the Cllc_coordStates_scanEdCnf state is being set.
    I can confirm by debugging the collector application that the state is actually Cllc_coordStates_scanActiveCnf and not Cllc_coordStates_scanEdCnf.

    Regards,
    Nikolaj

  • Hi Nikolaj,

    Thanks very much! I didn't realize the switch case will fall through to the next case, I guess I need to retake my C-language classLaughing

    Best regards,

    Shuyang