I am creating a CAN application where two USBizi controllers connect throuh CANbus and exchange data.
When I run the program using the debug interface the communication does not work and I get RXOver errors on all received data.
When I run the program without the debugger it seems to work fine with no receive errors.
Is it possible to change some debugger setting so it wont interfere with the timing of the canbus receive handler?
It doesn’t but maybe your stepping on code is making it run slower and so losing data
Do you have a lot of Debug.Print() statements in your program? This will cause execution to slow down when attached to a debugger.
I have commented out all the debug prints except one in the main loop that is called four times a second.
Even if I comment that one out, I get the CAN RXover errors and the communication does not work.
As soon as I run the controller without debugging, the CAN communication works fine.
What kind of things could cause this - I am not sure how I might be stepping on the can code if I am running in C#
I just found out another thing.
When I run the CAN code in debug through USBizi com1 port instead of the usb interface, the CAN code runs fine.
debug.print to USB is very slow. four lines a second may be enough to cause problems. what happens if you stop all debug prints when connected via USB.