collin80 / GVRET

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

SWCAN pins aren't initialized #7

Closed Mike4U closed 9 years ago

Mike4U commented 9 years ago

When starting up GVRET, output pins SWCANMode0 and SWCANMode1 aren't initialized. They were floating around 1.5 volts until CAN1 is turned on or off.

collin80 commented 9 years ago

Yup, that's a valid concern. They should be initialized to a set state upon start up. I believe that LOW for both pins would be appropriate.

Mike4U commented 9 years ago

Forgot to mention that SWCANMode0 is a confusing pin name shouldn't it be SWCANMode0PIN

collin80 commented 9 years ago

Ok, all of this is fixed in a commit I haven't posted yet to GIT but will be soon. The settings have been renamed to have Pin after them and the two pins are now initialized as outputs and they are immediately set appropriately. If you asked for single wire mode on boot then it will immediately be selected. Otherwise the single wire mode pins will both be set low immediately.