cancel
Showing results for 
Search instead for 
Did you mean: 

Which stm32 is best for making a CAN network log?

Marco Catellani
Associate
Posted on June 20, 2017 at 10:09

I would like to build a project based on STM32 that interfaces with a CAN network. The CAN network has a 250kbps baud rate.

On this network I have to:

  • Log messages from 127 nodes with IDs between 0x381 and 0x3FF (Each node sends a message per second).
  • Send messages to nodes with id between 0x581 and 0x5FF
  • Receive response to these messages that will have IDs between 0x601 and 0x67F.

I was thinking of using an STM32 with 2 CANs. My intention is to set up 2 different filters on IDs and limit interruptions. Is that a good choice? Can it be done with only one CAN?

I have doubts about the kind and the speed of processor to use. Can an STM32F1/F0 be sufficient? Or do I need an F4?

Thanks in advance.

1 REPLY 1
Jack Peacock
Associate II
Posted on June 20, 2017 at 12:39

Whether or not to use 2 CAN interfaces depends on how you are connecting to the network.  If there's only one bus adding a second transceiver and interface won't help performance.  You are limited by the bandwidth of the bus itself, not the controller.  If it's a dual bus, something like an ISOBUS tractor or combine, then you must have 2 separate bus transceivers and interfaces.

Unless youa re building a large number of these repeaters I'd recommend an F4, only because it gives you some margin in terms of memory buffers.  Bear in mind you may have to keep a large buffer of messages in case of heavy contention or a node failure, which can temporarily take the bus offline.

Otherwise your application is basically a store and forward repeater, not a complex task.  Performance is limited by how much access time you can get on the bus, not the controller core.  If it's cost sensitive look at an F2. 

   Jack Peacock