cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding CAN Open implementation in STM32L431RBTx

Ravi_STM32
Associate II

As we are using CAN 2.0 A (11 bit ID STANDARD FORMAT) in STM32L431RBTx MCU & it is working fine. Now we want to go for the CAN open protocol. Is there any sample code or document available or any algorithm to initiate CAN open code development for STM32L431RBTx MCU.

1 ACCEPTED SOLUTION

Accepted Solutions
SKacp.1
Senior II

Hi,

Please see on the GitHub https://github.com/CANopenNode/CANopenNode

Best regards,

Slawek

View solution in original post

4 REPLIES 4
SKacp.1
Senior II

Hi,

Please see on the GitHub https://github.com/CANopenNode/CANopenNode

Best regards,

Slawek

Jack Peacock_2
Senior III

You might take a look at CANFestival (canfestival.org). It implements some of the basic CANopen protocols. I'm not sure if there are any STM32 specific drivers available for it.

I've found the CAN hardware in the STM32 works very well with CANopen. The filter entries map nicely to the 14 service groups in CANopen, though you do have to add some additional processing where a group implements more than one service, like SRDOs. If you need redundant operations or higher bandwidth the dual CAN bus on most STM32s adapts well to CANopen 4 multi-bus operation.

For drivers, if you do your own, implement both RX interrupts to handle CANopen priority messages, such as emergency, SRDO, and global alert. Map the fast response services to RX0 and normal traffic to RX1 queues. One of the more complicated CANopen features is processing out of order message reception to ensure the best response time, especially for heartbeats, hi-rel SRDOs and the global alert. An example is an implementation of multiple motor controllers, one per node, where in an emergency (like the panic button on a conveyor) every motor must stop as soon as possible, to to shut down all motors if one fails. I used the global alert to signal the panic button and SRDOs along with heartbeat to detect single point failures.

Jack Peacock

Ozone
Lead

And www.can-cia.org, which manages the development and CANopen device profiles.

Amel NASRI
ST Employee

Hi @Ravi_STM32​ ,

3 proposals here 🙂 so up to you to select a Best Answer (click on "Select as Best").

-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.