how to set receive standard CAN frame on S32K148EVB

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

how to set receive standard CAN frame on S32K148EVB

525 Views
HeeSu
Contributor I

Hi, I'm a student who is studying with the automotive CAN network.

I have trouble reading the standard can frame on S32K148EVB.

I'm using a basic example called 'flexcan_encrypted_s32k148' and I just trying to check on the debug phase there is data in the buffer that I sent through the CAN bus.

I'm using external 12V power and Kvaser bus terminal called kavser T-Cannector V2 now.

In kvaser device there is a can bus using a 120ohm register and I just connected it with DB9 cable and S32K.

but there is no data to read through S32K CAN.

what should i do for reading standard can data from can bus?

 

0 Kudos
Reply
3 Replies

510 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

below code should receive message with std ID = RX_MSG_ID into message buffer RX_MAILBOX

PetrS_0-1699448392461.png

So if your CAN tool sends this message (std ID = RX_MSG_ID) it passes while function and recvBuff contains message data.

If this do not work check for errors detected, either on CAN tool or within module (ECR/ESR1 registers)

BR, Petr

0 Kudos
Reply

463 Views
HeeSu
Contributor I

Hi @PetrS 

Thanks for your reply.

So what you're saying is that the ID value of the ID type of the datainfo structure must match the ID value of the CAN message to receive the message, right?
 

I saw the window adjusting the settings, but it's different from the normal CAN message setting method, so how do I set that part?

Currently, I am sending a message using 500,000 baud rate.

Do I need to modify it to suit the type of message overall?

I would like to send and receive a message of CAN 2.0 A type.

 

HeeSu_0-1700209632017.png

 

0 Kudos
Reply

434 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes, there must be exact match between ID configured within selected MB and the ID of incoming message, assuming mask acceptance register set bits as 1 for respective bits. 
Setting looks normal, if just classical CAN message is going to be send/received you can disable CAN FD feature. But even if it is enabled a module is able to classical CAN message.

BR, Petr

0 Kudos
Reply