2018-03-29 03:41 AM
Hello, I have a problem. when I use CAN1, I can receive data, but when ı use CAN2, I can not receive. why ?
2018-03-29 03:52 AM
Hello Kadir,
Two ideas come to my mind.
One reason of your issue could be wrong confuguration of CAN filtering. Please refer to
https://community.st.com/0D50X00009XkWoMSAV
, which describes similar problem.Second reason is related to relationship between CAN1 and CAN2. They share some common resources, which are managed by CAN1 always. As a result in order to use CAN2, at least clock for CAN1 has to be enabled. Please make sure that your code calls a function for CAN1 clock enabling.
Regards
Szymon
2018-03-29 06:13 AM
thank you for explain. at project, ı use CAN2 only.
2018-03-29 06:15 AM
CAN2 FÄ°TER config :
CAN2_Filter.FilterBank = 14; CAN2_Filter.FilterMode = CAN_FILTERMODE_IDMASK; CAN2_Filter.FilterScale = CAN_FILTERSCALE_32BIT; CAN2_Filter.FilterIdHigh = 0x0000; CAN2_Filter.FilterIdLow = 0x0000; CAN2_Filter.FilterMaskIdHigh = 0x0000; CAN2_Filter.FilterMaskIdLow = 0x0000; CAN2_Filter.FilterFIFOAssignment = CAN_FILTER_FIFO0; CAN2_Filter.FilterActivation = ENABLE; CAN2_Filter.SlaveStartFilterBank = 0;