Commit Graph

29 Commits

Author SHA1 Message Date
Kenn Sebesta cf6f32332d [Utils] Update the header includes 2022-03-23 20:25:37 -04:00
Benjamin Vedder 0113b348c3 Faster motor enable after flash operations 2022-03-13 17:49:41 +01:00
Benjamin Vedder 5c9e014aaa Adapt flash operations to MCU voltage 2022-03-01 11:54:25 +01:00
Benjamin Vedder 8cccadae6a Updated lispbm, fixed dual motor flash motor stop 2022-02-13 15:18:22 +01:00
Benjamin Vedder f6baa653ea Updated linker script and flash helpers to get 128k extra code space. Note that this requires the updated bootloader with compression support. 2022-01-18 20:31:24 +01: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 be5ce41c17 Disable motor for 5 seconds after flash operations 2021-05-11 19:25:03 +02:00
Benjamin Vedder dfe17ac334 Dynamic QML-script write support 2021-05-01 13:28:46 +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 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 01e72eb555 Autogenerated config parsing with signatures, fixed previous PRs 2019-03-01 21:36:58 +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 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 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 ff090fd4e0 FW 2.3: MAJOR UPDATE: FOC!! 2015-12-08 21:01:23 +01:00
Benjamin Vedder c4ff81e849 Ported to ChibiOS 3, refactoring, cleanup, added safe start delay after fault for PPM app, removed unused ST libraries 2015-10-08 23:09:39 +02:00
Benjamin Vedder 984b846401 FW 1.14: configuration loss fix, HW49 support, mcpwm interfaces for apps 2015-10-04 01:43:26 +02:00
Benjamin Vedder a89ad0f1f1 Fix bug #7, detection now works while apps are active 2015-06-09 06:11:41 +02:00
Benjamin Vedder 87932662b7 Long packet support, configurable min and max duty, longer CAN buffer, default parameter changes, appconf ack fix, refactoring 2015-05-20 16:13:48 +02:00
Benjamin Vedder bc7a779632 Bootloader support, CAN fixes 2015-05-08 22:53:59 +02:00