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
It seems that, CMSIS-Driver Version 2.04 Driver API for CAN Bus Peripheral (Driver_CAN.h) wants to use one driver for all the various CAN Bus Peripheral, so it has to create a lot of abstraction layers.
And it seems that the users of CMSIS-Driver don't know or don't need to know what kind of CAN Bus Peripheral they are using, so they just ask the CAN Bus Peripheral "What are your capabilities?"
Based on the answers, the software goes different routes.
If my understanding is correct, then it is really something magical.
Magic and High-tech are the same thing to me, if needed, I would be glad to use them, but would not try to understand them.