完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
rt_size_t can_sendmsg(uint8_t *data) rt_memcpy(msg.data, data, sizeof(msg)); rt_device_write的返回值为0,有哪位大神可以解答一下 |
|
相关推荐
3个回答
|
|
产品从FreeRTOS移植到RTT上,遇到问题了,感觉RTT的can驱动问题很多啊dizzy
|
|
|
|
已经找到问题了,drv_can.c中默认的can波特率配置中BS1 BS2设置的不对,修改后就可以了
|
|
|
|
static const struct stm32_baud_rate_tab can_baud_rate_tab[] =
{ // {CAN1MBaud, (CAN_SJW_2TQ | CAN_BS1_9TQ | CAN_BS2_5TQ | 3)}, // {CAN800kBaud, (CAN_SJW_2TQ | CAN_BS1_8TQ | CAN_BS2_5TQ | 4)}, // // {CAN500kBaud, (CAN_SJW_2TQ | CAN_BS1_9TQ | CAN_BS2_5TQ | 6)}, // {CAN250kBaud, (CAN_SJW_2TQ | CAN_BS1_9TQ | CAN_BS2_5TQ | 12)}, // {CAN125kBaud, (CAN_SJW_2TQ | CAN_BS1_9TQ | CAN_BS2_5TQ | 24)}, // {CAN100kBaud, (CAN_SJW_2TQ | CAN_BS1_9TQ | CAN_BS2_5TQ | 30)}, // {CAN50kBaud, (CAN_SJW_2TQ | CAN_BS1_9TQ | CAN_BS2_5TQ | 60)}, // {CAN20kBaud, (CAN_SJW_2TQ | CAN_BS1_9TQ | CAN_BS2_5TQ | 150)}, //// {CAN10kBaud, (CAN_SJW_2TQ | CAN_BS1_9TQ | CAN_BS2_5TQ | 300)} {CAN1MBaud, (CAN_SJW_2TQ | CAN_BS1_6TQ | CAN_BS2_7TQ | 3)}, {CAN800kBaud, (CAN_SJW_2TQ | CAN_BS1_6TQ | CAN_BS2_7TQ | 4)}, {CAN500kBaud, (CAN_SJW_2TQ | CAN_BS1_6TQ | CAN_BS2_7TQ | 6)}, {CAN250kBaud, (CAN_SJW_2TQ | CAN_BS1_6TQ | CAN_BS2_7TQ | 12)}, {CAN125kBaud, (CAN_SJW_2TQ | CAN_BS1_6TQ | CAN_BS2_7TQ | 24)}, {CAN100kBaud, (CAN_SJW_2TQ | CAN_BS1_6TQ | CAN_BS2_7TQ | 30)}, {CAN50kBaud, (CAN_SJW_2TQ | CAN_BS1_6TQ | CAN_BS2_7TQ | 60)}, {CAN20kBaud, (CAN_SJW_2TQ | CAN_BS1_6TQ | CAN_BS2_7TQ | 150)}, {CAN10kBaud, (CAN_SJW_2TQ | CAN_BS1_6TQ | CAN_BS2_7TQ | 300)} |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
788 浏览 0 评论
4271 浏览 0 评论
如何使用python调起UDE STK5.2进行下载自动化下载呢?
2529 浏览 0 评论
开启全新AI时代 智能嵌入式系统快速发展——“第六届国产嵌入式操作系统技术与产业发展论坛”圆满结束
2929 浏览 0 评论
获奖公布!2024 RT-Thread全球巡回线下培训火热来袭!报名提问有奖!
31479 浏览 11 评论
72925 浏览 21 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 18:12 , Processed in 0.697744 second(s), Total 74, Slave 57 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号