TWAI Acceptance Filter

Martin Schultz
Posts: 4
Joined: Wed Jul 07, 2021 11:09 am

TWAI Acceptance Filter

Postby Martin Schultz » Thu Mar 23, 2023 11:01 am

Hello, can anyone help me with a code example that shows how to use the acceptance mask in TWAI communication?

https://docs.espressif.com/projects/esp ... ance_maskE

According to this link it is possible to use it, but it does not show any code on how to apply this in practice.

I would like to filter CAN messages and only receive from two specific addresses.

lbernstone
Posts: 828
Joined: Mon Jul 22, 2019 3:20 pm

Re: TWAI Acceptance Filter

Postby lbernstone » Fri Mar 24, 2023 5:12 am

See the technical reference manual sec 21.5.6 about the acceptance filter. There's two masks- one an xnor and one an or, that will be applied to the message to determine if it qualifies for acceptance.
https://www.espressif.com/en/support/do ... %5B%5D=492

Who is online

Users browsing this forum: No registered users and 66 guests