完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我是新来的FW。有人能给我一些在Linux中提出MCP25625的指针吗?我看到了一些用于MCP2515的Linux驱动程序,我不确定它们是否可以直接移植到MCP25625。非常感谢。谢谢。
以上来自于百度翻译 以下为原文 Hi, I am new to CAN FW. Can someone please give me some pointers to bring up MCP25625 in Linux? I saw some Linux driver for MCP2515 and am not sure if they can be ported to MCP25625 directly. Greatly appreciate. Thanks. |
|
相关推荐
1个回答
|
|
如果数据表所说的“兼容MCP2515”,这将是非常有帮助的。我不知道为什么。这样做会使编程更容易。如果比较MCP2515手册中的表11-2“控制寄存器摘要”和MC25625手册中的表4.2,你会发现它们是相同的。大部分手册的其余部分都有“2515”到“25625”的明显替换。增加了收发信机部分,但似乎就是这样。框图显示“控制器”与收发信机是完全独立的。你甚至必须将RX和TX引脚连接在一起,这是一个MCP2515。告诉Linux,只要您使用的任何Linux都正确地处理SPI总线(并且您在中断中连接),它应该可以正常工作。但波特率可能不高。MCP2515没有缓冲。在消息“n+1”到达之前,必须空消息“N”。在1MBit/sec,最短的消息是50位,所以您只有50个用户接受中断,然后检索消息。它比SPI总线慢,所以中断延迟必须比它短很多。您可以使用BUKT位来加倍,但是之后您将接收到无序的消息。Linux不能保证“实时响应”,并且倾向于在您希望它为硬件提供服务的时候消失在杂草中达数毫秒。如果您的设备有MMC卡、SD卡或USB,那么它可能消失在那些驱动程序中很长一段时间,并导致您丢弃CAN消息。它甚至不能跟上125千比特/秒的CAN。选择一个拥有一个或多个内部CAN控制器加Linux支持的微计算机,汤姆就更好了。
以上来自于百度翻译 以下为原文 It would REALLY be helpful if the Data Sheet said something like "compatible with the MCP2515". I don't know why it doesn't. It would make programming the thing a lot easier. If you compare Table 11-2 "Control Register Summary" in the MCP2515 manual with Table 4.2 in the MCP25625 manual, you'll find they're identical. As is most of the rest of the manual with obvious substitutions of "2515" to "25625". And the addition of the Transceiver section, but that seems to be it. The Block Diagram shows the "controller" is completely separate to the Transceiver. You even have to connect the RX and TX pins together externally. It is an MCP2515. Tell Linux that, and as long as whatever Linux you're using handles the SPI bus properly (and you wire in the interrupts) it should work OK. But probably NOT at high baud rates. The MCP2515 has no buffering. You have to empty message "N" before message "N+1" arrives. At 1MBit/sec the shortest message is 50 bits, so you only have 50us to take the interrupt and then retrieve the message. Which is *SLOW* over an SPI bus, so the interrupt latency has to be a lot shorter than that. You can double this by using the BUKT bit, but then it you will receive messages out of order. Linux can't guarantee "real time response" and tends to disappear off into the weeds for multiple milliseconds at a time when you'd prefer it to be servicing the hardware. If your device has an MMC card, SD card or USB it may disappear into those drivers for a very long time, and cause you to drop CAN messages. It may not even be able to keep up with 125 kbit/sec CAN. You'd be far better off selecting a micro that has one or more internal CAN controllers plus Linux support. Tom |
|
|
|
只有小组成员才能发言,加入小组>>
5128 浏览 9 评论
1984 浏览 8 评论
1914 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3148 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2212 浏览 5 评论
698浏览 1评论
586浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
467浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
603浏览 0评论
495浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-2 18:17 , Processed in 1.190093 second(s), Total 77, Slave 60 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号