ZHCAF59 March 2025 MSPM0G3507
有各种可配置参数,如 节 3.2 中所示。用户可以通过修改 user_define.h 中定义的所有参数来配置 CAN 和 UART 数据包帧、FIFO 的大小或数据区域的最大大小。
用户可以在 user_define.h 中修改 Custom_Element 的定义。可根据应用程序和存储要求增加或减少条目。
/*user-defined information storage structure */
typedef struct {
/*! Origin Identifier, indicating the origin of the message */
uint32_t origin_id;
/*! Destination Identifier, indicating the destination of the message */
uint32_t destination_id;
/*! Data Length Code */
uint8_t dlc;
/*! Data bytes */
uint8_t data[TRANSMIT_DATA_LENGTH];
} Custom_Element;
两个通信接口的接收和传输单独运行。消息通过 FIFO 传输。用户可以更改结构(例如使消息遵循特定的格式,甚至是特定的通信协议)。此外,用户可以根据 图 2-3 将结构拆分为单向传输。