说明
芯片: STM32C8T6
时钟频率: 36M hz
程序使用举例
CAN_InitStructure.CAN_SJW = CAN_SJW_1tq; //CAN_SJW_1tq - CAN_SJW_4tq
CAN_InitStructure.CAN_BS1 = CAN_BS1_5tq; //CAN_BS1_1tq - CAN_BS1_16tq
CAN_InitStructure.CAN_BS2 = CAN_BS2_3tq; //CAN_BS2_1tq - CAN_BS1_8tq
CAN_InitStructure.CAN_Prescaler = 36; //111K 1-1024
配置表
波特率 kbit/s | CAN_SJW | CAN_BS1 | CAN_BS2 | CAN_Prescaler |
---|---|---|---|---|
2 kbit/s | CAN_SJW_2tq | CAN_BS1_10tq | CAN_BS2_6tq | 1000 |
3 kbit/s | CAN_SJW_2tq | CAN_BS1_6tq | CAN_BS2_4tq | 1000 |
5 kbit/s | CAN_SJW_2tq | CAN_BS1_6tq | CAN_BS2_4tq | 600 |
10 kbit/s | CAN_SJW_1tq | CAN_BS1_3tq | CAN_BS2_2tq | 600 |
20 kbit/s | CAN_SJW_1tq | CAN_BS1_3tq | CAN_BS2_2tq | 300 |
30 kbit/s | CAN_SJW_1tq | CAN_BS1_6tq | CAN_BS2_3tq | 120 |
40 kbit/s | CAN_SJW_1tq | CAN_BS1_3tq | CAN_BS2_2tq | 150 |
50 kbit/s | CAN_SJW_1tq | CAN_BS1_3tq | CAN_BS2_2tq | 120 |
60 kbit/s | CAN_SJW_1tq | CAN_BS1_6tq | CAN_BS2_3tq | 60 |
80 kbit/s | CAN_SJW_1tq | CAN_BS1_3tq | CAN_BS2_2tq | 75 |
90 kbit/s | CAN_SJW_1tq | CAN_BS1_4tq | CAN_BS2_3tq | 50 |
100 kbit/s | CAN_SJW_1tq | CAN_BS1_3tq | CAN_BS2_2tq | 60 |
111 kbit/s | CAN_SJW_1tq | CAN_BS1_5tq | CAN_BS2_3tq | 36 |
125 kbit/s | CAN_SJW_1tq | CAN_BS1_3tq | CAN_BS2_2tq | 48 |
150 kbit/s | CAN_SJW_1tq | CAN_BS1_3tq | CAN_BS2_2tq | 40 |
200 kbit/s | CAN_SJW_1tq | CAN_BS1_3tq | CAN_BS2_2tq | 30 |
250 kbit/s | CAN_SJW_1tq | CAN_BS1_3tq | CAN_BS2_2tq | 24 |
300 kbit/s | CAN_SJW_1tq | CAN_BS1_3tq | CAN_BS2_2tq | 20 |
400 kbit/s | CAN_SJW_1tq | CAN_BS1_5tq | CAN_BS2_3tq | 10 |
500 kbit/s | CAN_SJW_1tq | CAN_BS1_3tq | CAN_BS2_2tq | 12 |
600 kbit/s | CAN_SJW_1tq | CAN_BS1_6tq | CAN_BS2_3tq | 6 |
800 kbit/s | CAN_SJW_1tq | CAN_BS1_5tq | CAN_BS2_3tq | 5 |
900 kbit/s | CAN_SJW_1tq | CAN_BS1_4tq | CAN_BS2_3tq | 5 |
1M kbit/s | CAN_SJW_1tq | CAN_BS1_3tq | CAN_BS2_2tq | 6 |