cpu/samd5x write can driver
Contribution description
This PR provides the samd5x CPU definition with the CAN controller driver. The driver supports the initialization of the CAN controller, the send/receive operations set/remove filters and the test mode that sets the CAN controller in loop back (listens to the bus as well as the own transmitted messages)
Testing procedure
The PR provides also an application to test the driver using the same54-xpro board. The CAN controller should receive only the messages having a CAN ID matching the filters, and it will send therefore a message as an answer. The bus can be monitored using a PCAN-USB adapter or a logic analyser.
It's been ages since I worked with CAN and RIOT also has changed quite a bit since I last used it, so I probably won't be able to add much.
One question I did have after skimming through the code is: what's up with the separate candev test? The original test (now found in tests/drivers/candev) was meant to be entirely agnostic to the device used. Just specify the CAN device you're using, flash to target, et voila! It works and does the same as it would on another device. This way, it's possible to have several different MCU's with different CAN devices all running the same example while still being able to communicate with each other. I wonder what the reason is for creating a separate test that appears to be doing more or less the same. I would suggest editing the existing test with some preprocessor code to select your same5 driver and change as little as possible aside from that.
Murdock results
:heavy_check_mark: PASSED
9d2dda27ce1a72b22fd80d59abca3dea958235e9 Merge branch 'master' into cpu/samd5x-write-CAN-driver
| Success | Failures | Total | Runtime |
|---|---|---|---|
| 10026 | 0 | 10027 | 11m:28s |
Artifacts
Changes based on #19964 The test app does not work correctly currently, DO NOT MERGE until I fix it. Problem is when the shell is integrated the interrupts do not get triggered for some reason, and thus the reception of the CAN frame by the SAMD5x is not successful. However, switching the shell to an infinite loop makes the driver work as expected
you may squash your fix, fixup, minor changes commits up to this point
some of your commit message titles are too long
please squash cpu/samd5x: add copyright and descriptive comments
into the commits that are creating the file
I will make a commits cleanup after the next round of reviewing
please squash your last 4 commits where they belong and put
some where before them (the commit title needs area of work)
other than that this is good to go
if you like to you may rebase on master ( not required
:tada: