Nucleo -f429zi-144 with CAN communication

Dear Nada,

  • CAN::reset() will reset the CAN controller to the default settings (500kHz?). So if you want to set the frequency to 1MHz, you must to do it after the reset call, not before.
  • I don’t think you need one EventQueue for each object. You can refer few tasks to one instance of EventQueue.
  • Your queue.call_every(500, send) is OK like that.
    On the other hand the queue_1.call_every(500, receive) is wrong. You can not timing the receiving of a message, the flow must be free.
    You have two options for receive a message:
    1. Polling - call the CAN::read() in a while loop (in the main or another thread) like is it in the official example
    2. Interrupts - CAN::attach() and use it like was descripted by Zoltan here and probably add this setting.

BTW, do you have already connected the Nucleo to the LPC or it is still loopback on one board?

BR, Jan