Skip to content

Convert CO_driver error handling to error_cb based implementation #27

@heliochronix

Description

@heliochronix

Implement the CO_CANerr_cb() method of setting and clearing CAN error status flags in CANopenNode. This method will replace the cyclic call of CO_CANmodule_process() in the CO NMT processing thread (aka the main thread) which basically checks the status of CAN all the time manually.

The challenge is we need to either ensure the callback triggers when errors are cleared, or have some other way of indicating that errors have cleared so we can unset the CO error flags. I'm not sure if the interrupt for CAN errors triggers on any change of state or only when an error occurs. If it's the latter, then the error callback will not trigger when things clear, and so the CANopen code will always think we are in an error state.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions