Commit Graph
198 Commits
Author SHA1 Message Date
Samuel Sadok dee8efef22 initialize USB interrupt pump before initializing USB device 2018-04-20 21:15:59 -07:00
Samuel Sadok 27574234d5 improve resilience and safety of entering DFU mode
- Disable interrupts before setting the reboot cookie
- Delay after NVIC_SystemReset before jumping to bootloader
  (see comment for an explanation)
- Make a variable for the reboot cookie
- Do reboot cookie checks before C++ static initializers
2018-04-16 23:20:20 -07:00
Samuel Sadok aee1a7343d add property read/write functionality to ASCII protocol
Command examples:
r vbus_voltage
w axis0.config.enable_step_dir 1
2018-04-14 23:03:03 -07:00
Samuel Sadok bd292b4775 fix comment 2018-04-13 16:17:05 -07:00
Samuel Sadok 44fd8090e1 add overvoltage protection
The motor phases will go into floating state as soon as an overvoltage condition is detected.
2018-04-10 15:49:16 -07:00
Samuel Sadok b4fa53c849 fix encoder offset calibration and error handling 2018-04-10 15:49:00 -07:00
Samuel Sadok 8972e4a8b1 reenable ASCII protocol (formerly "legacy" protocol) 2018-04-07 21:20:26 -07:00
Samuel Sadok e264e1c326 rename legacy protocol to ASCII protocol 2018-04-07 13:25:19 -07:00
Samuel Sadok 61983a10da store encoder_configs and controller_configs in NVM 2018-04-07 12:30:37 -07:00
Samuel Sadok 814454da00 set usb task pump priority to osPriorityAboveNormal
osPriorityNormal is the same priority as the communication task. If the USB pump task runs on the same priority, it sometimes fails to respond to the host in time, causing spurious halt conditions.
2018-04-06 22:19:03 -07:00
Samuel Sadok 98e24f3eb6 add Axis::ERROR_BRAKE_RESISTOR_DISARMED 2018-04-06 13:12:49 -07:00
Samuel Sadok ae9a208f1f turn error enums into flags 2018-04-06 13:12:39 -07:00
Samuel Sadok b8b483c9d6 Firmware hardening
- check return code of enqueue_modulation_timings
 - wrap all hardware access to safety critical hardware timer registers in safety_critical_ sections. These functions like the armed-ness of each PWM output to a corresponding armed state that can only be set at start or by the user
 - ensure NaN in any variables doesn't cause unpredictable behavior on the safety critical PWM outputs
2018-03-30 22:32:07 -07:00
Samuel Sadok 0e37ff01e4 set current controller gains based on NVM configration
If the motor phase resistance and phase inductance was loaded from NVM (pre_calibrated = true) (as opposed to calibration) the current control P and I gains would not be loaded correctly. This commit fixes this.
2018-03-23 19:54:45 -07:00
Samuel Sadok 7695828d31 fix sensorless estimator to respect motor direction 2018-03-23 19:54:34 -07:00
Samuel Sadok 09b8201868 expose sensorless estimator on protocol 2018-03-23 17:10:02 -07:00
Samuel Sadok 69e1b5331a make encoder index search and encoder offset calibration independent
These two activities are now separate states of the axis state machine.
Each of them can be invoked independently at any time (provided the motor is calibrated).
2018-03-23 17:09:52 -07:00
Samuel Sadok 2bf05b303a rename Axis::ERROR_BAD_VOLTAGE 2018-03-13 14:35:52 -07:00
Samuel Sadok e89569a6b4 add back enter_dfu_mode 2018-03-13 14:35:52 -07:00
Samuel Sadok 4be3f829d5 Merge branch 'sam_dfu' into sam_refactoring 2018-03-13 14:14:43 -07:00
Samuel Sadok 6d697b08fa replace UUID_... property by serial_number 2018-03-12 23:45:17 -07:00
Samuel Sadok ab3af19018 add support for uint64_t to protocol 2018-03-12 23:43:16 -07:00
Samuel Sadok 1489083f19 Merge branch 'devel' into sam_dfu 2018-03-12 22:44:59 -07:00
Oskar Weigl 2430490025 Merge branch 'devel' into sam_build_config 2018-03-12 21:10:38 -07:00
samuelsadok 764fb26b18 Merge branch 'devel' into sam_dfu 2018-03-11 21:39:56 -07:00
Samuel Sadok c239427441 ensure sane config if config CRC16 mismatches 2018-03-11 20:04:53 -07:00
Samuel Sadok 4114846e0a ensure sane config if config CRC16 mismatches 2018-03-11 17:10:58 -07:00
Samuel Sadok 791e08fb77 Merge branch 'devel' of github.com:madcowswe/ODrive into sam_build_config 2018-03-09 21:22:05 -08:00
Samuel Sadok ed3832ca77 make axis error clearable 2018-03-09 20:33:35 -08:00
Samuel Sadok 1f732bb0fb fix stack overflow 2018-03-09 20:23:03 -08:00
Samuel Sadok 6131519b25 increase axis thread stack size to 2k 2018-03-09 16:45:38 -08:00
Samuel Sadok 74d0d7e14d minor doc updates 2018-03-09 16:45:21 -08:00
Samuel Sadok 93d6a787cd Merge branch 'devel' of github.com:madcowswe/ODrive into sam_refactoring 2018-03-09 16:01:18 -08:00
Samuel Sadok 9d85854de3 add toplevel functions back to protocol 2018-03-09 15:03:55 -08:00
Samuel Sadok 9486f9ed15 make stuff working again, improve state machine design, add underscore to member names 2018-03-09 13:37:07 -08:00
Samuel Sadok f5081352b3 refactor protocol 2018-03-08 12:56:24 -08:00
Oskar Weigl 3c983128f3 Merge branch 'master' into devel 2018-03-05 20:52:20 -08:00
Oskar Weigl 8d27dd443f Update utils.c 2018-03-05 18:10:23 -08:00
Quincy Jones 6474f279d7 Fix microsecond timer delay code. 2018-03-05 19:50:33 -06:00
Oskar Weigl 01aedc2eea Update commands.cpp 2018-03-05 17:34:12 -08:00
Samuel Sadok 7d7ab7f81b Merge branch 'devel' of github.com:madcowswe/ODrive into sam_build_config 2018-03-04 17:05:34 -08:00
Samuel Sadok 97aedd46e9 Sanitize error handling and state machine, move common stuff to odrive_main.hpp 2018-03-04 15:49:48 -08:00
Oskar Weigl dff77b4f1c Merge branch 'devel' into sam_dfu 2018-03-04 02:58:40 -08:00
Oskar Weigl 898d9c64b4 fix saving of calibrated flag 2018-03-02 23:05:40 -08:00
Samuel Sadok b32c87df5a [TEMP] refactoring: compile works, motors initialize as usual 2018-03-02 22:03:24 -08:00
Oskar Weigl 8b0be90bca Merge branch 'devel' into sam_nvm 2018-03-02 22:01:56 -08:00
Oskar Weigl 5d87b7602f make timing log static 2018-03-01 19:09:52 -08:00
Oskar Weigl 037f715dc2 elec_rad_per_enc also evaluated in check CPR 2018-02-25 23:54:17 -08:00
Oskar Weigl 2ed8d17fb8 fix comma 2018-02-25 23:50:43 -08:00
Oskar Weigl 2c8c712eda Merge branch 'devel' into sam_nvm 2018-02-25 23:42:14 -08:00