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_MessageRead without the use of Event

Dear all,

I am trying to use CAN_MessageRead from CAN driver (CMSIS Driver 2.3) but as I have to introduce that to students, I would like to make it as easy as possible. Thus, I don't want to use the Callback function first, but instead I place the CAN receive function directly in the infinite loop of the main (another CAN node send the data each 100ms). The problem is that the CAN_MessageRead function is non-blockling, and always returns me 4 (the max number of data I have asked for), even if no new CAN message has arrived.
My question is: is there a way to "wait" for new received message with this function before going on to work with the nex data arrived ?
Thank you.
Best regards,
Xavier

Parents
  • That mostly depends on hardware and driver implementation, if you require that functionality then you can edit driver to work in the way you want it to.
    Basically, in real system that way of catching CAN messages would be CPU consuming, and also power consuming and all other, which does not make sense.
    How much more complexity does it take to explain callback function and implementation of it.

Reply
  • That mostly depends on hardware and driver implementation, if you require that functionality then you can edit driver to work in the way you want it to.
    Basically, in real system that way of catching CAN messages would be CPU consuming, and also power consuming and all other, which does not make sense.
    How much more complexity does it take to explain callback function and implementation of it.

Children