TWAI ACCEPTANCE CODE differences in soft and hardware documentation

User avatar
MacWyznawca
Posts: 4
Joined: Sun Apr 09, 2017 6:22 am

TWAI ACCEPTANCE CODE differences in soft and hardware documentation

Postby MacWyznawca » Sun Sep 26, 2021 7:42 am

I found big differences in the documentation of "TWAI ACCEPTANCE CODE" when using two masks. The SDK documentation says that both masks also filter after 4 bits from the first byte of the standard frame. However, the hardware documentation says that the first mask filters the whole byte, the second only the id. Who is right?
Zrzut ekranu 2021-09-26 o 09.41.19.png
Zrzut ekranu 2021-09-26 o 09.41.19.png (827.7 KiB) Viewed 1759 times
Jaromir K. Kopp (@MacWyznawca)
Deputy editor-in-chief. Soft & Hardware, iOS, HomeKit and macOS Divisions
Mój Mac (ISSN 2392-3156) <www.mojmac.pl> <www.prosteporadniki.pl>

ESP_Dazz
Posts: 308
Joined: Fri Jun 02, 2017 6:50 am

Re: TWAI ACCEPTANCE CODE differences in soft and hardware documentation

Postby ESP_Dazz » Mon Sep 27, 2021 3:05 am

@MacWyznawca Both are right.
The SDK documentation says that both masks also filter after 4 bits from the first byte of the standard frame.
The SDK diagram indicates that two 4-bits being filtered are bits [0:3] and bits [4:7] of the data byte for filter 1 only

Also note, the SDK filter is not a one to one map to the register. The driver does a bswap32() in between.

User avatar
MacWyznawca
Posts: 4
Joined: Sun Apr 09, 2017 6:22 am

Re: TWAI ACCEPTANCE CODE differences in soft and hardware documentation

Postby MacWyznawca » Mon Sep 27, 2021 4:08 pm

Ah, I didn't notice in the SDK that it was about the same byte. Thank you.
Jaromir K. Kopp (@MacWyznawca)
Deputy editor-in-chief. Soft & Hardware, iOS, HomeKit and macOS Divisions
Mój Mac (ISSN 2392-3156) <www.mojmac.pl> <www.prosteporadniki.pl>

Who is online

Users browsing this forum: Baidu [Spider] and 120 guests