Comments (2)
I tried this out myself and it seems to work very rapidly. Here is my test setup (which was probably very different from your test setup): I used two EVTVDue boards connected together. I had both ends terminated. I put a kvaser leaf light in the middle tapping the CANH and CANL lines so I could monitor what was going on. Then I used the Can_SnooperCallback example included with the library as one end. I modified it such that instead of printing to the console it merely changes the received ID by adding one and resending the frame. On the other EVTVDue I put my GVRET sketch and used SavvyCAN to periodically send frames out. With the kvaser in the middle I was able to see both sides sending and measure how long it took for responses to happen. My result is that the CAN_SnooperCallback (modified) side would send the reply about 2-3 ten thousandths (0.0001) of a second after reception. That's pretty fast. Because of that I believe the library to be working properly.
So, the question is then, why is it working slowly for you. My best guess would be that you have debugging statements or some sort of serial or USB traffic going on. If you print things to Serial or SerialUSB you are likely to get severe pauses at seemingly random times. USB is polled and so you will find that sending too much will cause your sketch to block until the next time the USB is polled. This isn't long, perhaps 10ms but those 10ms could be a bad thing if you needed to reply sooner. Try running your code without any debugging or other sort of serial output and see what happens.
from due_can.
Your guess was correct. I used debugging to monitor the incoming messages over serial. When I remove the debugging statements I achieve a response within (0.0002 - 0.0003 sec). That's fast enough for me to achieve the things I want to do. Thanks a lot for your support!
from due_can.
Related Issues (20)
- Due_can execute code in ram classe error HOT 2
- All transceivers supported? HOT 2
- DUE_CAN using interrupts HOT 2
- Issue with due can library and DUE HOT 7
- Confirm receiving HOT 4
- Bluetooth obdII "buffer full" (SOLVED) HOT 1
- Data modification issues HOT 1
- contact
- Various issues when re-using can0/can1 HOT 7
- Problem with CAN-Bus speeds
- Stops to receive after send
- RTR bit support confusion
- ACK bit should be 0? HOT 3
- Output frame from Arduino Due CAN bus is not same as expected HOT 1
- Disable Interupt Pin on 2515.h
- I'd like to use your library to make a canbus proprietary arbid decoder. HOT 1
- crc
- Bus speed at 500 K HOT 10
- twai_handle_tx_buffer_frame twai.c:183
- How to read and write individual bits to the canbus? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from due_can.