S32k344 MCAL CAN read API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32k344 MCAL CAN read API

Jump to solution
569 Views
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.

 

 

Tags (1)
0 Kudos
Reply
1 Solution
547 Views
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

View solution in original post

0 Kudos
Reply
1 Reply
548 Views
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 Kudos
Reply