Hello,
I have a question around the ST CAN library. There is a function called GetFreeIF with this code:
static u32 GetFreeIF(void) { if ((CAN->sMsgObj[0].CRR & CAN_CRR_BUSY) == 0) return 0; else if ((CAN->sMsgObj[1].CRR & CAN_CRR_BUSY) == 0) return 1; else return 2; }
I donÂ't understand. Why canÂ't I have, for example, 5 receive and 10 send objects? The function is reduced to exist only two send/receive objects.
The direct access to the message buffers is not possible. You have to use the Interfaces IF1 and IF2. This is, what the function returns.
Have a look e.g. in the Bosch C_CAN manual. bye Steffen
Thaks for your answer.
I have read C_CAN manual but I can't understand good how CAN peripheral works. Imagine that I need that my CPU recives five different message IDs and send four different message IDs. Where I must define this messages objects?
Thanks in advance.
OK. I think that I have understood how CAN peripheral works in this micro.
Thanks.