2024-03-22 09:27 AM
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
Solved! Go to Solution.
2024-03-22 10:07 AM - edited 2024-03-22 10:08 AM
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.
2024-03-22 09:52 AM - edited 2024-03-22 09:53 AM
Hello,
What is your board? ST board or custom board?
EDIT: I didn't read carefully your comment: you're using F334R8T6Nucleo.
2024-03-22 10:07 AM - edited 2024-03-22 10:08 AM
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.
2024-03-23 11:37 AM
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.
2024-03-23 12:40 PM
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
2024-03-24 11:03 PM
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.