Running the flexcan example using two frdm-kw36 boards

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

Running the flexcan example using two frdm-kw36 boards

Jump to solution
535 Views
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 Kudos
Reply
1 Solution
434 Views
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.

View solution in original post

0 Kudos
Reply
3 Replies
435 Views
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 Kudos
Reply
505 Views
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 Kudos
Reply
477 Views
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 Kudos
Reply