Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教下按照代码移植后提示驱动器心跳错误可能是什么原因呢? #8

Open
yangbo18416 opened this issue Feb 23, 2022 · 3 comments

Comments

@yangbo18416
Copy link

请教下按照代码移植后提示驱动器心跳错误可能是什么原因呢?

@gbcwbz
Copy link
Owner

gbcwbz commented Feb 23, 2022

  • 是不是没有设置驱动器产生心跳包?设置对象字典1017
  • 如果设置了,监控一下总线上的报文看一看有没有发出来

@yangbo18416
Copy link
Author

有设置驱动器产生心跳包,CAN总线上也按规定时间有输出ID 702 内容 05的心跳包。不过在你提供的源码基础上,我去掉了硬件滤过滤器。(启用后收不到数据)。修改如下:
image
但理论上不适用硬件过滤器应该不会影响这个包的接收吧!

@gbcwbz
Copy link
Owner

gbcwbz commented Feb 24, 2022

  • 不使用硬件过滤器,can 接收 FIFO 的寄存器也是要设置的,具体取决于你使用的硬件
  • 我设置的硬件过滤器其实是允许所有报文的,不使用硬件过滤器也完全没问题
  • 你要看一下有没有进接收中断,如果进了中断就要看一下 rx_sem 有没有释放

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants