darrylring opened a new pull request, #21398: URL: https://github.com/apache/nuttx/pull/21398
## Summary CAN controllers keep track of the number of transmit and receive errors and decide when to enter Error Passive or Bus Off states. These counters will be reset during recovery, so a total error counter is also useful. In addition, errors on a CAN FD bus may occur during arbitration or data phases. This adds a CAN ioctl, `CANIOC_GET_ERRORS`, which retrieves the current error counters tracked by the controller as well as error statistics tracked by the driver. SocketCAN already implements something like this. It is currently only implemented for the STM32H5. ## Impact This is primarily a new feature, so has no impact to existing users, but it does also add a couple of error counters to the driver struct and increments them in several locations. This likely adds a few cycles to each CAN transmit/receive. ## Testing This has been tested with internal CAN-enabled test PCBs being put through some CAN stress tests. I will try to work out some ways to demonstrate it. There are no ways to inject errors with CAN in loopback mode on a Nucleo, for example. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
