Skip to content

CAN communication module #27

Description

@najirod02

Description:

The CAN communication module should allow the user to easily send and receive any CAN frame from any CAN peripheral enabled.
In particular, a queue needs to be used so that even in the presence of multiple frames, each of them is stored until the ECU can consume them. For this last reason, PAL might already solve it.

Implementation steps:

  1. Define the basic APIs the user requires
  2. Verify how the PAL's queue can be used to store multiple CAN frames from different CAN perpherals.
  3. Allow the possiility to add specific logic within the reception of CAN frames (e.g call a setter of another module).

Dependencies:

PAL surely is needed as it already abstracts the lower hw used and manages an internal buffer.

Canlib is also required as it provides the deserialization functions based on the frame received.

Additional notes:

Make sure it is possible to both send and receive as well as allow to use custom logic to react based on the frame received.

When a CAN interrupt is received, add the message into the PAL buffer. This should be the only action taken within the interrupt.

At the end of any state, make sure to clear the entire buffer in order to process any message received.

Insertion can be made anytime within any state but the actual transmition should be done only at the end of each state as within a state multiple messages might be sent.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions