I have bought two ODrives, a PM motor and an encoder, and tried using them. I am using the firmware environment on a Mac; it has compiled cleanly, then I have tried to flash it. After flashing, the motor spins for a short while, then I get a serial connection /dev/tty.usbmodem141141 and can run explore_odrive.py over it. It shows stuff, but it will not move when I try “my_odrive.motor0.pos_setpoint = 10000”.
But worse, everything vanishes on power cycle; ODrive boots up with the power LED flashing, no serial port opens, nothing works.
Does it mean that the CPU is damaged? How can I tell if the flash memory is alive or dead?
Here is what I get upon flashing:
sudo make flash openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg -c init -c reset\ halt -c flash\ write_image\ erase\ build/ODriveFirmware.elf -c reset\ run -c exit Open On-Chip Debugger 0.10.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'. Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD adapter speed: 2000 kHz adapter_nsrst_delay: 100 none separate Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : clock speed 1800 kHz Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748 Info : using stlink api v2 Info : Target voltage: 3.251459 Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints adapter speed: 2000 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0800a2f4 msp: 0x20020000 auto erase enabled Info : device id = 0x10076413 Info : flash size = 1024kbytes target halted due to breakpoint, current mode: Thread xPSR: 0x61000000 pc: 0x20000046 msp: 0x20020000 Warn : no flash bank found for address 10000000 wrote 131072 bytes from file build/ODriveFirmware.elf in 5.433234s (23.559 KiB/s) adapter speed: 2000 kHz