Running the flexcan example using two frdm-kw36 boards

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

Running the flexcan example using two frdm-kw36 boards

跳至解决方案
481 次查看
SeokJin
Contributor II

Hello.

I am currently learning flexcan examples using two frdm-kw36 boards.

The version of the kw36 SDK I am using is "SDK_2_2_12_FRDM-KW36", and the mcux version is "v11.8.1_1197".

The flexcan example path is [frdmkw36 > driver_examples > flexcan > interrupt_transfer].

The hardware configuration is as shown in the photo below.

SeokJin_0-1721571697956.png

 

I debugged the flexcan example and checked it with the Putty program, but after setting the node (A or B), even if I enter a string, no data is sent and nothing happens.

SeokJin_1-1721571834015.png

As you can see in the picture, it only works up to that point and does not respond to any additional input after that.

 

When I checked other examples or application notes, it said that 12V DC was needed for CAN communication, so I tried applying 12V DC, but the same phenomenon was repeated.

After connecting 12V DC, the hardware configuration is as shown in the photo below.

SeokJin_2-1721572124088.png

 

I've configured it this way, but why is there no action in the Putty program?

Is there some process or content that I am not thinking about?

 

I am waiting for answers from knowledgeable people.

0 项奖励
回复
1 解答
380 次查看
Itzel_UV
NXP Employee
NXP Employee

Hi,

I will give you a follow up from your last question.

 

From the FlexCan example used, we define in the flexcan_interrupt_transfer.c located in the folder source; if it will use 2.0A or 2.0B from the line 206 and 239 using the typedef enum _flexcan_frame_format, were kFLEXCAN_FrameFormatStandard(will manage 2.0A) and kFLEXCAN_FrameFormatExtend (will manage 2.0B). To know more about the architecture for the CAN, you could look more information here.

Answering the 2nd question, you should modify the FLEXCAN_ID_STD->FLEXCAN_ID_EXT as well the CAN_ID_STD_SHIFT->CAN_ID_EXT_SHIFT that are used in the flexcan_interrupt_transfer.c.

This is how it's supposed to work using the values Tx/Rx of 4 digits.

Itzel_UV_0-1722026231455.png

 

Regards,

Itzel.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
381 次查看
Itzel_UV
NXP Employee
NXP Employee

Hi,

I will give you a follow up from your last question.

 

From the FlexCan example used, we define in the flexcan_interrupt_transfer.c located in the folder source; if it will use 2.0A or 2.0B from the line 206 and 239 using the typedef enum _flexcan_frame_format, were kFLEXCAN_FrameFormatStandard(will manage 2.0A) and kFLEXCAN_FrameFormatExtend (will manage 2.0B). To know more about the architecture for the CAN, you could look more information here.

Answering the 2nd question, you should modify the FLEXCAN_ID_STD->FLEXCAN_ID_EXT as well the CAN_ID_STD_SHIFT->CAN_ID_EXT_SHIFT that are used in the flexcan_interrupt_transfer.c.

This is how it's supposed to work using the values Tx/Rx of 4 digits.

Itzel_UV_0-1722026231455.png

 

Regards,

Itzel.

0 项奖励
回复
451 次查看
Itzel_UV
NXP Employee
NXP Employee

Hello,

I will be helping you with your question.

 

You indeed have the connections correct (last picture on your own post). Could you confirm that you have pressed first the keyboard "B'' on one terminal followed after with the keyboard "A'' on the other terminal?

 

The outcome from the flex CAN Interrupt Transfer example should look like this.

Itzel_UV_1-1721761061082.png

 

Please keep me up to date if there's still trouble.

 

Regards,

Itzel.

0 项奖励
回复
423 次查看
SeokJin
Contributor II

@Itzel_UV 

Thank you for your kind reply.

Additionally, I have a few more questions for you.

 

Does that flexcan example use CAN 2.0A or CAN 2.0B?

 

Also, even if you change the Tx/Rx ID from the current 3 digits (e.g. 0x123) to 4 digits (e.g. 0x5555), Putty can only display up to 3 digits (e.g. 0x555).

Why is this like this? Please explain.

 

thank you

0 项奖励
回复