Skip to content

Commit 0392e8d

Browse files
committed
docs(stm32/can): add default filter and FIFO mapping section for CAN and CAN FD
1 parent 3092a92 commit 0392e8d

File tree

2 files changed

+32
-0
lines changed
  • docs/code_gen/stm32
  • i18n/en/docusaurus-plugin-content-docs/current/code_gen/stm32

2 files changed

+32
-0
lines changed

docs/code_gen/stm32/can.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@ sidebar_position: 10
88

99
LibXR 支持标准 CAN 和 CAN FD。在 STM32CubeMX 中需要启用相应的外设和中断,并至少为标准帧和扩展帧分配一个过滤器。
1010

11+
## 默认过滤器与FIFO配置
12+
13+
LibXR会为每个CAN/CANFD的标准帧和扩展帧各配置一个默认过滤器,允许所有数据帧通过。
14+
15+
对于不同CAN/CANFD数量的平台,FIFO的配置如下:
16+
17+
| 经典CAN | CAN1 | CAN1+CAN2 | CAN1+CAN2+CAN3 |
18+
| ------- | ---- | --------- | -------------- |
19+
| FIFO0 | CAN1 | CAN1 | CAN1+CAN2 |
20+
| FIFO1 | N/A | CAN2 | CAN3 |
21+
22+
| CAN FD | CANFD1 | CANFD1+CANFD2 | CANFD1+CANFD2+CANFD3 |
23+
| ------ | ------ | ------------- | -------------------- |
24+
| FIFO0 | CANFD1 | CANFD1 | CANFD1 |
25+
| FIFO1 | N/A | CANFD2 | CANFD2+CANFD3 |
26+
1127
## 示例
1228

1329
第二个参数表示发送队列大小,用于缓冲待发送的数据帧。

i18n/en/docusaurus-plugin-content-docs/current/code_gen/stm32/can.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@ sidebar_position: 10
88

99
LibXR supports both standard CAN and CAN FD. You need to enable the respective peripherals and interrupts in STM32CubeMX, and allocate at least one filter for both standard and extended frames.
1010

11+
## Default Filters and FIFO Configuration
12+
13+
LibXR configures one default filter for each CAN/CAN FD controller, separately for standard and extended frames, allowing all data frames to pass through.
14+
15+
The FIFO configuration for different numbers of CAN/CAN FD controllers is as follows:
16+
17+
| Classic CAN | CAN1 | CAN1+CAN2 | CAN1+CAN2+CAN3 |
18+
| ----------- | ---- | --------- | -------------- |
19+
| FIFO0 | CAN1 | CAN1 | CAN1+CAN2 |
20+
| FIFO1 | N/A | CAN2 | CAN3 |
21+
22+
| CAN FD | CANFD1 | CANFD1+CANFD2 | CANFD1+CANFD2+CANFD3 |
23+
| ------ | ------ | ------------- | -------------------- |
24+
| FIFO0 | CANFD1 | CANFD1 | CANFD1 |
25+
| FIFO1 | N/A | CANFD2 | CANFD2+CANFD3 |
26+
1127
## Example
1228

1329
The second parameter represents the transmission queue size, which buffers outgoing messages.

0 commit comments

Comments
 (0)