Skip to main content
Nicolas Cmb
Associate III
May 9, 2017
Question

STM32 F103RB CAN bus controller

  • May 9, 2017
  • 4 replies
  • 1354 views
Posted on May 09, 2017 at 13:05

Hi,

I'm not really an expert in CAN protocol communication but I know minimum about it. I read some forums which talk about transceiver and controller, which are necessary to communicate into CAN protocol.

So I take a MCP 2551 transceiver made by Microchip; but for the controller part, I don't even know if the microcontroller STM32 has an internal controller or not.

My question is the following one:

If the microcontroller STM32 has an internal controller how does it work.

And if it's not, what can I buy for it?

Thanks answer to my questions.

Nicolas.

    This topic has been closed for replies.

    4 replies

    Tesla DeLorean
    Guru
    May 9, 2017
    Posted on May 09, 2017 at 15:04

    That's what Data Sheets are for

    http://www.st.com/content/ccc/resource/technical/document/datasheet/33/d4/6f/1d/df/0b/4c/6d/CD00161566.pdf/files/CD00161566.pdf/jcr:content/translations/en.CD00161566.pdf

     

    Table 2 covers the peripheral counts in the different models.

    The Reference Manual describes the peripheral, and the Standard Peripheral Library has examples of using it, as does the HAL/Cube. Look at the EVAL series board schematics to see how CAN is wired up.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Nicolas Cmb
    Associate III
    May 9, 2017
    Posted on May 09, 2017 at 16:13

    Thank you so much

    Tamas Novak
    Associate III
    May 11, 2017
    Posted on May 11, 2017 at 10:01

    There is a free application called 'CubeMX' you can download from ST, which helps you to select the proper MCU. 

    http://www.st.com/en/development-tools/stm32cubemx.html

     

    You can tick 'CAN' checkbox and MX filters out STM32's not having CAN controller. 

    Nicolas Cmb
    Associate III
    May 11, 2017
    Posted on May 11, 2017 at 10:38

    Thank you Tamas,

    I've download it and begin to program but I want to know if the J1939 protocol is compatible with the CAN libraries.

    Tamas Novak
    Associate III
    May 11, 2017
    Posted on May 11, 2017 at 10:58

    I don't know too much on this subject, but J1939 seems a huge collection of standards:

    http://store.sae.org/j1939/contents/

     

    Physical layer conformity depends on CAN driver IC you choose, and higher levels mostly depend on your code running on STM32.

    I assume the CAN core logic within STM32 is compatible.  So the answer to your question is probably yes... but at most it depends on your work.

    Nicolas Cmb
    Associate III
    May 11, 2017
    Posted on May 11, 2017 at 11:12

    Thank you for your help,

    To begin, I want to use CAN just for communicate between two STM32F103RB microcontrolers one send a message that the other one have to receive.

    After that I will implement a cylinder which I will command with orders from one of those microcontrolers.