cancel
Showing results for 
Search instead for 
Did you mean: 

NucleoF334R8T6 Can bus reader

SeosaphM
Associate II

Hello, I am very new to micro electronics. I have been trying to set up reading CAN bus messages using my Nucleo board with a can tranceiver SN65HVD230.

I have found many examples , but not for the F334R8T6Nucleo. I attempted to export numerous examples from other board types, but I don't  think the configurations match....

I tried to use ArduinoIDE with STM32 without any success iether. All the examples I have tried via internet do not comply exactly with my board, so it's hit and miss. I could just go out and buy another board, but I see CAN is available on my board and would like to make it work.

I have installed STMProgrammer, IDE and MX and would like to know the sequence for setting up and reading messages.

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

I've attahced an ioc file (CubeMx file) with a pre-configured CAN with a bitrate at 500kb/s that can generate a code initialization for CAN interface.

Then you can add your CAN application by adding filters config.

You can inspire from any example provided in CubeF3 HAL package downloadable from here.

For example inspire from this example: /Projects/STM32373C_EVAL/Examples/CAN/CAN_Networking

PS: don't forget to connect another node on the bus otherwise the example won't work.

Plese click on "Accept as solution" button if it does answer your question.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

5 REPLIES 5
SofLit
ST Employee

Hello,

What is your board? ST board or custom board?

EDIT: I didn't read carefully your comment: you're using F334R8T6Nucleo.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
SofLit
ST Employee

I've attahced an ioc file (CubeMx file) with a pre-configured CAN with a bitrate at 500kb/s that can generate a code initialization for CAN interface.

Then you can add your CAN application by adding filters config.

You can inspire from any example provided in CubeF3 HAL package downloadable from here.

For example inspire from this example: /Projects/STM32373C_EVAL/Examples/CAN/CAN_Networking

PS: don't forget to connect another node on the bus otherwise the example won't work.

Plese click on "Accept as solution" button if it does answer your question.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Thank you for the links. I have built the example that you attached in CubeMX. 

This is baby steps for me, and aim to read CAN messages from an instrument cluster to start with. I am now configuring the CAN wiring setups.

I am also trying to understand the filter configs. At this stage, I would like to read everything first, then go to next stage and add filters.

I hope to run this program with SavvyCan software. 

SofLit
ST Employee

You can close this thread by clicking Accept as solution my answer at this stage. 
If you face an issue with filters open a new thread and I can assist you.

Thanks

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
SeosaphM
Associate II

Thank you for your response and .ioc file with parameters configured. I managed to create a new project from STM .ioc file for my NucleoF334R8 boad.