Commit Graph

91 Commits

Author SHA1 Message Date
secupol 9804dc0914
Update main.c 2022-02-21 17:12:20 +09:00
Benjamin Vedder 468c4f6353
Merge branch 'encoder_split' into master 2022-02-19 15:21:13 +01:00
rodale75 ed88dbe5b0 main: Added CAN boot-frame notification.
The boot CAN frame is dispatched at system boot and contains a
payload that holds the hw-name (ASCII). This to serve as a notifier
for other nodes on the CAN bus.

Change-Id: I2edb3d58bb51003d9160ceb83905cf93b63a9396
Reviewed-on: https://review.gerrithub.io/c/RadinnAB/vedder_vesc_fw/+/530857
Tested-by: Mr. Jenkins <jenkins@radinn.com>
Tested-by: aleksandar rodzevski <aleks@radinn.com>
Reviewed-by: aleksandar rodzevski <aleks@radinn.com>
Reviewed-by: Daniel Nordahl <daniel.nordahl@radinn.com>
2022-02-10 14:23:36 +01:00
rodale75 e328e34ea0 main: Moved the 500ms init-done delay outside of the BOOT_OK_PIN-switch.
And also, moved the  m_init_done-flag to be set before the delay.
This to make sure that the flag is set prior to the PIN notification.
2022-02-10 14:23:31 +01:00
Benjamin Vedder 9527f94cf8 First lisp integration with vesc tool and enabled lisp by default 2022-01-29 03:36:34 +01:00
Jakub Tomczak da4b3e0edd Merge branch 'master' into dev_fw_5_03 2022-01-21 15:07:44 +01:00
Benjamin Vedder 9c484d01e4 Decreased stack sizes to save ram 2022-01-16 21:57:12 +01:00
Benjamin Vedder 4f0388d507 Added lispbm test module (disabled by default) 2022-01-13 14:50:19 +01:00
Benjamin Vedder 16385f1706 Renamed compression to lzo, added observer offset parameter 2022-01-12 12:27:45 +01:00
Jakub Tomczak 2a120615be encoders to encoder refactor 2022-01-09 17:10:40 +01:00
Jakub Tomczak 4743194894 old encoder files deleted 2021-12-20 14:18:51 +01:00
Jakub Tomczak f26f3beb2d WIP: 3 encoders partially implemented, AS504x tested
compiled on gcc-arm-none-eabi-7-2018-q2
2021-12-14 16:40:40 +01:00
Benjamin Vedder e31cb50973 Moved LED control to its own thread 2021-11-01 08:52:18 +01:00
Benjamin Vedder 36c9db6718 Dual motor shutdown fix 2021-08-20 14:59:36 +02:00
Benjamin Vedder 7c6f1dd612 Added fusion IMU filter 2021-08-19 18:48:23 +02:00
Benjamin Vedder f81093922a Added event logging 2021-06-15 12:56:38 +02:00
Benjamin Vedder 75b84f1f2d Added kill switch support 2021-06-13 13:46:27 +02:00
Benjamin Vedder 77af43935a Removed outdated LED-support 2021-05-11 09:57:27 +02:00
Benjamin Vedder fcb7e12158 Made servo output a config option 2021-03-31 16:28:46 +02:00
Benjamin Vedder ecb43e70bb Cleanup 2021-01-13 21:51:55 +01:00
Jeffrey M. Friesen 8f703dace0 merge 2021-01-13 08:57:36 -08:00
Jeffrey M. Friesen e862f29298 Re-wrote uart driver a bit 2021-01-05 09:39:45 -08:00
Mitch Lustig e08d0e8b8c Only init IMU once so it doesn't override UART on reboot 2020-04-28 20:49:09 -07:00
Jeffrey M. Friesen f7964e20c2 Few small changes and fixed bug with duals
Added ramping to current measurement to avoid steps during current calibration with an un-tuned current controller.

Added terminal command for mapping to internal nrf pins, useful when you want to erase_mass a locked nrf chip and dont want to cycle between a bunch of windows to scan connect etc.

Made fault led on duals blink if motor 2 is faulting.

Added break on inductance measurement if motor faults.

Added placeholder commands for changing name and pin of BLE module.
2020-04-01 17:58:37 -07: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 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 dfc3ed2319 Final v3.62 2019-09-27 12:56:49 +02:00
Benjamin Vedder 602db7435b FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
Benjamin Vedder 023d78679f Fixed flash CRC check 2019-04-18 22:30:01 +02: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 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 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 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 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
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 c59dd2b2fc Fix shadowed variables. Add -Wshadow.
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-01-28 16:52:02 -03:00
Marcos Chaparro 884f626e63 Restore capability of enabling parameter assertion of peripheral libraries
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-01-28 16:47:10 -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
Benjamin Vedder bf27cb673e Removed software servo driver, fixed hw servo driver to work with all hardwares 2018-02-28 10:22:25 +01:00
Benjamin Vedder 5348662197 FW 3.32: Configurable CAN baud rate 2017-11-08 14:07:35 +01:00
Benjamin Vedder f141157358 First official commit after the VESC Project release 2017-09-04 21:12:43 +02:00
Benjamin Vedder 5dbc94c525 FW 3.7 2016-11-04 15:18:34 +01:00
Benjamin Vedder d2f6d87560 FW 3.0: HW60 support, 3 low/high side shunt support, permanent NRF option 2016-06-27 17:29:09 +02: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 08a27cfbbd FW 1.16: Hall sensor position control, brake at 0RPM setpoint in FOC, FOC parameter detection fix 2016-02-24 21:19:44 +01:00
Benjamin Vedder 02f140e335 FW 2.11: Refactoring, dead time comp fix for smoother braking when the speed is zero 2016-01-30 15:57:51 +01:00
Benjamin Vedder 90986c31de FW 2.9: NRF updates (nunchuk has to be updated too), nunchuk command, small can fix, custom app data command 2016-01-24 13:44:51 +01:00
Benjamin Vedder 42c1b79a08 FW 2.7: Better encoder support, small UART and CAN fixes, NRF commands preparation 2015-12-28 01:50:23 +01:00
Benjamin Vedder 59309d9772 FW 2.4: some nan fixes that shoud prevent FOC from stopping and needing a reboot in some cases 2015-12-10 23:21:04 +01:00