Skip to main content
AGaja
Associate II
January 22, 2019
Question

what are the necessary configurations needed for can protocol

  • January 22, 2019
  • 4 replies
  • 1074 views

i had intialized can1 and can2 of my stm board but after writtingthe whole code only transmission of messages is happening on both the boards but not the receiving.but when iused one board for transmission and one for reception its working properly.so what should i do

This topic has been closed for replies.

4 replies

Tesla DeLorean
Guru
January 22, 2019

I'm not using CubeMX so can't help you with that.

CAN reception will depend on Filter setting, CAN2 would typically needs those in the 14-27 range.

The CAN bus would need the correct baud/bit rate, presumably as you're transmitting you have something successfully acknowledging packets, and you've validated that functionality.

Perhaps review the HAL examples for your particular STM32 and board combination. I'd be more specific, but have no idea what you're using.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
AGaja
AGajaAuthor
Associate II
January 22, 2019

Can u provide me the basic transmit and receive code of can protocol​

Tesla DeLorean
Guru
January 22, 2019

For the F4 I've posted working SPL based code for the RedDragon F407

board, which supports CAN1 and CAN2 together.

https://community.st.com/s/question/0D50X00009XkiDZSAZ/canbus-error

The post from Posted on May 13, 2014 at 21:21 was somewhat mauled by the last forum transition.

See also HAL examples, ie

STM32Cube_FW_F4_V1.21.0\Projects\STM324xG_EVAL\Examples\CAN\CAN_Networking

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..