2.8.41 CANx_AutoRTRResponseSet Function

C

bool CANx_AutoRTRResponseSet(uint32_t id, uint8_t length, uint8_t* data, uint8_t fifoNum) // x - Instance of the CAN peripheral

Summary

Set the Auto RTR response for remote transmit request.

Description

This routine set the Auto RTR response for remote transmit request.

Precondition

CANx_Initialize must have been called for the associated CAN instance. Auto RTR Enable must be set to 0x1 for the requested Transmit FIFO in MCC configuration.

Parameters

ParamDescription
id11-bit / 29-bit identifier (ID).
lengthLength of data buffer in number of bytes.
dataPointer to source data buffer
fifoNumFIFO number

Returns

Request status. true - Request was successful.

false - Request has failed.

Example

uint8_t message[] = {0xAA, 0x55};
    uint32_t messageID = 0x555;
    uint8_t messageLength = 2;
    CAN1_Initialize();
    CAN1_AutoRTRResponseSet(messageID, messageLength, message, 1);

Remarks

Auto RTR Enable must be set to 0x1 for the requested Transmit FIFO in MCC configuration.