Skip to content

Abort SDO transfer and sending response #170

@jafem

Description

@jafem

Is there a reason why only the SDO timeout response is sent in COCSdoAbort when a SDO transfer is aborted?

static void COCSdoAbort(CO_CSDO *csdo, uint32_t err)
{
    CO_IF_FRM frm;

    /* store abort code */
    csdo->Tfer.Abort = err;

    /* send the SDO timeout response */
    if (err == CO_SDO_ERR_TIMEOUT) {
        CO_SET_ID  (&frm, csdo->TxId        );
        CO_SET_BYTE(&frm, 0x80,           0u);
        CO_SET_WORD(&frm, csdo->Tfer.Idx, 1u);
        CO_SET_BYTE(&frm, csdo->Tfer.Sub, 3u);
        CO_SET_LONG(&frm, err,            4u);
        CO_SET_DLC (&frm,                 8u);

        (void)COIfCanSend(&csdo->Node->If, &frm);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions