AnsweredAssumed Answered

CAN message reception without callbacks

Question asked by Timo Wedde-Ramola on May 24, 2018
Latest reply on May 28, 2018 by T J

Hi All,


I am currently developing an application using CAN1 with CMSIS driver on a STM32F413 controller. As the reception of CAN messages is not so time critical like other parts in the application, I wanted to poll manually for new messages by calling MessageRead(). The Callback functions are NULL.


Now, after the third reception of my message, the CAN controller does not stop "receiving" the message until I entirely power off my hardware and restart.


When I register an ObjectEvent callback and do a MessageRead() in there, everything works as expected, but I wanted to avoid having interrupts in my program flow. I get, that obviously it has to do with the RFOM register, but don't see, what is the difference between trying to read a message cyclic or read it after I have been informed about a new reception.


In the CMSIS documentation there is written the callbacks may be NULL. But is it intended at all to receive messages when no callbacks are registered? Or am I "forced" to use the callbacks when I don't want to dismiss incoming messages?


Many thanks in advance,