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.

CC1310: RF_runCmd stuck awaiting for ACK

Part Number: CC1310

Tool/software:

i have a device with a cc1310 that transmits a signal to another device in 2 events. One event is when a car is detected, the other event is a timer that triggers every 7 seconds to alert the receiver device of its status. To transmit i use the function below in both events:

static bool rf_send(const uint8_t data, rf_cmd_t cmd, RF_t *ack_payload) {
    if (!device.is_joined && cmd != RF_CMD_JOIN) return false;

    memcpy(&tx_payload.dst_addr, filter_address, sizeof(tx_payload.dst_addr));
//    tx_payload.dst_addr = *(uint64_t *)filter_address;
    tx_payload.cmd = cmd;
    tx_payload.data.raw = data;


    // Send packet with listen before talk
#if ACK_MODE == true
    RF_EventMask terminationReason = RF_runCmd(rf_handle, (RF_Op*) &RF_cmdNop, RF_PriorityNormal,
            rf_tx_done_cb, (RF_EventCmdDone | RF_EventRxEntryDone | RF_EventLastCmdDone));
#else
    RF_EventMask terminationReason = RF_runCmd(rf_handle, (RF_Op*) &RF_cmdPropTx, RF_PriorityNormal, NULL, 0);
#endif

    // Command status
    uint32_t cmdStatus = ((volatile RF_Op*) &RF_cmdPropTx)->status;
    uint32_t cmdRXStatus = ((volatile RF_Op*) &RF_cmdPropRxAdv)->status;

    // Reset status
    RF_cmdNop.status = IDLE;
    RF_cmdPropCs.status = IDLE;
    RF_cmdCountBranch.status = IDLE;
    RF_cmdPropTx.status = IDLE;
    RF_cmdPropRxAdv.status = IDLE;
    RF_cmdCountBranch.counter = CS_RETRIES_WHEN_BUSY;

    // If command terminate OK
    if (cmdStatus == PROP_DONE_OK && cmdRXStatus == PROP_DONE_OK && terminationReason == RF_EventLastCmdDone) {
        // If packet is from the type ACK
        if (rx_payload.cmd != RF_CMD_ACK) {
            return false;
        }

        *ack_payload = rx_payload;

        return true;
    }

    return false;
}

When the function is called in the 7 seconds periodic event it runs with no errors, when it is called on a detection it gets stuck at the RF_runCmd, but it sends the signal. What can cause this behaviour?

  • I am afraid I cannot answer what is going on unless I have a way reproduce the problem.

    Please provide me with a simplified example program that illustrate the error so that I can run it on our LP.

    You should use one of our default examples in the SDK as a starting guide.

    If you want to debug it yourself, you should monitor the status of all your commands at the time where you are stuck. This might give you useful info as to why you are stuck.

    BR

    Siri