I use the old odrive 3.6 dual Drive SW version 0.5.6
and I want to change the odrive CAN Bus address by setting a GPIO pin high or low (like i2 chips).
Unfortunately I am not too firm with odrive firmware.
So far I set dev0.config.gpio8_mode = GpioMode.DIGITAL_PULL_UP which I want to use as address switch.
The question is, where in Firmware I should add the “address switching” code to immediately change the CAN address during runtime if the GPIO State change.
Changing it during runtime is going to be a pretty complicated endeavor. All the CAN stuff is only initialized during boot - so you’d likely have to check / set CAN address on ODrive power-on or reboot only - e.g. in the board initialization setup.
Thanks, for your answere,
But for some reason I can change the CAN address during runtime using the USB Interface without save configuration or reboot
It uses the new address imidetly
So i think it should be possible