Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpu/samd5x write can driver #19736
cpu/samd5x write can driver #19736
Changes from all commits
3eeac98
e4e5558
477f9cd
a40735a
01782e8
74bf01b
491a1cd
16cfaab
568d607
9d2dda2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this could have a name like CAN_TRANSCEIVER_STBY..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AT6561 is the CAN transceiver name. I followed the naming of the other components defined in the board
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure but the name is not relevant - you want to use a generic name so the test app where you are using it can be generic too.
On a second note, shouldn't that pin be handled by the driver in the first place?
Only the CAN driver would know when to put the transceiver into standby mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably is the application that knows best how to handle the standby pin if it exists (or at least it is up to the board) the standby pin is often usable to stay silent on the bus but still receive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we have
CANOPT_STATE_SLEEP
/CANOPT_STATE_LISTEN_ONLY
for that. When set, the driver should put the transceiver into standby mode - not the application.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
someone might use two can controllers that the samd5 has, each of them has a transceiver -> this would add another element to
can_conf_t
, but such an addition would not cover the varianz of can transceivers not all boards have a standby, some transceivers have extra configuration like slop rate (spi or i2c), i don't think we should add a traciever driver into the can driver and adding even a simple one might lead therealso not all transcievers have this monitor in standby feature ( might have another name in that case like sleep)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://e2e.ti.com/support/interface-group/interface/f/interface-forum/755985/tcan1042-q1-difference-between-silent-mode-and-standby-mode
seems like for that transceiver standby isn't as transparent (listen only would not work with that, for other transceivers it might, more like silent by TI definition)
maybe the
can_trx
driver interface should be used for that (driver/tja1042 seems to have a standby pin)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you might want to align this line with the other defines in the file