CAN communication in Rapid IoT board

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

CAN communication in Rapid IoT board

2,093 Views
trialaccount12
Contributor V

Hi,

     I tried the working demos in rapid iot board using rapid-iot studio. I wanted to establish the CAN communication in rapid iot board. I checked out the PIN out and it shows it has pins for CAN0 and CAN1. But I could not find demo's for CAN in SDK files(K64F and KW41Z also doesn't have CAN demos). Rapid IoT studio had BLE ,UART blocks but not CAN. 

Can anyone give any pointers on this? Is it possible to establish a CAN communication between rapid Iot board and any other board?

Thanks and Regards

Niranjan

14 Replies

1,638 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Niranjan,

    Thanks a lot for your updated information and let me know that your issue is solved!

     If you have the new question in the future, welcome to create the new question post, we will help you in the new question post.


Have a great day,
Kerry

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

1,638 Views
trialaccount12
Contributor V

Sure. Thank you.

Regards

Niranjan

0 Kudos

1,638 Views
trialaccount12
Contributor V

s32K144CANtransreceiver.PNG

Since s32k144 has CAN transreceiver in it,

Can I use this board instead of Serial (USB, Ethernet, CAN, RS232/485) Tower System Module | NXP . It would be great if you could give some pointers on these questions.

Thanks for your help.

Thanks and regards

Niranjan

0 Kudos

1,638 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Niranjan,

    1. If the distance is less than 500cm, I think you also can consider to use the RS232/485, it's enough to use, then you just need to use the UART module.

     2.  If you still want to use the CAN module,  you can use it, you also can use the CAN transceiver on the S32K144,

The UJA1169 is a mini high-speed CAN System Basis Chip (SBC), but you need also connect the SPI, because that chip is using the SPI to control the SBC chip. It is may more complicated to you.


Have a great day,
Kerry

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,638 Views
trialaccount12
Contributor V

Hi, thank you for taking your time in helping me.

I decided to go with Serial (USB, Ethernet, CAN, RS232/485) Tower System Module | NXP for my application.

Regards

Niranjan

0 Kudos

1,638 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Niranjan ravi,

    OK, when you use that board, if you have any question about it, just let us know.


Have a great day,
Kerry

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

1,638 Views
trialaccount12
Contributor V

Hi,

    I tried using this SDK

"About the CAN code for K64, you can refer to the TWR-K64 SDK code which can be downloaded from this link:

 Welcome | MCUXpresso SDK Builder"  

to do a simple CAN communication between two FRDM k64F boards. I added CAN transreceivers on both sides and I used PTB19 and PTB18 pins but I am not able to proceed after a particular point. 

I did create a new thread where I posted my query - > https://community.nxp.com/thread/496759 

Can you tell me where I am going wrong?

CAN_loopback example worked fine in FRDM-K64F board but why does not interrupt example work? Quite curious on this aspect.

Any pointers would be helpful.

Thanks and Regards

Niranjan

0 Kudos

1,638 Views
trialaccount12
Contributor V

Sure. I will try it out.

Thank you for your help.

Thanks and Regards

Niranjan

0 Kudos

1,638 Views
trialaccount12
Contributor V

Hi,

   Pls ignore my previous post. I got it working. The issue was with Transreceivers. Thank you for your inputs.

Regards

Niranjan

0 Kudos

1,638 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Niranjan ravi,

    Thank you for your interest in NXP kinetis product, I would like to provide service for you.

    Yes the rapid IOT don't have the according CAN communication directly.

    About the CAN code for K64, you can refer to the TWR-K64 SDK code which can be downloaded from this link:

 Welcome | MCUXpresso SDK Builder 

  Select the board as TWR-K64 board, generate the code and download it, then you can find the FlexCAN code from this folder:

  SDK_2.5.0_TWR-K64F120M\boards\twrk64f120m\driver_examples\flexcan

   Please also note, in the hardware side, you need to add the CAN transceiver.

Wish it helps you!

If you still have question about it, please kindly let me know.

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

1,638 Views
trialaccount12
Contributor V

Thank you for your reply. Yes, I was able to get the example demo. I will connect CAN transceiver and proceed.

                           Also, I looked into CAN transceiver and it seems there is a variety of them. This is the first time I am working on CAN bus communication. It would be great if you could suggest one? I would be using FlexCAN in rapid IoT board.

Thank you for your help.

Regards

Niranjan

0 Kudos

1,638 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Niranjan,

    Your Rapid IoT Main board don't have the CAN transceiver, it just have the CAN interface:

pastedImage_1.png

 So, you need to connect the CAN_RX and CAN_TX to the external CAN transceiver.

You can use our TWR-SER board, that board have the CAN transceiver:

Serial (USB, Ethernet, CAN, RS232/485) Tower System Module | NXP 

pastedImage_3.png

Wish it helps you!

If you still have question about it, please kindly let me know.


Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

1,638 Views
trialaccount12
Contributor V

Hi,

    Thank you for your reply. Yes, this would help me in my application. But I have two clarifications.

1. I am implementing CAN communication between rapid iot and a different board with distance less than 500 cm.(Only two devices will be in the CAN bus) Would I still need to add a CAN transreceiver to rapid iot?

2.I do have s32K144 board from NXP S32K144 Evaluation Board | NXP  readily available me. I looked into manual of this board and I found out this:

0 Kudos

1,638 Views
trialaccount12
Contributor V

Thank you for your reply. Yes, I was able to get the example demo. I will connect CAN transceiver and proceed.

Thank you for your help.

Regards

Niranjan

0 Kudos