2024-06-02 10:52 PM - last edited on 2024-06-25 04:09 AM by SofLit
I want to receive the MessageRx_CAN [8] in my RxFifo 0 buffer but i cannot get that. Could you please help me out how can i implement that to get if want this requirment.
DLC = 8;
StdId = 0x245;
IDE = CAN_ID_STD;
RTR = CAN_RTR_DATA;
I have attachted my GetRxFifoMessage function part.
Kindly check and correct and resolve my issue asap.
Solved! Go to Solution.
2024-06-25 04:20 AM
Hello @rohitkumarkv07
First, please review our recommendations on how to post a thread on this community. Especially on how to share a source code: https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228.
Second, did you configure filters to receive CAN frames? Even to receive all possible IDs, you need to configure at least one filter for your FIFO0.
Example:
sFilterConfig.FilterMode = CAN_FILTERMODE_IDMASK;
sFilterConfig.FilterScale = CAN_FILTERSCALE_32BIT;
sFilterConfig.FilterIdHigh = 0x0000;
sFilterConfig.FilterIdLow = 0x0000;
sFilterConfig.FilterMaskIdHigh = 0x0000;
sFilterConfig.FilterMaskIdLow = 0x0000;
sFilterConfig.FilterFIFOAssignment = CAN_RX_FIFO0;
sFilterConfig.FilterActivation = ENABLE;
Don't forget to configure the filter bank:
sFilterConfig.FilterBank = <depends on the CAN isntance used>
sFilterConfig.SlaveStartFilterBank = <depends on the CAN isntance used>
Hope it helps.
2024-06-25 04:20 AM
Hello @rohitkumarkv07
First, please review our recommendations on how to post a thread on this community. Especially on how to share a source code: https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228.
Second, did you configure filters to receive CAN frames? Even to receive all possible IDs, you need to configure at least one filter for your FIFO0.
Example:
sFilterConfig.FilterMode = CAN_FILTERMODE_IDMASK;
sFilterConfig.FilterScale = CAN_FILTERSCALE_32BIT;
sFilterConfig.FilterIdHigh = 0x0000;
sFilterConfig.FilterIdLow = 0x0000;
sFilterConfig.FilterMaskIdHigh = 0x0000;
sFilterConfig.FilterMaskIdLow = 0x0000;
sFilterConfig.FilterFIFOAssignment = CAN_RX_FIFO0;
sFilterConfig.FilterActivation = ENABLE;
Don't forget to configure the filter bank:
sFilterConfig.FilterBank = <depends on the CAN isntance used>
sFilterConfig.SlaveStartFilterBank = <depends on the CAN isntance used>
Hope it helps.
2024-06-27 07:55 AM
Hello,
Did you solved your issue? Thank you to get back to us with a feedback...