Commit Graph

92 Commits

Author SHA1 Message Date
Benjamin Vedder 36c333cc03 Apply ld_lq_diff in detection 2021-11-21 19:23:19 +01:00
Benjamin Vedder 98587c961b Updated inductance calculation, include motor saliency in observer, separate setting for MTPA 2021-10-24 13:25:12 +02:00
Benjamin Vedder 1763fd59d3 Fixed loss calculation 2021-10-16 12:53:49 +02:00
Benjamin Vedder b1f564c3bb
Merge pull request #352 from kubark42/convenience_math
Use convenience macros for deg/rad conversions
2021-10-15 22:35:47 +02:00
Benjamin Vedder d8a99fd0f1 Inductance and resistance measurement and scaling fixes, various other fixes 2021-10-15 22:25:07 +02:00
Kenn Sebesta bec06ac85a [Utils] Change convenience multiplication factors into convenience MACROs 2021-10-13 14:18:05 -04:00
Kenn Sebesta aeb5d74488 [Utils] Use convenience macros for deg/rad conversions 2021-10-13 11:52:04 -04:00
Benjamin Vedder 75b84f1f2d Added kill switch support 2021-06-13 13:46:27 +02:00
Benjamin Vedder 509713e21a Fixed timeout values 2021-05-13 10:59:33 +02:00
Benjamin Vedder 9e9e13ae14 Wait for motor release where needed 2021-05-13 10:42:40 +02:00
Benjamin Vedder 55dba9a79d Made odometer persist after firmware updates, added hw runtime counter 2021-04-11 19:36:11 +02:00
Benjamin Vedder 8900c41c34 First phase filter and offset calibration attempt 2021-02-28 20:36:02 +01:00
Benjamin Vedder cabd83a8a6 Fixed merge conflict 2020-10-09 21:19:16 +02:00
Benjamin Vedder c77f92470b IO board support, initial bms support, more openloop parameters, removed D current injection, added new HWs 2020-10-09 21:08:48 +02:00
Till Rosenband 82e5bcd845 Verify FLASH integrity of MC and APP config with CRC.
* Currently the FW code has CRC checks, but configs are also important!
* This helps maintain FLASH integrity when the config pages are occasionally
  re-written due to odometer updates (later commit).
* If the config CRC checks fail, store the fault and fall back to default config.
* New 'crc' terminal command displays CRC values.
2020-10-04 00:31:31 -04:00
Benjamin Vedder 6f7c40b4e1 Improved flux linkage measurement 2020-04-16 09:12:08 +02:00
Benjamin Vedder 88d74ae0b6 Added mutex to DRV SPI driver, moved fault stop to thread, smooth current ramping for sensor and flux linkage detection 2020-04-03 20:12:12 +02:00
Benjamin Vedder c0f75f14ac Current ramping during resistance measurement 2020-04-02 20:43:11 +02:00
Benjamin Vedder a61e74db82 Fixed memory leak 2020-03-20 20:40:41 +01:00
Benjamin Vedder 51f0fcea09 gpdrive fix, observer gain calc updates, added COMM_SET_BATTERY_CUT, added CAN_PACKET_SHUTDOWN, detect all fix 2020-03-20 17:35:25 +01:00
Benjamin Vedder a06f09e7f2 Observer gain scaling update, print correct motor on faults, updated timer terminal command 2020-03-17 09:38:09 +01:00
Benjamin Vedder 8739b22f3e Stop both motors when saving configurations 2020-03-16 20:22:01 +01:00
Benjamin Vedder 52e17059e5 Major restructuring for dual motor support, and added unity hw files 2020-03-16 18:32:39 +01:00
Benjamin Vedder 5df92463f3 Pos PID fix, AS5047 fix, changed FOC time constant, updated conf generator 2020-02-27 17:49:35 +01:00
Benjamin Vedder b6949d60dc FW4.00: HFI and many updates, see changelog 2020-01-28 19:46:19 +01:00
Benjamin Vedder 23e61925b6 FW upload compression support, TS5700N8501 support 2019-12-05 19:50:17 +01:00
Benjamin Vedder 602db7435b FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
Benjamin Vedder 30aabb77d7 Detect FOC fix, adc brake multi fix, make ppm pulses invalid above 150 percent 2019-07-01 17:17:49 +02:00
Benjamin Vedder a141e750bb Added CAN status msg 5, fixed issue 94, use defaul HW parameters after autodetect 2019-05-16 23:30:40 +02:00
Benjamin Vedder 404bbcf64b Fixed current offset fault bug, added support for multiple IMUs and ICM-20948 2019-05-03 19:55:36 +02:00
Benjamin Vedder 4a9fe93f41 Added support for storing hw-specific and custom variables in EEPROM 2019-04-19 10:42:43 +02:00
Marcos Chaparro 3c6083c34d Keep the flash memory locked during normal operation
Only unlock when it is necessary to write it. This prevents memory
corruptions caused by software or EMI glitches.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-04-16 00:33:22 -03:00
Benjamin Vedder 39bb8a6b09 FW 3.53: Limit foc_current_filter_const range, 1Mbit/de NRF speed, lower detect f_sw for resistance, no temp_comp by default 2019-03-20 22:46:36 +01:00
Benjamin Vedder 01e72eb555 Autogenerated config parsing with signatures, fixed previous PRs 2019-03-01 21:36:58 +01:00
Benjamin Vedder 18b79a3a09 Fixed some issues found by codacy 2019-02-19 22:06:34 +01:00
Benjamin Vedder c76942009b Some fixes after the merge 2019-02-19 18:55:18 +01:00
Marcos Chaparro b344e873b6 Remove duplicated flux linkage detection function
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-02-19 10:55:40 -03:00
Marcos Chaparro 32cf05629d Resolve merge conficts with major 2019 release
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-02-18 20:25:52 -03:00
Benjamin Vedder 123bb00ab4 Major 2019 update 2019-02-18 19:30:19 +01:00
Marcos Chaparro 4ac69232d9 Configure deadtime by just defining it in nanoseconds. Firmware will calculate the required DTG register value.
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-01-31 00:51:35 -03:00
Marcos Chaparro c59dd2b2fc Fix shadowed variables. Add -Wshadow.
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-01-28 16:52:02 -03:00
Marcos Chaparro 17f97763c0 Extend watchdog coverage with IWDG, a watchdog running from an independent LF oscillator. If any of the threads being monitored does not report for more than 12ms, a reset will be asserted. When a WDG reset happens, the user can see it in the fault logs from vesc tool
Signed-off-by: Marcos Chaparro <mchaparro@paltatech.com>
2019-01-24 12:19:44 -03:00
Marcos Chaparro 78c825ac08 Use Benajmins flux linkage measurement
Signed-off-by: Marcos Chaparro <mchaparro@paltatech.com>
2019-01-18 19:00:46 -03:00
Marcos Chaparro 8a91468fd8 Add an abort mechanism to flux linkage detection in case the motor doesnt spin
Signed-off-by: Marcos Chaparro <mchaparro@paltatech.com>
2019-01-10 11:13:21 -03:00
Marcos Chaparro 6dad2b1865 Improve conf_general_measure_flux_linkage() user experience with simpler parameter request. Now it only asks for a duty % to measure at and a max rpm that prevents overspeeds. By default GUI will suggest measuring at 50% duty, but lower duty (and hence lower rpm) also work fine.
Signed-off-by: Marcos Chaparro <mchaparro@paltatech.com>
2019-01-07 00:26:45 -03:00
Marcos Chaparro 8152d61760 New flux linkage measurement based on open loop FOC to spin up the motor. Removes all calls to BLDC mode to reach the requested erpm
Signed-off-by: Marcos Chaparro <mchaparro@paltatech.com>
2019-01-05 19:24:42 -03:00
Benjamin Vedder a20c35b338 FW 3.39: AUX pin support, some refactoring 2018-07-06 21:20:54 +02:00
Benjamin Vedder 22dc2ce33c FW 3.37: FOC KI temp comp, configurable foc current filter 2018-03-24 22:32:58 +01:00
Benjamin Vedder 5348662197 FW 3.32: Configurable CAN baud rate 2017-11-08 14:07:35 +01:00
Benjamin Vedder 6277cf74ca FW 3.31: Acc temp dec option, PID for APP_ADC 2017-10-27 21:29:12 +02:00