Receive EXT and STD CAN messages

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

Receive EXT and STD CAN messages

跳至解决方案
3,340 次查看
David_Estevez
Contributor I

Good morning,

I am using a s32k144 for CAN to receive messages with an extended format with the following initialization:

David_Estevez_0-1684769662774.png

But now I want to change that initialization to be able to receive messages in both standard and extended format. How can i do it?

Thanks in advantage!

0 项奖励
回复
1 解答
3,277 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@David_Estevez

I sent you a priviate message, you can reference to this project and below is the test result.

Senlent_0-1684834326538.png

 

 

在原帖中查看解决方案

0 项奖励
回复
8 回复数
3,309 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@David_Estevez

you just need to enable CAN FD features.

The difference between a CAN 2.0A and a CAN 2.0B message is that CAN 2.0B supports both 11 bit (standard) and 29 bit (extended) identifiers. Standard and extended frames may exist on the same bus, and even have numerically equivalent identifiers. In this case, the standard frame will have the higher priority

0 项奖励
回复
3,303 次查看
David_Estevez
Contributor I

Hello again,

I am using CAN1 which does not allow the use of CAN FD. Would it be possible to receive both messages with this CAN1 or is it necessary to change to CAN0 that does allow CANFD?

0 项奖励
回复
3,298 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@David_Estevez

yes, you have to change to CAN0

0 项奖励
回复
3,292 次查看
David_Estevez
Contributor I

Hello again,

I have enabled the CANFD function and changed to CAN0 but I still receive only one type of message.

Maybe I have to change something in the initialization?

David_Estevez_0-1684829859955.png

 

0 项奖励
回复
3,288 次查看
Senlent
NXP TechSupport
NXP TechSupport

change it to FLEXCAN_MSG_ID_EXT then try again.

Senlent_0-1684830373945.png

 

0 项奖励
回复
3,285 次查看
David_Estevez
Contributor I

Still not going. Maybe something to change in the processor expert ?

David_Estevez_0-1684830970582.png

 

0 项奖励
回复
3,278 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@David_Estevez

I sent you a priviate message, you can reference to this project and below is the test result.

Senlent_0-1684834326538.png

 

 

0 项奖励
回复
3,270 次查看
David_Estevez
Contributor I

Thank you! I got it to work.

0 项奖励
回复