cancel
Showing results for 
Search instead for 
Did you mean: 

Does STM32F373 work in CAN Slave mode?

debasish_deka
Associate II

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.

7 REPLIES 7
T J
Lead

All nodes are bidirectional,

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

debasish_deka
Associate II

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
Lead

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

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 Employee

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 Accept as Solution on the reply which solved your issue or answered your question.

debasish_deka
Associate II

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

TKale
Associate