好的 - 现在有一些细节 - 可能有人可以指出发生了什么。
我有一个设置,我有8个CAN通道都循环。
总线正确终止,因为我可以在所有8个通道上发送和接收CAN消息而不会出现问题。
我想测试验收滤波,所以我已阅读Xilinx Logicore IP CAN文档并遵循它。
以下是这种情况:我只想接收与CAN ID匹配的通道2上的CAN消息:0x00F1BF00。
我将使用的掩码是0x00FFFF00。
因此,当我填写AFMR1寄存器用于通道2(第一个接收过滤器掩码)时,根据文档,第1位指定远程传输请求,然后位1-18指示扩展消息ID,然后位19指示是否仅通过
标准或扩展帧,然后是位20,表示替代远程传输请求掩码,后跟位21-31,它是标准消息ID掩码。
我强制为0,19和20位零,所以我执行指定位移后的最终AFMR1掩码为:0x07E7FE00。
然后AFIR1(通道2的第一个接收滤波器IDRegister)设置相同,位0,19和20也被强制为零,因此执行指定位移后的最终AFIR1值为:0x07837E00。
此时,我通过将AFR(验收滤波器寄存器)的位0设置为通道2的1来启用通道2的滤波器。现在我通过发送具有不同CAN ID的CAN消息来测试滤波器 - 这是我正在目击的
:
发送CAN ID为0x00FEBF00的CAN消息会导致通道2无法接收消息(这是正确的)。
发送CAN ID为0x00F1BF00的CAN消息会导致通道2接收消息(这是正确的)。
发送CAN ID为0x00F2BF00的CAN消息会导致通道2收到消息(这是不正确的)
发送CAN ID为0x00F3BF00的CAN消息会导致通道2收到消息(这是不正确的)
发送CAN ID为0x00F4BF00的CAN消息会导致通道2未收到消息(这是正确的)。
我还测试了F5BF,F6BF,F7BF,F8BF,F9BF,FABF,所有这些都导致通道2没有收到消息(这一切都是正确的)。
那么......当发送CAN ID 0x00F2BF00和CAN ID 0x00F3BF00时,通道2如何接收CAN消息?
显然(在这些情况下),如果我对接受过滤器ID应用MASK并对传入的CAN ID应用Mask并将结果相互比较,则它们不匹配...所以为什么通道2在接收消息时
使用这些ID?
有人可以帮我理解吗?
我们正在尝试运送一个生产质量的CAN模块,我被这种过滤异常所困扰。
提前感谢您提供的任何见解。
以上来自于谷歌翻译
以下为原文
OK - Now for some nitty gritty details - perhaps someone can point out what is going on. I have a setup where I have 8 CAN channels that are all looped. The bus is properly terminated as I am able to send and receive CAN messages across all 8 channels without issue. I wanted to test the Acceptance filtering so I have read the Xilinx Logicore IP CAN documentation and followed it. Here is the situation: I want to only accept CAN messages on channel 2 that match the CAN ID: 0x00F1BF00. The mask I will be using is 0x00FFFF00. So when I fill in the AFMR1 register for channel 2 (1st acceptance filter mask), according to the documentation, the 1st bit specifies Remote Transmission Request, then Bits 1 - 18 indicate the extended message ID then bit 19 indicates whether to filter by just by Standard or Extended Frames, then bit 20 that indicates the Substitute Remote Transmission Request Mask followed by bits 21 - 31which is the Standard Message ID Mask. I forced zeros for Bits 0, 19 and 20 so my final AFMR1 mask after performing specified bit shifting is: 0x07E7FE00. Then the AFIR1 (1st acceptance Filter ID Register for channel 2) is setup the same with Bits 0, 19, and 20 also being forced to zero and so the final AFIR1 value after performing specified bit shifting is: 0x07837E00. At this point, I enable the filter for channel 2 by setting bit 0 of the AFR (Acceptance Filter Register) to 1 for channel 2. Now I test the filter by sending a CAN messages with varying CAN IDs - here is what I am witnessing:
Sending a CAN message with CAN ID of 0x00FEBF00 results in Channel 2 not receiving the message (which is correct).
Sending a CAN message with CAN ID of 0x00F1BF00 results in Channel 2 receiving the message (which is correct).
Sending a CAN message with CAN ID of 0x00F2BF00 results in Channel 2 receiving the message (THIS IS NOT CORRECT)
Sending a CAN message with CAN ID of 0x00F3BF00 results in Channel 2 receiving the message (THIS IS NOT CORRECT)
Sending a CAN message with CAN ID of 0x00F4BF00 results in Channel 2 not receiving the message (which is correct).
I also tested F5BF, F6BF, F7BF, F8BF, F9BF, FABF and all result in Channel 2 not receiving the message (whic is all correct).
So ... how does channel 2 receive the CAN messages when CAN ID 0x00F2BF00 and CAN ID 0x00F3BF00 are sent? Clearly (in both of these cases) if I apply the MASK against the Acceptance Filter ID and apply the Mask against the incoming CAN ID and compare the results against one another, they do NOT match...so why does channel 2 receive the message when these IDs are used?
Can someone please help me understand? We are trying to ship a production quality CAN module and I am being held up by this filtering anomaly.
Thank you in advance for any insight you can provide.
好的 - 现在有一些细节 - 可能有人可以指出发生了什么。
我有一个设置,我有8个CAN通道都循环。
总线正确终止,因为我可以在所有8个通道上发送和接收CAN消息而不会出现问题。
我想测试验收滤波,所以我已阅读Xilinx Logicore IP CAN文档并遵循它。
以下是这种情况:我只想接收与CAN ID匹配的通道2上的CAN消息:0x00F1BF00。
我将使用的掩码是0x00FFFF00。
因此,当我填写AFMR1寄存器用于通道2(第一个接收过滤器掩码)时,根据文档,第1位指定远程传输请求,然后位1-18指示扩展消息ID,然后位19指示是否仅通过
标准或扩展帧,然后是位20,表示替代远程传输请求掩码,后跟位21-31,它是标准消息ID掩码。
我强制为0,19和20位零,所以我执行指定位移后的最终AFMR1掩码为:0x07E7FE00。
然后AFIR1(通道2的第一个接收滤波器IDRegister)设置相同,位0,19和20也被强制为零,因此执行指定位移后的最终AFIR1值为:0x07837E00。
此时,我通过将AFR(验收滤波器寄存器)的位0设置为通道2的1来启用通道2的滤波器。现在我通过发送具有不同CAN ID的CAN消息来测试滤波器 - 这是我正在目击的
:
发送CAN ID为0x00FEBF00的CAN消息会导致通道2无法接收消息(这是正确的)。
发送CAN ID为0x00F1BF00的CAN消息会导致通道2接收消息(这是正确的)。
发送CAN ID为0x00F2BF00的CAN消息会导致通道2收到消息(这是不正确的)
发送CAN ID为0x00F3BF00的CAN消息会导致通道2收到消息(这是不正确的)
发送CAN ID为0x00F4BF00的CAN消息会导致通道2未收到消息(这是正确的)。
我还测试了F5BF,F6BF,F7BF,F8BF,F9BF,FABF,所有这些都导致通道2没有收到消息(这一切都是正确的)。
那么......当发送CAN ID 0x00F2BF00和CAN ID 0x00F3BF00时,通道2如何接收CAN消息?
显然(在这些情况下),如果我对接受过滤器ID应用MASK并对传入的CAN ID应用Mask并将结果相互比较,则它们不匹配...所以为什么通道2在接收消息时
使用这些ID?
有人可以帮我理解吗?
我们正在尝试运送一个生产质量的CAN模块,我被这种过滤异常所困扰。
提前感谢您提供的任何见解。
以上来自于谷歌翻译
以下为原文
OK - Now for some nitty gritty details - perhaps someone can point out what is going on. I have a setup where I have 8 CAN channels that are all looped. The bus is properly terminated as I am able to send and receive CAN messages across all 8 channels without issue. I wanted to test the Acceptance filtering so I have read the Xilinx Logicore IP CAN documentation and followed it. Here is the situation: I want to only accept CAN messages on channel 2 that match the CAN ID: 0x00F1BF00. The mask I will be using is 0x00FFFF00. So when I fill in the AFMR1 register for channel 2 (1st acceptance filter mask), according to the documentation, the 1st bit specifies Remote Transmission Request, then Bits 1 - 18 indicate the extended message ID then bit 19 indicates whether to filter by just by Standard or Extended Frames, then bit 20 that indicates the Substitute Remote Transmission Request Mask followed by bits 21 - 31which is the Standard Message ID Mask. I forced zeros for Bits 0, 19 and 20 so my final AFMR1 mask after performing specified bit shifting is: 0x07E7FE00. Then the AFIR1 (1st acceptance Filter ID Register for channel 2) is setup the same with Bits 0, 19, and 20 also being forced to zero and so the final AFIR1 value after performing specified bit shifting is: 0x07837E00. At this point, I enable the filter for channel 2 by setting bit 0 of the AFR (Acceptance Filter Register) to 1 for channel 2. Now I test the filter by sending a CAN messages with varying CAN IDs - here is what I am witnessing:
Sending a CAN message with CAN ID of 0x00FEBF00 results in Channel 2 not receiving the message (which is correct).
Sending a CAN message with CAN ID of 0x00F1BF00 results in Channel 2 receiving the message (which is correct).
Sending a CAN message with CAN ID of 0x00F2BF00 results in Channel 2 receiving the message (THIS IS NOT CORRECT)
Sending a CAN message with CAN ID of 0x00F3BF00 results in Channel 2 receiving the message (THIS IS NOT CORRECT)
Sending a CAN message with CAN ID of 0x00F4BF00 results in Channel 2 not receiving the message (which is correct).
I also tested F5BF, F6BF, F7BF, F8BF, F9BF, FABF and all result in Channel 2 not receiving the message (whic is all correct).
So ... how does channel 2 receive the CAN messages when CAN ID 0x00F2BF00 and CAN ID 0x00F3BF00 are sent? Clearly (in both of these cases) if I apply the MASK against the Acceptance Filter ID and apply the Mask against the incoming CAN ID and compare the results against one another, they do NOT match...so why does channel 2 receive the message when these IDs are used?
Can someone please help me understand? We are trying to ship a production quality CAN module and I am being held up by this filtering anomaly.
Thank you in advance for any insight you can provide.
举报