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

ESR1 SYNCH #9

Open
xboxpro1 opened this issue Jan 27, 2016 · 1 comment
Open

ESR1 SYNCH #9

xboxpro1 opened this issue Jan 27, 2016 · 1 comment

Comments

@xboxpro1
Copy link

Hello, is it possible to add a function to check that the Can Bus is synchronized.
There is a Flag in the ESR1 register, CAN Synchronization Status.

I want a function to connect automatic to the Can Bus, like try baud 50000 connect, check synchronization. If not synchronized, try baud 125000, and so on... If synchronization is successful Return the baudrate or if not Return 0..

Thanks...

@tonton81
Copy link

tonton81 commented Aug 18, 2018

This flag is more or less if the controller participated on the bus, regardless of bitrate. Your baud could be bad but still the SYNCH flag may be set. You'll have to monitor more than just the SYNCH flag, there are other bits to check in that ESR1 register, never rely on just the SYNCH, you'll also need 2 or more nodes on the network talking in order to write such a "detect" function, and must be in listen only mode to prevent collissions when using wrong bitrates on bus detections.

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