完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,
我正在开发一些CAN通信项目,它允许我们控制从一个其他节点连接到一个节点的一些外部设备。 由于CAn总线是广播网络,因此节点发送的消息将由总线上的每个其他CAn节点接收。 我的要求是我需要为节点实现过滤机制,以便节点只对那些接收到的消息起作用 为其配置(使用一些GUI实用程序)。所以我需要在我的代码中实现这个过滤机制。我正在使用STM8SAF52Ax mcu IAR嵌入式工作台作为开发环境。 我怎么能实现can消息的过滤过程。我也做了网络搜索和阅读许多其他教程,但我仍然无法弄清楚要做什么。有使用CAN过滤器Id和过滤器掩码,但我无法确定要在这些值中加载什么值以及如何计算这些值。 请提供一些教程或任何解释或一些示例。 谢谢 阿米特库马尔 Email-amitkrv22@outlook.com #becan#can-message-filtering 以上来自于谷歌翻译 以下为原文 Hi all, I am working on some CAN communication project which allows us to control some external device attached to one node from some other node. Since the CAn bus is a broadcast network and hence a message sent by a node will be received by every other CAn node on the bus. My requirement is that i need to implement a filteration mechanism for the nodes so that a node will only act upon those received messages for which it is configured(using some GUI utility). So i need to implement this filter mechanism in my code.I am using STM8SAF52Ax mcu with IAR embedded workbench as developement enviornment. How could i implement this filter process of can messages.I also did web search and read many other tutorials but still i am unable to figure out what to be done. There are use of CAN filter Id and filter mask but i am unable to decide what value to be loaded in these and how to calculate these values. Please suggest some tutorials or any explanations or some examples. Thanks Amit Kumar Email-amitkrv22@outlook.com #becan #can-message-filtering |
|
相关推荐
1个回答
|
|
我希望它类似于STM32实现。即顶部11位是ID,假设传输顺序为位,高位优先。
您可以查看这些以及您的参考资料。 [死链接/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32%20CAN%20acceptance%20mask&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=79]https:/ /my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32%20CAN%20acceptance%20mask&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=79 [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/STM32F4%20-%20can%20bus%20Id%20filters%20configuration&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21& currentviews = 135] https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Java%2FSTM32F4%20%2D%20can%20bus %20Id%20filters%20configuration&安培; FolderCTID =0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21¤tviews= 135 以上来自于谷歌翻译 以下为原文 I expect it is similar to the STM32 implementation. ie top 11 bit are the ID, assuming bits in transmission order, high order first. You could review these, and the reference material for your part. [DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32%20CAN%20acceptance%20mask&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=79]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32%20CAN%20acceptance%20mask&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=79 [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/STM32F4%20-%20can%20bus%20Id%20filters%20configuration&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21¤tviews=135]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Java%2FSTM32F4%20%2D%20can%20bus%20Id%20filters%20configuration&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21¤tviews=135 |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2642 浏览 1 评论
3208 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1783 浏览 1 评论
3611 浏览 6 评论
5988 浏览 21 评论
939浏览 4评论
1316浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
584浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1303浏览 3评论
1359浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-24 04:15 , Processed in 0.713752 second(s), Total 76, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号