collin80 / GVRET

Generalized Vehicle Reverse Engineering Tool - firmware for Arduino Due based boards
99 stars 32 forks source link

Glitch if powering via USB before 12v #19

Open collin80 opened 6 years ago

collin80 commented 6 years ago

Sending single wire CAN traffic (with CANDue 2.2 boards) won't work if you connect USB before 12V. I do not yet know why. Receive seems to always work. So, the proper order of operations is to connect all wires and turn on 12v power then connect USB.

Looking at SPI traffic with a logic analyzer shows 0xA0 command to MCP2515 (Get Status Flags) and a proper response of 0 (nothing pending). This is correct. What should happen next is a command to write to the TX registers. This doesn't happen when the problem manifests. Instead nothing happens on SPI and the transmission just plain disappears. Oddly this is fixed by the above mentioned power application strategy. I have no idea why that would matter.