S32k344 MCAL CAN read API

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32k344 MCAL CAN read API

跳至解决方案
442 次查看
lluo
Contributor III

Hi,

When working with S32K344 for CAN communication, the FlexCAN library provides read and write API as shown below: 

Flexcan_Ip_StatusType FlexCAN_Ip_Send(uint8 instance,
uint8 mb_idx,
const Flexcan_Ip_DataInfoType * tx_info,
uint32 msg_id,
const uint8 * mb_data
)

Flexcan_Ip_StatusType FlexCAN_Ip_Receive(uint8 instance,
uint8 mb_idx,
Flexcan_Ip_MsgBuffType * data,
boolean isPolling
)

 

However, it seems to me that the MCAL CAN library only provides a write API as shown below:

Std_ReturnType Can_43_FLEXCAN_Write
(
Can_HwHandleType Hth,
const Can_PduType * PduInfo
)

In terms of reading, there is only one API named:  

void Can_43_FLEXCAN_MainFunction_Read(void)

As a result , I cannot check the received the CAN message on the target and let the target change its behavior according to the received CAN message. Is this intended? Does the user need to implement their own CAN read API if they want to use MCAL CAN library? Thank you in advance.

 

 

标记 (1)
0 项奖励
1 解答
420 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @lluo 

The only functions implemented to read data are FlexCAN_Ip_MainFunctionRead(), which will check if the message is received and read the message buffer or RxFifo, and FlexCAN_ReadRxFifo() gets the FlexCAN Rx FIFO data.

I suggest you test the Can_Example_S32K344 to verify that is not possible to read the CAN messages. 

 

B.R.

VaneB

在原帖中查看解决方案

0 项奖励
1 回复
421 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @lluo 

The only functions implemented to read data are FlexCAN_Ip_MainFunctionRead(), which will check if the message is received and read the message buffer or RxFifo, and FlexCAN_ReadRxFifo() gets the FlexCAN Rx FIFO data.

I suggest you test the Can_Example_S32K344 to verify that is not possible to read the CAN messages. 

 

B.R.

VaneB

0 项奖励