Implement some CAN modes for the LPC1549/LPC11Cxx/LPC1768 #1059
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.
I've partially implemented the can_mode HAL functions for the LPC1549/LPC11Cxx and LPC1768 platforms.
On the LPC1549/LPC11Cxx which use the C_CAN controller, I've implemented everything except for GlobalTest mode. On the LPC1768, I implemented everything except for GlobalTest mode and SilentTest mode. Based on my preliminary testing, I'm not sure if it's possible to do SilentTest mode, but it's not entirely obvious what is required of SilentTest mode. Is there official API documentation describing what the behavior is expected for each mode?
As LocalTest mode is substantially new, I've added an automated test case, MBED_A27, which does a simple loopback test that verifies it sees the messages it sends out. It only requires that a CAN transceiver is wired up to the controller with appropriate termination resistors.
I've tested the code against the LPC1549Xpresso and mbed-LPC1768 using GCC_ARM to build the tests.