Skip to main content
Zek_De
Senior
March 6, 2018
Question

CAN Protocol Master and Slave?

  • March 6, 2018
  • 3 replies
  • 3540 views
Posted on March 06, 2018 at 08:16

Hello friends,

How is possible Can Master and Slave protocol in STM32CubeMX?

is it corresponding situation?
    This topic has been closed for replies.

    3 replies

    AvaTar
    Senior III
    March 6, 2018
    Posted on March 06, 2018 at 08:45

    No, there are no masters or slave in CAN, only priorized addresses/IDs.

    Szymon PANECKI
    Senior III
    March 6, 2018
    Posted on March 06, 2018 at 09:50

    Hello Emrah,

    I believe that you are refering to naming of CAN interfaces in STM32CubeMX. This is correct that you can see there that some of CAN interfaces are marked as master and some are marked as slaves. This naming is misleading, becasue principle of CAN is not master-slave architecture, but multi-master architecture. And so it is for all CAN interfaces in STM32 MCUs. This master-slave naming in STM32CubeMX refers to relationship between CAN modules in STM32. If there is more than one CAN in MCU, then always one acts as a master and rest of them act as slaves. This should be understood in this way: CAN peripherals in single STM32 MCU share some of common resources: some RAM memory and CAN filtering. CAN master is in charge of these resources. CAN slaves are full featured CAN peripherals, but in order to configure filtering for them you need at least to enable clock for CAN master.

    Regards

    Szymon
    Zek_De
    Zek_DeAuthor
    Senior
    March 6, 2018
    Posted on March 06, 2018 at 10:27

    I also looked the reference manual ,now as much as I understand no problem to use master to master CAN between any devices.