Skip to main content
Explorer
March 22, 2024
Solved

NucleoF334R8T6 Can bus reader

  • March 22, 2024
  • 4 replies
  • 1578 views

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

    This topic has been closed for replies.
    Best answer by mƎALLEm

    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.

    4 replies

    Technical Moderator
    March 22, 2024

    Hello,

    What is your board? ST board or custom board?

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

    mƎALLEmAnswer
    Technical Moderator
    March 22, 2024

    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.

    SeosaphMAuthor
    Explorer
    March 23, 2024

    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. 

    Technical Moderator
    March 23, 2024

    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

    SeosaphMAuthor
    Explorer
    March 25, 2024

    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.