mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
Merge branch 'bugfix/can_driver_multiple_bugs' into 'master'
CAN: Add pm_lock, fix gpio bug, update docs See merge request idf/esp-idf!3138
This commit is contained in:
@@ -574,6 +574,23 @@ use of the :cpp:func:`can_stop` and :cpp:func:`can_driver_uninstall` functions.
|
||||
return;
|
||||
}
|
||||
|
||||
Multiple ID Filter Configuration
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The acceptance mask in :cpp:type:`can_filter_config_t` can be configured such that
|
||||
two or more IDs will be accepted for a single filter. For a particular filter to
|
||||
accept multiple IDs, the conflicting bit positions amongst the IDs must be set
|
||||
in the acceptance mask. The acceptance code can be set to any one of the IDs.
|
||||
|
||||
The following example shows how the calculate the acceptance mask given multiple
|
||||
IDs::
|
||||
|
||||
ID1 = 11'b101 1010 0000
|
||||
ID2 = 11'b101 1010 0001
|
||||
ID3 = 11'b101 1010 0100
|
||||
ID4 = 11'b101 1010 1000
|
||||
//Acceptance Mask
|
||||
MASK = 11'b000 0000 1101
|
||||
|
||||
Application Examples
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -581,19 +598,19 @@ Application Examples
|
||||
**Network Example:** The CAN Network example demonstrates communication between
|
||||
two ESP32s using the CAN driver API. One CAN node acts as a network master initiate
|
||||
and ceasing the transfer of a data from another CAN node acting as a network slave.
|
||||
The example can be found via :example:`examples/peripheral/can/can_network`.
|
||||
The example can be found via :example:`peripherals/can/can_network`.
|
||||
|
||||
**Alert and Recovery Example:** This example demonstrates how to use the CAN driver's
|
||||
alert and bus recovery API. The example purposely introduces errors on the CAN
|
||||
bus to put the CAN controller into the Bus-Off state. An alert is used to detect
|
||||
the Bus-Off state and trigger the bus recovery process. The example can be found
|
||||
via :example:`examples/peripheral/can/can_alert_and_recovery`.
|
||||
via :example:`peripherals/can/can_alert_and_recovery`.
|
||||
|
||||
**Self Test Example:** This example uses the No Acknowledge Mode and Self Reception
|
||||
Request to cause the CAN controller to send and simultaneously receive a series
|
||||
of messages. This example can be used to verify if the connections between the CAN
|
||||
controller and the external transceiver are working correctly. The example can be
|
||||
found via :example:`examples/peripheral/can/can_self_test`.
|
||||
found via :example:`peripherals/can/can_self_test`.
|
||||
|
||||
|
||||
.. ---------------------------- API Reference ----------------------------------
|
||||
|
Reference in New Issue
Block a user