Commit Graph

22 Commits

Author SHA1 Message Date
Benjamin Vedder 7418102412 Renamed encoder functions, moved fault generation 2021-07-31 10:53:15 +02:00
Benjamin Vedder a00d1beb8d Simplified pr 2021-07-31 10:07:10 +02:00
Benjamin Vedder 11e2062312 Pull request cleanup 2021-07-30 20:53:22 +02:00
Jakub Tomczak 2511458ab3 USE_HW_PINS added in appropriate places 2021-07-29 14:57:33 +02:00
Jakub Tomczak e951e3a374 Added AS504x Diagnostics 2021-07-28 17:14:10 +02:00
Marcos Chaparro 50bc55e487 MT6816 SPI encoder support
This encoder needs x2 16bit SPI transfers so the hardware SPI peripheral
was used to run SCLK at 10MHz and reduce the ISR duration.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2020-11-30 19:12:58 -03:00
Benjamin Vedder 97ef43cff8 Leave debug mode on NRF5x after SWD upload, more TS5700N8501 encoder features, more CAN baud rates 2020-02-01 00:37:25 +01:00
Benjamin Vedder b6949d60dc FW4.00: HFI and many updates, see changelog 2020-01-28 19:46:19 +01:00
Marcos Chaparro 9965bb52d5 Axiom: Full resolver support
Fixes a low level SPI timing bug.
Provide Loss of Signal, Degradation Of Signal and Loss Of Tracking
fault sources, and stats to the 'encoder' terminal command.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2020-01-20 11:06:02 -03:00
Benjamin Vedder b002e5d78e FW 3.66: Many changes, see changelog 2020-01-12 21:25:21 +01:00
Benjamin Vedder 23e61925b6 FW upload compression support, TS5700N8501 support 2019-12-05 19:50:17 +01: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
vadim f668b89db5 trigger a fault when AS5047 encoder SPI communication is broken 2019-02-25 14:43:02 +02:00
vadim 46d9361886 reject encoder readings with bad CRC 2019-02-25 14:34:17 +02:00
Benjamin Vedder 123bb00ab4 Major 2019 update 2019-02-18 19:30:19 +01:00
Benjamin Vedder 5dbc94c525 FW 3.7 2016-11-04 15:18:34 +01:00
Benjamin Vedder cb2a205cb8 FW 2.17: as5047 support, change sensor port mode in conf, better encoder detection, FOC ah and wh counter fixes 2016-04-27 15:32:32 +02:00
Benjamin Vedder ff090fd4e0 FW 2.3: MAJOR UPDATE: FOC!! 2015-12-08 21:01:23 +01:00
Benjamin Vedder 607e99d211 Configuration over CAN, first implementation of position control, more configuration options 2015-04-27 00:02:32 +02:00
Benjamin Vedder 2ccb52514e Encoder support, NRF nunchuk support 2015-04-11 10:07:36 +02:00