cancel
Showing results for 
Search instead for 
Did you mean: 

what are the necessary configurations needed for can protocol

AGaja
Associate II

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

4 REPLIES 4

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
Up vote any posts that you find helpful, it shows what's working..

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

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
Up vote any posts that you find helpful, it shows what's working..

it is just a transmit code.can u provide me with both transmit and receive