This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CAN in STR910

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.

Parents
  • Hello,

    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.

Reply
  • Hello,

    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.

Children