STM32C8T6 CAN常见波特率配置表


说明

芯片: 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/sCAN_SJWCAN_BS1CAN_BS2CAN_Prescaler
2 kbit/sCAN_SJW_2tqCAN_BS1_10tqCAN_BS2_6tq1000
3 kbit/sCAN_SJW_2tqCAN_BS1_6tqCAN_BS2_4tq1000
5 kbit/sCAN_SJW_2tqCAN_BS1_6tqCAN_BS2_4tq600
10 kbit/sCAN_SJW_1tqCAN_BS1_3tqCAN_BS2_2tq600
20 kbit/sCAN_SJW_1tqCAN_BS1_3tqCAN_BS2_2tq300
30 kbit/sCAN_SJW_1tqCAN_BS1_6tqCAN_BS2_3tq120
40 kbit/sCAN_SJW_1tqCAN_BS1_3tqCAN_BS2_2tq150
50 kbit/sCAN_SJW_1tqCAN_BS1_3tqCAN_BS2_2tq120
60 kbit/sCAN_SJW_1tqCAN_BS1_6tqCAN_BS2_3tq60
80 kbit/sCAN_SJW_1tqCAN_BS1_3tqCAN_BS2_2tq75
90 kbit/sCAN_SJW_1tqCAN_BS1_4tqCAN_BS2_3tq50
100 kbit/sCAN_SJW_1tqCAN_BS1_3tqCAN_BS2_2tq60
111 kbit/sCAN_SJW_1tqCAN_BS1_5tqCAN_BS2_3tq36
125 kbit/sCAN_SJW_1tqCAN_BS1_3tqCAN_BS2_2tq48
150 kbit/sCAN_SJW_1tqCAN_BS1_3tqCAN_BS2_2tq40
200 kbit/sCAN_SJW_1tqCAN_BS1_3tqCAN_BS2_2tq30
250 kbit/sCAN_SJW_1tqCAN_BS1_3tqCAN_BS2_2tq24
300 kbit/sCAN_SJW_1tqCAN_BS1_3tqCAN_BS2_2tq20
400 kbit/sCAN_SJW_1tqCAN_BS1_5tqCAN_BS2_3tq10
500 kbit/sCAN_SJW_1tqCAN_BS1_3tqCAN_BS2_2tq12
600 kbit/sCAN_SJW_1tqCAN_BS1_6tqCAN_BS2_3tq6
800 kbit/sCAN_SJW_1tqCAN_BS1_5tqCAN_BS2_3tq5
900 kbit/sCAN_SJW_1tqCAN_BS1_4tqCAN_BS2_3tq5
1M kbit/sCAN_SJW_1tqCAN_BS1_3tqCAN_BS2_2tq6

根据引用\[1\]和引用\[2\]的内容,可以看出stm32c8t6上有多个串口可供使用,其中USART2是其中一个串口。根据引用\[1\]中的描述,USART2的引脚分别为TX(A2)和RX(A3)。因此,要配置stm32c8t6的USART2串口通信,可以使用以下步骤: 1. 在代码中包含头文件"MYUSART.h",该头文件定义了USART相关的函数和变量。 2. 调用MyUSART_Init函数来初始化USART2串口,传入波特率参数。 3. 使用MyUSART_SendByte函数发送单个字节的数据。 4. 使用MyUSART_SendArray函数发送一个字节数组。 5. 使用MyUSART_SendString函数发送一个字符串。 通过以上步骤,可以配置stm32c8t6的USART2串口通信。 #### 引用[.reference_title] - *1* [【stm32c8t6多个串口同时使用】](https://blog.csdn.net/boybs/article/details/124418383)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [STM32学习笔记(四)串口配置stm32c8t6)](https://blog.csdn.net/RobertPeiGen/article/details/128497508)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [基于STM32C8T6F103实现串口通信](https://blog.csdn.net/weixin_52805078/article/details/127289150)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值