I am developing a decently long program for a project and currently the CAN bus is being very finicky. I have a completely working system, but if I call an empty if statement that doesn't even evaluate to true it breaks the entire thing. When I reduced the size of the code (the full thing is 2k+ lines) I can replicate the issue not with an if statement, but a print statement instead.
Please disregard some of the bad naming convention as I had to change how different systems work to make it smaller. Near the end of the main loop, the print statement that breaks it all can be seen, but it should also be noted that sometimes if the system isn't connected to something it allows it to run.
I have attached my source code to this post, and it runs on the teensy 3.6 with 2 teensy 3.2s listening to the data but not sending anything. I don't believe it could be the teensy 3.2s breaking it because they don't send anything. I have it hooked up to an oscilloscope to confirm data and when the print statement is commented out, the bus just goes blank.
Any help is greatly appreciated as I have spent countless hours trying to work around this issue.
Edit: To enable can either type -rc then -ef in the serial port or set both enableFins and radioControl to true.
More Info:
Using Arduino IDE with Teensyduino
Using SN65HVD230DR CANbus Transceiver (https://www.digikey.com/en/products/detail/texas-instruments/SN65HVD230DR/404367)
I would send wiring but it is built in to a PCB and it normally operates just fine. If you guys want details I can try and find the schematics.
Thanks!
Daniel
Please disregard some of the bad naming convention as I had to change how different systems work to make it smaller. Near the end of the main loop, the print statement that breaks it all can be seen, but it should also be noted that sometimes if the system isn't connected to something it allows it to run.
I have attached my source code to this post, and it runs on the teensy 3.6 with 2 teensy 3.2s listening to the data but not sending anything. I don't believe it could be the teensy 3.2s breaking it because they don't send anything. I have it hooked up to an oscilloscope to confirm data and when the print statement is commented out, the bus just goes blank.
Any help is greatly appreciated as I have spent countless hours trying to work around this issue.
Edit: To enable can either type -rc then -ef in the serial port or set both enableFins and radioControl to true.
More Info:
Using Arduino IDE with Teensyduino
Using SN65HVD230DR CANbus Transceiver (https://www.digikey.com/en/products/detail/texas-instruments/SN65HVD230DR/404367)
I would send wiring but it is built in to a PCB and it normally operates just fine. If you guys want details I can try and find the schematics.
Thanks!
Daniel
Attachments
Last edited: