2019-01-21 04:19 PM
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
2019-01-21 04:39 PM
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.
2019-01-21 04:44 PM
Can u provide me the basic transmit and receive code of can protocol
2019-01-21 06:07 PM
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
2019-01-21 10:28 PM
it is just a transmit code.can u provide me with both transmit and receive