Skip to main content
debasish_deka
Associate
Sep 21, 2018 12:28 PM UTC
Question

Does STM32F373 work in CAN Slave mode?

I am trying to implement CAN between two STM32F373, with one as master and another as slave. The problem I am facing is that it cannot be configured in slave mode. I am using Cube MX to create the initial configuration.

When I configure in slave mode CAN pins doesn't appear

0690X000006C42WQAS.jpg

When I configure master mode the CAN pins appear as below

0690X000006C42MQAS.jpg

Code also doesn't contain CAN initialization routines, when Master mode is dis-selected. I have kept the generated main files as attachment.

This topic has been closed for replies.

7 replies

T J
Senior III
Sep 22, 2018 8:15 AM UTC

All nodes are bidirectional,

any node can transmit like a master and all other nodes will receive like slaves...

debasish_deka
Associate
Sep 24, 2018 6:11 AM UTC

By general idea, checking the master mode check box it should behave as a master. But CAN protocol per se doesn't need any master mode.

Now whether I need to tick the Master Mode check box or not?

If I tick how it will behave and if I don't tick how it should behave?

T J
Senior III
Sep 24, 2018 9:09 AM UTC

If you want the cube to initialise the Can subsystems (HAL), then you have to tick the box.

Then its up to you, the Master/Slave aspects are user firmware defined..

Jeroen3
Senior
Sep 24, 2018 11:18 AM UTC

Master and Slave mode of the bxCAN peripheral is only relevant if the chip has two CAN peripherals.

In that case they often share some of the required logic, and that means you cannot use the Slave CAN without the Master CAN.

Amel NASRI
ST Technical Moderator
Sep 27, 2018 4:20 PM UTC

Hi @debasish_deka​ ,

You need to select "Master mode" in order to enable the CAN peripheral.

I agree with you that this is confusing when the used device embeds only one CAN instance.

An enhancement request is logged internally to get rid of this confusion.

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
debasish_deka
Associate
Oct 17, 2018 5:03 AM UTC

Thanks. The developer just needs to rename the Master checkbox by Enable checkbox

TKale
Visitor II
Apr 30, 2019 6:38 PM UTC