[Bug] drv_can: RT_CAN_FILTER_STD_INIT和RT_CAN_FILTER_EXT_INIT的mask赋值疑问
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- c
- Domain
- embedded-iot
Research direction
Start by locating the definitions of RT_CAN_FILTER_STD_INIT and RT_CAN_FILTER_EXT_INIT, then inspect how their mask fields are consumed by CAN drivers or hardware backends. Determine whether high bits are intentionally ignored or need limiting to the frame width; done means the behavior is confirmed and the issue's requested clarification or correction is documented.
Written by the indexing model from the issue text.
Description
RT-Thread Version
master
Hardware Type/Architectures
all
Develop Toolchain
Other
Describe the bug
背景
我在阅读 RT_CAN_FILTER_STD_INIT / RT_CAN_FILTER_EXT_INIT 的实现时,注意到 filter 的 mask 被初始化为 0xFFFFFFFF。
我的疑惑
根据 CAN 协议规范:
- 标准帧(STD)ID 为 11 位,有效 mask 应不超过
0x7FF - 扩展帧(EXT)ID 为 29 位,有效 mask 应不超过
0x1FFFFFFF
因此我对 mask 使用 0xFFFFFFFF 有些困惑,想请教一下:
- 这里使用全 1 的 mask 是有意为之吗?如果是,这样设计是出于什么考虑(比如后续会被裁剪、或者硬件会自动忽略高位、或者作为"不过滤"的默认值)?
- 实际生效时,是否由底层驱动或硬件自动将超出位宽的 mask 位截断/忽略?
- 若不会自动截断,这里是否考虑限定为对应帧格式的有效位宽?
感谢!
Other additional context
No response
- Dominant language
- C
- Stars
- 12.4k
- Forks
- 5.5k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 79
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RT-Thread/rt-thread
-
Arch: ARM/AArch64 Doc
Difficulty 1/5 Under an hour Newbie friendliness 90/100
RT-Thread/rt-thread#12082 · 1 comment ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
RT-Thread/rt-thread#11951 · 2 comments ·
Maintainers usually reply within 2 days
-
[Bug] [libc] timer_gettime 拆秒前将总纳秒截断为 uint32_t,剩余时间查询错误May be free again @Yunlk claimed this 28 days ago, and no pull request is open. Openin progress
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
RT-Thread/rt-thread#11924 · 7 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Bug] dfs_v2 tmpfs: ftruncate(fd, 0) frees the file buffer but reports success — use-after-free read/write and double free from a legal POSIX callPossibly taken @remukisama claimed this 33 days ago. Openin progress
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RT-Thread/rt-thread#11902 · 4 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[bsp][stm32][bluepill] README「快速上手」缺少重新生成 MDK 工程这一步,按文档操作无法编译通过May be free again @moment-NEW claimed this 50 days ago, and no pull request is open. Openin progress
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
RT-Thread/rt-thread#11818 · 4 comments · 1 assignee ·
Maintainers usually reply within 2 days
All issues in RT-Thread/rt-thread
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/nuttx-apps#4108 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
trezor/trezor-firmware#8357 ·
Maintainers usually reply within 2 days
-
ivorysql_ora: DBMS_SESSION lacks SLEEP (documented, not covered by #2763)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
good first issue kernel
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
JackFurton/who-would-build-a-kernel-in-java#316 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
PE5PVB/TEF6686_ESP32#970 ·