Commit Graph
436 Commits
Author SHA1 Message Date
Samuel Sadok e581cc9c90 move enable_dfu_mode() to main.cpp 2018-04-21 22:09:54 -07:00
Oskar Weigl 0ac2871dec drv fault only reads fault regs, add blackside loopback tests 2018-04-21 14:27:37 -07:00
Samuel Sadok 429acfd7c9 move enable_dfu_mode() to main.cpp 2018-04-21 14:21:29 -07:00
Samuel Sadok 1d7bf6b467 Merge branch 'devel' of github.com:madcowswe/ODrive into sam_refactoring 2018-04-21 00:07:31 -07:00
Samuel Sadok 741a51442f split communication into multiple files 2018-04-20 23:44:55 -07:00
Samuel Sadok abdb037d75 move communication related files 2018-04-20 21:33:39 -07:00
Samuel Sadok dee8efef22 initialize USB interrupt pump before initializing USB device 2018-04-20 21:15:59 -07:00
Oskar Weigl 015532d49b Merge pull request #153 from madcowswe/sam_versions
Add Board & Firmware versions
2018-04-20 00:49:54 -07:00
Samuel Sadok f3b03fb67c change meaning of "hardware_variant" from {0, 1} to voltage 2018-04-19 18:03:51 -07:00
Oskar Weigl 8407721744 fix external interrupts, step dir now working 2018-04-17 03:21:03 -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
Oskar Weigl 3addc3bf18 Merge branch 'master' into devel 2018-04-15 17:38:58 -07:00
Oskar Weigl 6e60ec4631 Check for dc bus overvoltage 2018-04-15 17:38:37 -07:00
Oskar Weigl 7d99825988 snap pll_vel to 0 to avoid jitter 2018-04-15 15:55:36 -07:00
Oskar Weigl be50b6ee74 split set_count into linear and circular 2018-04-15 01:07:54 -07:00
Oskar Weigl 0b1bf6f278 implement circular vel pll tracking 2018-04-15 00:38:39 -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
Oskar Weigl 339fe59f30 make pos estimate available 2018-04-14 22:47:52 -07:00
Oskar Weigl d864730ecc add integrator resets to firmware 2018-04-13 18:37:39 -07:00
Samuel Sadok bd292b4775 fix comment 2018-04-13 16:17:05 -07:00
Samuel Sadok 1e14c45276 [HACK] implement oscilloscope 2018-04-10 23:54:13 -07:00
Samuel Sadok a7de97defd [HACK] implement return values 2018-04-10 23:45:58 -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 23009d1e93 add overvoltage protection
The motor phases will go into floating state as soon as an overvoltage condition is detected.
2018-04-10 00:25:19 -07:00
Samuel Sadok 09f361de61 fix encoder offset calibration and error handling 2018-04-09 19:32:36 -07:00
Samuel Sadok 1718e5c397 Merge branch 'sam_python_fixes' into sam_testing 2018-04-09 18:32:38 -07:00
Samuel Sadok d9b7996c8a Merge branch 'sam_refactoring' into sam_testing 2018-04-09 18:23:25 -07:00
Oskar Weigl df16d5781f Merge branch 'devel' into sam_python_fixes 2018-04-09 16:16:47 -07:00
Oskar Weigl fed26a8d00 Merge branch 'devel' into sam_versions 2018-04-09 15:03:26 -07:00
Oskar Weigl 48c8ad0990 Merge branch 'master' into devel 2018-04-08 20:15:59 -07:00
Samuel Sadok 338e9759ce fix how enums are exposed on the protocol
Previously the assumption was made that the compiler
uses 32 bits for each enum value. This assumption was
invalid and meant that when reading/writing from
control_mode you would also read/write to enable_step_dir.
2018-04-08 14:06:30 -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 95994309ae fix bug where an invalid motor config could be loaded
Before this commit, if the NVM is deemed valid and but the subsequent config load fails (e.g. because of a checksum mismatch), the motor config could be left in an undefined state.

Also a variable user_config_loaded is added to indicate whether the device is using user-saved config or factory defaults.
2018-04-07 12:49:29 -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 21f74379de 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 21:19:24 -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 1aba0cb513 add Axis::ERROR_BRAKE_RESISTOR_DISARMED 2018-04-06 13:00:02 -07:00
Samuel Sadok ab698a9dce turn error enums into flags 2018-04-05 22:27:20 -07:00
Samuel Sadok 8618549753 Merge branch 'sam_refactoring' into sam_testing 2018-04-05 22:24:52 -07:00
Samuel Sadok 2d681f8b99 Merge branch 'sam_python_fixes' into sam_testing 2018-04-03 17:27:19 -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 13aacbfed2 bake Git-derived version into firmware 2018-03-28 01:12:02 -07:00
Samuel Sadok 29c153672d expose board version on USB protocol 2018-03-27 20:17:14 -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 765e63af01 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:53:46 -07:00