Commit Graph

107 Commits

Author SHA1 Message Date
Benjamin Vedder b002e5d78e FW 3.66: Many changes, see changelog 2020-01-12 21:25:21 +01:00
Benjamin Vedder 210ec40d74 PTC motor thermistor support, APP_PPM sleep fix 2019-12-22 21:22:07 +01:00
Benjamin Vedder ceb8b7bf7d HW60_MK3 support, shutdown fix, added COMM_SET_CURRENT_REL, ramp fix, PPM timeout fix, IRQ prio fix 2019-12-19 16:55:38 +01:00
Benjamin Vedder 23e61925b6 FW upload compression support, TS5700N8501 support 2019-12-05 19:50:17 +01:00
Benjamin Vedder ce31092c1d Merge branch 'master' of https://github.com/vedderb/bldc 2019-09-21 12:50:41 +02:00
Benjamin Vedder f34d0159bf Fixed nunchuk bug and added COMM_BM_MEM_READ command 2019-09-21 12:50:39 +02:00
Mitch Lustig 343dba369a Remove axis config 2019-09-21 01:07:31 -07:00
Benjamin Vedder 6117c2ba20 Fixed merge conflict 2019-09-17 19:43:28 +02:00
Benjamin Vedder db6ba047d9 Added COMM_BM_READ_MEM command 2019-09-17 19:39:11 +02:00
Mitch Lustig d160f74651 Merge branch 'master' into balance 2019-09-12 22:50:12 -07:00
Mitch Lustig 3c31d264fd Add high voltage tiltback 2019-09-12 00:07:26 -07:00
Mitch Lustig 9f263b8c1a Reorder app_use enum 2019-09-11 23:18:12 -07:00
Mitch Lustig 518776d04e Add basic low voltage tiltback 2019-09-10 19:29:44 -07:00
Mitch Lustig 67a4653bd8 Add support for dual fault switches 2019-09-10 01:07:05 -07:00
Benjamin Vedder eb6f5945ce FW 3.61: Added smart reverse mode to PPM app, and some fixes 2019-09-09 19:34:26 +02:00
Mitch Lustig a4de5eb2b5 Cleanup 2019-09-08 22:23:31 -07:00
Mitch Lustig 72e9c24bd7 Make axes configurable, remove offset management 2019-09-08 18:32:53 -07:00
Mitch Lustig 011d3055f6 Merge branch 'master' into merge_new_master 2019-09-08 15:05:54 -07:00
Mitch Lustig 98652977a2 Merge master 2019-09-08 11:42:28 -07:00
Benjamin Vedder a233367be8 MPU9x50 fix, experiment plots, DQ voltage RT data, smart reverse for nunchuk app 2019-09-08 18:25:38 +02:00
Benjamin Vedder 602db7435b FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
Mitch Lustig 7a47053ca6 Add startup calibration sequence 2019-08-27 19:57:35 -07:00
Mitch Lustig a2231593b2 Start on better gyro config 2019-08-25 23:49:33 -07:00
Mitch Lustig 62da9e5b83 Better peripheral gyro management 2019-08-09 23:16:20 -07:00
Mitch Lustig 14faa2e593 Make all features configurable 2019-08-07 00:22:51 -07:00
Mitch Lustig 15703429f5 Add gyro tuning functionality & state machine logic 2019-08-04 11:47:23 -07:00
Mitch Lustig 800115f683 Implement more data to help debug 2019-07-30 00:27:23 -07:00
Mitch Lustig bbba718140 Work to get GUI going 2019-07-29 00:31:48 -07:00
Mitch Lustig fccb59b2ef Merge branch 'master' into balance 2019-07-27 21:28:02 -07:00
Mitch Lustig 271dd21dab start in balanace app 2019-07-27 21:25:56 -07:00
Davide D'Agostino 19fb5e04c6 Rebuild the firmwares 2019-06-29 19:59:02 -07:00
Davide D'Agostino ce802e3547 Move the new smart revers funcion as separate control type
Removed unnecessary ADC fields from its config.
2019-06-24 13:36:55 -07:00
Davide D'Agostino 05b0f0dd9f Port Ackmaniac smart reverse 2019-06-19 19:00:46 -07: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
Marcos Chaparro 6d758b38f2 Detect current sensor failures
2 failure modes added:
* On boot, when calculating DC offsets generate a fault if the offset is beyond
HW_MAX_CURRENT_OFFSET. Fault code reports which sensor is having issues (1, 2 or 3).
Most likely cause is a disconnected sensor, if hw has fault-detecting pullups.

* On runtime, in setups with 3 in-line phase current sensors, checks that the sum
of the currents is below MCCONF_MAX_CURRENT_UNBALANCE, with a configurable low pass
filter. If unbalanced current is high, it means a fault to ground, or a disconnected
sensor (this works at 0 Amp if hw has pullups in the sensor input to detect the
failure).

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-04-20 09:43:08 -03: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 1ae059349f CRC integrity check of flash memory
The check only covers address 0x08008000 to 0x805FFFF, where application
code is stored. It excludes virtual eeprom area (first 0x8000 bytes)
because it is modified on runtime with user configurations.

After a fresh flash programming the CRC is read as 0xFFFFFFFF and firmware
computes and stores the new CRC and a reset is invoked.
After reset the CRC will be available for checking code integrity.

Linker file had a wrong flash2 size, it was set to 480kB, thus allowing
the linking of binaries larger than 393216 (x3 128kB sectors).
The bootloader won't program binaries that span more than 3 sectors.

Now flash2 length is set as (393216 - 8) to ensure that the last 8 bytes
are left blank (0xFFFF) and  reserved for CRC information.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-04-15 20:56:42 -03:00
Benjamin Vedder 025334c141
Merge pull request #85 from tipsmiller/master
Add new control type to ADC application
2019-04-14 07:22:56 +02:00
Marcos Chaparro d80227b9b4 Rename sin/cos m_conf structure fields
Use m_foc prefix so in VESC Tool they are edited in
FOC->Encoder.
Generate confgenerator.c and .h using VESC Tool.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-04-08 21:05:46 -03:00
tipsmiller 3639c6c5f8 Remove custom app. Add new entry for adc ctrl type 2019-04-08 17:45:46 -06:00
Marcos Chaparro de707e0975 Add SinCos encoder checks and fault management
Sin/Cos signals are checked to make sure the module of the vector
is larger than 1V and smaller than 1.65V. A working encoder will
never have both sin and cos signals at 0V (zero amplitude module).
Both sin and cos at 3.3V is also not a possible value.

Errors are logged independently for signals too large and for
signals too small, provinding the user more insight when an encoder
fault happens. In the terminal, the 'encoder' command will show
the error counts and error rates of the encoder being used.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-04-02 10:37:15 -03:00
Marcos Chaparro 153deef9af Add configurable low pass filtering to SinCos encoder analog signals
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-04-01 08:35:22 -03:00
Marcos Chaparro b155d5219a Basic SinCos encoder support
Reads sine and cosine on ADC_IND_EXT and ADC_IND_EXT2, usually
used for ACCEL and REGEN inputs. Provides offset and gain
compensation and is implemented using floating point math.

Note it includes the full mc_interface.h into encoder.c only
to access the ADC readings, and no filtering is performed on
the signals.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-04-01 08:35:22 -03:00
Benjamin Vedder 1161f8417c Added SWD programming support (based on Black Magic Probe) and open loop duty cycle control 2019-03-31 10:49:18 +02:00
Benjamin Vedder 65298263b6 75/300 R2 support, terminal sync cmd, IMU support, option to disable permanent UART, collected timer functions in one place 2019-03-10 14:57:42 +01:00
vadim f668b89db5 trigger a fault when AS5047 encoder SPI communication is broken 2019-02-25 14:43:02 +02: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 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 f1978ac5b4 Stronger filtering on gate driver supply voltage sensing. Add that voltage to fault logs
Signed-off-by: Marcos Chaparro <mchaparro@paltatech.com>
2019-01-18 19:03:53 -03:00