Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

If a task wants to receive a CAN frame, the function CanBusRead() must be called. The following steps will be performed:

  1. With the receive complete interrupt of the CAN controller, the function CanBusRxHandler() shall be activated.
  2. The handler uses the low level device driver function Read() to get the CAN frame from CAN controller.
  3. The CAN frame will be copied to the internal can receive queue.
  4. CANOS_PostRxFrame is called to indicated the new received frame and the handler exits.

Asynchronous to this actions, a task can wait for CAN frames:

  1. The function is CanBusRead() pending on the receive semaphore with the configured timeout. The timeout must be set with CanBusIoCtl() CANBUS_SET_RX_TIMEOUT.
  2. If a CAN frame is received within the timeout, the content will be copied to the given. In this case the function exists normally. If a timeout is detected, the function exits with an error code.
  • No labels