Commit Graph

405 Commits

Author SHA1 Message Date
Mitch Lustig 2c41dda638 Add confgenerator fix bugs 2019-08-08 23:39:14 -07:00
Mitch Lustig 14faa2e593 Make all features configurable 2019-08-07 00:22:51 -07:00
Mitch Lustig bf566fe21a Add fault, smooth startup, and over speed tilt back safety 2019-08-04 23:13:35 -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
Benjamin Vedder 8619ccf4f3 Updated compiled FWs 2019-07-01 19:29:09 +02:00
Benjamin Vedder c7d11ca431 Some fixes for previous PR 2019-07-01 18:35:27 +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 599cdad32b
Merge pull request #96 from DAddYE/daddye
Port Ackmaniac smart reverse
2019-07-01 17:16:30 +02:00
Davide D'Agostino 19fb5e04c6 Rebuild the firmwares 2019-06-29 19:59:02 -07:00
Davide D'Agostino b8a152c5f6 Update configuration using the vesc tool 2019-06-28 15:37:56 -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 3ac3a4acdd Added make rule to clear option bytes 2019-05-19 10:16:12 +02:00
Benjamin Vedder 469a6f0abf
Merge pull request #92 from powerdesigns/Axiom-IGBT-temp-support
Axiom: Individual IGBT temperature monitoring
2019-05-17 09:52:45 +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
Marcos Chaparro 90dee2b31e Axiom: Individual IGBT temperature monitoring
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-05-09 19:12:54 -03:00
Benjamin Vedder e29c97f8fc Added ICM-20948 callback to state struct 2019-05-06 22:40:05 +02:00
Benjamin Vedder a80829f5c5
Merge pull request #90 from powerdesigns/virtual-motor-update
Updated virtual motor library
2019-05-04 10:48:47 +02:00
Benjamin Vedder aaf45fc20c Merge branch 'powerdesigns-Axiom-board-support' 2019-05-04 10:44:48 +02:00
Benjamin Vedder 05b1a9483e Merge branch 'Axiom-board-support' of https://github.com/powerdesigns/bldc into powerdesigns-Axiom-board-support 2019-05-04 10:44:03 +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
Marcos Chaparro 4d93f2fef1 Axiom: configurable current sensor gain
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-04-27 16:57:35 -03:00
Marcos Chaparro 1d08745376 Axiom control board support
Rename paltatech naming to Axiom.

For safety set Axiom default max input voltage to 0.0V so it can not run a
motor without mc_conf being explicitly configured by the user.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-04-27 08:21:46 -03:00
Maximiliano Cordoba 0841a9ce87 updated virtual motor library, adding pole pair numbers into the model, changing variable names to better address the purpose of them, and including flux linkage into the id calculation.
Signed-off-by: Maximiliano Cordoba <mcordoba@powerdesigns.ca>
2019-04-26 11:49:30 -03:00
Benjamin Vedder 490d44dd10 Updated changelog 2019-04-26 12:17:43 +02:00
Benjamin Vedder 8313b32c0c Some fixes on PR 2019-04-26 12:02:57 +02:00
Benjamin Vedder 1e4078a713
Merge pull request #88 from paltatech/current-sensor-fault-detection
Detect current sensor failures
2019-04-26 11:25:30 +02:00
Benjamin Vedder 0551117351 Some HW cleanup and documentation, fixed DRV8301 fault readout bug, added mpu_read_reg terminal command 2019-04-26 11:07:31 +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
Benjamin Vedder a2bf8a87c6 Chuk RPM filter and output rate updates 2019-04-18 23:43:07 +02:00
Benjamin Vedder 023d78679f Fixed flash CRC check 2019-04-18 22:30:01 +02:00
Benjamin Vedder b2816ef596
Merge pull request #87 from paltatech/flash-memory-crc-integrity-check
Flash memory CRC integrity check
2019-04-18 20:02:56 +02:00
Benjamin Vedder 5202ef41d9 Chuk stop PID on dropout, ppm multi vesc duty fix 2019-04-18 20:00:26 +02:00
Marcos Chaparro fbc7767fcb Set crc and flag for memory checks to '1' at build time
Ensures the memory addresses used for flash memory integrity check
are initially 0xFFFFFFFF, so the application can write a new CRC in the
first boot.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-04-17 21:27:43 -03:00
Marcos Chaparro 4fceb73db9 Continuous flash memory integrity check running on background
Create a new, low priority thread that checks that the CRC of the
flash memory matches the CRC stored in flash.

8kB chunks are computed every 50 milliseconds. A reset is invoked if
CRC does not match.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-04-17 20:54:08 -03:00
Marcos Chaparro 68ee05ea9c Remove ST CRC library but keep using hardware-accelerated CRC32.
Add integrity check of the vector table.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-04-16 19:13:01 -03: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
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 e09bc7ce22 Increased version number and updated configuration signatures 2019-04-14 07:44:55 +02:00
Benjamin Vedder 8ec5723f89
Merge pull request #82 from paltatech/virtual-motor
Add command to connect a virtual motor with configurable parameters
2019-04-14 07:24:23 +02: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
Benjamin Vedder 0a025ef301
Merge pull request #81 from paltatech/sin-cos-encoder-support
Sin cos encoder support
2019-04-14 07:21:36 +02:00
Gavin Miller 9deee721f5 Fix indentation, restore proper include to app_custom 2019-04-09 19:12:09 -06:00
tipsmiller 36a3e458a0 Switch HW version back to 60 2019-04-09 16:29:32 -06:00
tipsmiller 583e71464e Update app_adc with new control scheme 2019-04-09 16:11:11 -06:00