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.

CC2640R2F: Device is advertising but RF_State is off (RF_CoreStatusIdle)

Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2640,

Hello TI Support,

Could you please help me understand, how this works:

 

extern RF_Handle    urfiHandle;

bool get_rf_stat()
{
    RF_InfoVal info;

    RF_getInfo(urfiHandle, RF_GET_RADIO_STATE, &info);

    /* If radio is active, we can change TX Power right now */
    Log_info1("RF State: %d", info.bRadioState);
}

the above code I have it in a loop with a delay to print the RadioState like once per second, the bRadioState can be only seen once with value "1" then it is always "0" although i can scan, find and connect to the cc2640 from other devices.

and if this is not the right way to get the status of the RFCore then what is the rightway ?

Device: CC2640R2F
SDK Version: simplelink_cc2640r2_sdk_5_30_00_03

Thanks,
Mohamed

  • Hi Mohamed,

    Thank you for reaching out.

    Could you please provide more insights on the information you are trying to retrieve with this code?

    Also, can you confirm you are using the BLEStack here?

    Best regards,

  • Stack used: BLEStack 4.2 not BLEStack5

    I'm trying to get the status of RFCore because i have a problem where GAPRole STATE=2 but i can't find the device. so looks like Main CPU and RF CPU got out-of-sync somehow.

  • Hi Mohamed,

    The RF driver should not be accessed while the BLEStack (or BLE5Stack) is being used.

    I would recommend to review the Debugging Guide to identify your issue. You can also consider sharing the steps to reproduce your issue so some experts can provide some guidance.

    Best regards,

  • Hi Clément,

    Thanks for providing the debugging page, but unfortunately that didn't help.

    I want to know what is the right way to check the status of the RF Core ? how can I know that it didn't crash or it is active and advertising and working in-sync with Host ?

  • Hi Mohamed,

    The best way to know whether the RF Core is advertising is to enable the RF debug signals (see https://software-dl.ti.com/simplelink/esd/simplelink_cc2640r2_sdk/5.30.00.03/exports/docs/blestack/ble_user_guide/html/ble-stack-3.x-guide/debugging-index.html#debugging-rf-output). In addition to the RF signals, you can consider toggling some GPIOs at the application level so you can ensure the status of the RF Core (advertising / non advertising, in a connection, etc.) matches the status you have at the application level.

    If the RF Core happens to crash, the error is transferred to the application by the BLEStack through the event HCI_BLE_HARDWARE_ERROR_EVENT_CODE.

    I hope this will help,

    Best regards,

  • I checked the debugging RF output section and there is no activity :/

    What i still want to know is How Application can really make sure that RF Core is active and transmitting ? in a case like that GAPRole state is not enough.

  • Hi,

    Sorry to read there is no RF activity there :/
    I would recommend to check the same on the unmodified project so you ensure there is no other things going on.

    When it comes to the question about application checking on RF activity - The application can be notified of the advertising events and connection events respectively using HCI_EXT_AdvEventNoticeCmd and GAP_RegisterConnEventCb.

    I hope this will help,

    Best regards,

  • I couldn't get any extra events after registering to  HCI_EXT_AdvEventNoticeCmd and GAP_RegisterConnEventCb.

    Also, The RFCore doesn't reboot until i power cycle the chip, so reflashing or Switch between BootROM/Application doesn't make the chip advertising again. the only way is to power cycle.

  • Hi,

    If the RF Core is crashed then reading its status won't help much - I mean, no status will be provided so you won't have much to debug.

    A few other elements you may want to try:

    - check the radio registers (see https://www.ti.com/lit/swcu117 §23.8.1. and §23.8.3) - I recommend you leverage CCS register viewer for this

    - if not already done, add the RF driver to your project and monitor the variables and functions calls you want

    Best regards,

  • Sorry, marked your reply as answer.

    about RF_ functions, is there any constraints ? since the stack is already initialized during application startup in main.c .

    What i understand is i need to do RF_open then use the returned handle with the other RF_ functions. 

  • Hi,

    What i understand is i need to do RF_open then use the returned handle with the other RF_ functions

    You should not do this as it is going to broken everything if you call RF_open().

    The suggestion was rather to have a look at the data structures used by the RF driver instance used by the BLE stack.

    Regards,

  • I tried to do the following:

    extern RF_Handle rfHandle;   //<-- Should be already initialized by the BLE Stack
    
    void Loopback(UArg a0, UArg a1)
    {
        if ((count % 20)==0)
        {
            RF_getInfo(rfHandle, RF_GET_RADIO_STATE, &info);
            Log_info4("RF Info: State: %d, AvailRatCh: %d, handle: %p, phySwitchingTime: %d us\n",
                                                            info.bRadioState,
                                                            info.availRatCh,
                                                            info.pClientList[0],
                                                            info.phySwitchingTimeInUs[0]);
        }
    }

    But this doesn't seem to report the correct status.

    What i always get is:

    INFO: (solo_ble_loopback.c:489) RF Info: State: 0, AvailRatCh: 48640, handle: @bebebe00, phySwitchingTime: -1094795776 us
    INFO: (solo_ble_loopback.c:489) RF Info: State: 0, AvailRatCh: 48640, handle: @bebebe00, phySwitchingTime: -1094795776 us
    INFO: (solo_ble_loopback.c:489) RF Info: State: 0, AvailRatCh: 48640, handle: @bebebe00, phySwitchingTime: -1094795776 us
    INFO: (solo_ble_loopback.c:489) RF Info: State: 0, AvailRatCh: 48640, handle: @bebebe00, phySwitchingTime: -1094795776 us
    INFO: (solo_ble_loopback.c:489) RF Info: State: 0, AvailRatCh: 48640, handle: @bebebe00, phySwitchingTime: -1094795776 us
    INFO: (solo_ble_loopback.c:489) RF Info: State: 0, AvailRatCh: 48640, handle: @bebebe00, phySwitchingTime: -1094795776 us

    So what is the right way to use the RF Driver while the stack is up ?

    My Application is based on top of simple_np example.

  • Hi,

    The simple_np example exposes the RF driver. You can leverage the RFCC26XX_singleMode.c file to collect the information you want:

    Regards,

  • Added a print to the RF state machine and found that it keeps PowerUp/Down non-stop

    #000023 [ 10.714 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000024 [ 10.714 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000025 [ 10.923 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000026 [ 10.926 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000027 [ 10.926 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000028 [ 11.144 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000029 [ 11.147 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000030 [ 11.147 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000031 [ 11.357 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000032 [ 11.360 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000033 [ 11.360 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000034 [ 11.575 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000035 [ 11.578 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000036 [ 11.578 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000037 [ 11.787 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000038 [ 11.789 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000039 [ 11.789 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000040 [ 12.005 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000041 [ 12.008 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000042 [ 12.008 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000043 [ 12.224 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000044 [ 12.227 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000045 [ 12.227 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000046 [ 12.439 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000047 [ 12.442 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000048 [ 12.442 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000049 [ 12.654 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000050 [ 12.656 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000051 [ 12.656 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000052 [ 12.875 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000053 [ 12.878 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000054 [ 12.878 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000055 [ 13.090 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000056 [ 13.093 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000057 [ 13.093 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000058 [ 13.309 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000059 [ 13.312 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000060 [ 13.312 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000061 [ 13.525 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000062 [ 13.527 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000063 [ 13.527 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000064 [ 13.745 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000065 [ 13.748 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000066 [ 13.748 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000067 [ 13.966 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000068 [ 13.969 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000069 [ 13.969 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000070 [ 14.178 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000071 [ 14.181 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000072 [ 14.181 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000073 [ 14.393 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000074 [ 14.395 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000075 [ 14.395 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000076 [ 14.612 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000077 [ 14.615 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000078 [ 14.615 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000079 [ 14.615 ] INFO: (solo_ble_loopback.c:430) totalSize 5728 totalFreeSize 1992 largestFreeSize 1864
    #000080 [ 14.829 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000081 [ 14.832 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000082 [ 14.832 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000083 [ 15.048 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000084 [ 15.051 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000085 [ 15.051 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000086 [ 15.261 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000087 [ 15.263 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000088 [ 15.263 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000089 [ 15.476 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000090 [ 15.479 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000091 [ 15.479 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000092 [ 15.692 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000093 [ 15.695 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000094 [ 15.695 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000095 [ 15.906 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000096 [ 15.909 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000097 [ 15.909 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000098 [ 16.124 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000099 [ 16.126 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000100 [ 16.126 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000101 [ 16.339 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000102 [ 16.342 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000103 [ 16.342 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000104 [ 16.550 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000105 [ 16.553 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000106 [ 16.553 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000107 [ 16.764 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000108 [ 16.767 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000109 [ 16.767 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000110 [ 16.976 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000111 [ 16.979 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000112 [ 16.979 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000113 [ 17.191 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000114 [ 17.194 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000115 [ 17.194 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000116 [ 17.412 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000117 [ 17.415 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000118 [ 17.415 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000119 [ 17.630 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000120 [ 17.633 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000121 [ 17.633 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000122 [ 17.850 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000123 [ 17.852 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000124 [ 17.852 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000125 [ 18.063 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000126 [ 18.066 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000127 [ 18.066 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000128 [ 18.277 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000129 [ 18.280 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000130 [ 18.280 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000131 [ 18.493 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000132 [ 18.497 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000133 [ 18.497 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000134 [ 18.715 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000135 [ 18.717 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000136 [ 18.717 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000137 [ 18.928 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000138 [ 18.931 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000139 [ 18.931 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000140 [ 18.931 ] INFO: (solo_ble_loopback.c:430) totalSize 5728 totalFreeSize 1992 largestFreeSize 1864
    #000141 [ 19.145 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000142 [ 19.148 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000143 [ 19.148 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000144 [ 19.356 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000145 [ 19.359 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000146 [ 19.359 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000147 [ 19.577 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000148 [ 19.580 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000149 [ 19.580 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000150 [ 19.798 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000151 [ 19.801 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000152 [ 19.801 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000153 [ 20.018 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000154 [ 20.021 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000155 [ 20.021 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000156 [ 20.231 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000157 [ 20.234 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000158 [ 20.234 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000159 [ 20.448 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000160 [ 20.451 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000161 [ 20.451 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000162 [ 20.669 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000163 [ 20.672 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000164 [ 20.672 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000165 [ 20.882 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000166 [ 20.885 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000167 [ 20.885 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000168 [ 21.100 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000169 [ 21.103 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000170 [ 21.103 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000171 [ 21.316 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000172 [ 21.318 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000173 [ 21.318 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000174 [ 21.531 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000175 [ 21.534 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000176 [ 21.534 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8
    #000177 [ 21.751 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 20000000
    #000178 [ 21.754 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 2
    #000179 [ 21.754 ] INFO: (RFCC26XX_singleMode.c:2351) RF_fsmActiveState 8

    I removed `POWER_SAVING` from the predefined symbols  but unfortunately this didn't change the behavior, The only way to stop this behavior is by modifying the function `RF_powerConstraintSet` to always set the constraint to `RF_PowerConstraintDisallow`

    After this change the device can advertise and TxRx data non-stop!

    Could you please let me know what is the right way to conserve the power but without this power toggling behavior ? as you can notice from msgs timestamp it happen immediately, without like a waiting time between Power Down and Up. 

  • Hi,

    Great to see your progress.

    To be sure I understand, can you please indicate how the values should be interpreted?

    Also, can you please instrument the same way the non-modified simple_np example? Please share the logs obtained.

    Best regards,

  • Sorry forgot to add the code change.

    typedef enum RF_FsmEvent_ {
        RF_FsmEventLastCommandDone  = (1UL << 1), /*0x2*/         /* Indicates that a radio command is finished. */
        RF_FsmEventWakeup           = (1UL << 2), /*0x4*/         /* Used to initiate the power up sequence of the RF core. */
        RF_FsmEventPowerDown        = (1UL << 3), /*0x8*/         /* Used to initiate the power down sequence of the RF core. */
        RF_FsmEventCpeInt           = (1UL << 14),/*0x4000*/      /* Generated during command execution. */
        RF_FsmEventPowerStep        = (1UL << 29) /*0x20000000*/  /* Generated during the power up sequence of RF core. */
    } RF_FsmEvent;
    
    
    /*
     *  RF state machine function during active state.
     *
     *  Input:  pObj - Pointer to RF object.
     *          e    - State machine event.
     *  Return: none
     */
    static void RF_fsmActiveState(RF_Object *pObj, RF_FsmEvent e)
    {
        volatile RF_Cmd* pCmd;
        uint32_t rtcValTmp1;
        uint32_t rtcValTmp2;
        RF_EventMask events;
        uint32_t key;
        Log_info1("RF_fsmActiveState %x", e); //<- Print The FSM Event
    
    
        /* 
            Rest of Implementation 
        */   
    }

  • Hi Mohamed,

    Thank you for the additional details.

    My understanding is then:

    1- The RF core is powered-up (20000000)
    2- The RF operation completes (2)
    3- The RF core is powered-down (8)

    The timing I observe makes sense:

    - the RF operations last ~3 ms
    - there are 100 ms between two successive RF operations (which seems correct for advertising interval)
    - the RF core is powered down right after the completion

    Are these changes the only changes implemented on the peripheral_np example?

    Regards,

  • Hi Mohamed,

    Thank you for the additional details.

    My understanding is then:

    1- The RF core is powered-up (20000000)
    2- The RF operation completes (2)
    3- The RF core is powered-down (8)

    The timing I observe makes sense:

    - the RF operations last ~3 ms
    - there are 100 ms between two successive RF operations (which seems correct for advertising interval)
    - the RF core is powered down right after the completion

    Are these changes the only changes implemented on the peripheral_np example?

    Regards,