2020-12-14 05:20 AM
Hi, I want to use both CAN1 and CAN2 for my application with 500kbps and 125kbps speeds respectively. I have initialized both of them as per my requirements using HAL. Where in Tx is implemented in polling and Rx in interrupts. CAN1 Tx and Rx working perfect. Coming to CAN2 Tx is working and Rx is not working. Interrupt itself is not firing up for CAN2 Rx (HAL_CAN_RxFifo0MsgPendingCallback is not being called). I've read in datasheet that some SRAM sharing process is happening between 2 CANs. I'm unable to comprehend that. Is that an issue?
I'm attaching the code also. Please check and help!
Solved! Go to Solution.
2023-06-02 07:32 AM
If you want to use CAN2, you have to enable CAN1 clock even if it will be not used. CAN1 APB clock should be enabled since CAN1 instance is a master from peripheral integration point of view and it manages the filtering part.
Regarding the filtering management between CAN1 and CAN2, I invite you to have a look at this thread:
Hope it helps.