Commit Graph

130 Commits

Author SHA1 Message Date
Andrey Gusakov 3830cffca1 f7 rtc: tabs 2025-01-13 18:10:19 -05:00
rusefillc b4580f3c41 stm32 own build-in watchdog #1339 2025-01-11 23:24:13 -05:00
Andrey Gusakov d264f002cd RTC fixup for STM32F7
Switch RTC to LSE clock if it is detected on start.

It is not allowed to change source clock of RTC module on STM32.
Source clock can be selected only once after reset of BKP module.
If at first start LSE is failed FW will fallback to inaccurate
LSI (internal RC). If Vbat is present RTC/BKP is not reset between
restarts and RTC is never switched to more accurate LSE event if it
is present.
Implement fixup that will check for the LSE and switch RTC to LSE
through BKP (RTC) module reset and new clock source selection.
2025-01-08 11:24:35 -05:00
Andreika 45ac95e249
Use 1.5Mb for nucleo767 https://github.com/rusefi/rusefi/issues/6242 (#7092) 2024-11-22 13:56:16 -05:00
rusefillc a7e9d0ce8e NUCLEO-F767ZI STM32F767ZI 2mb flash firmware size #6242
only:docs
2024-11-19 13:48:02 -05:00
Andrey Gusakov 3557d96d3b flash: renames only
allowFlashWhileRunning() -> mcuCanFlashWhileRunning() - true if MCU
can flash while continue code execution. Dual bank mode on STM32.

New allowFlashWhileRunning() return true if MCU can write its own
flash while keep runnig OR settings are stored in external storage.
2024-08-09 18:25:31 -04:00
Andrey 9b5f0244bf only:docs 2024-07-29 17:41:57 -04:00
rusefillc a331b5873a dead & spelling 2024-06-07 02:43:31 -04:00
rusefillc e0cfb02ea3 F7 chip size flexibility 2024-06-07 02:28:26 -04:00
Andrey 051d619e16 cleaner defines 2024-05-23 18:24:12 -04:00
Andrey Gusakov b499c8b519 ports: chconf_stm32.h for stm32, add its location to includes path 2024-03-03 13:02:38 -05:00
Andrey Gusakov 68e07a6341 stm32: common ChibiOS config 2024-03-03 13:02:38 -05:00
Andrey 9bd8ed1e08 we do not use dynamic threads 2024-02-25 16:25:35 -05:00
rusefillc 21a2033574 Possible bug around _OpenBLT_Shared_Params on F7? fix #5905 2024-02-04 08:53:14 -05:00
Matthew Kennedy 46a7cae403 oops missed mcuconf 2024-02-02 14:51:06 -05:00
andreika-git 7c86c0d7d3 fix logHardFault for BL and cleanup 2023-12-30 16:22:30 -05:00
andreika-git 13b02d1184 port makefiles 2023-12-30 16:22:30 -05:00
andreika-git 3118bbe0d0 more port-specific files for BL 2023-12-30 16:22:30 -05:00
andreika-git a572407e03 port-specific files for BL 2023-12-30 16:22:30 -05:00
rusefillc 18f4f96c93 bootloader 2023-12-30 16:22:30 -05:00
andreika-git 1585cb2137 Fix subaru_eg33 for OpenBLT 2023-12-30 16:16:10 -05:00
andreika-git 8ff9b63022 Enable watchdog (see https://github.com/rusefi/rusefi/pull/5751) 2023-12-14 02:04:48 -05:00
rusefillc 2e7d1e6ddb reusing existing magic 2023-12-02 12:09:34 -05:00
rusefillc c5c62a42c0 better guards 2023-11-04 13:05:08 -04:00
rusefillc 12e6c18c4e better guards 2023-11-04 09:45:14 -04:00
Matthew Kennedy c7a183db49 this button isn't useful as it just bricks the ECU 2023-08-27 09:08:08 -04:00
rusefi e8c45a2e7d refactoring: reducing code duplication. Also, do we even care for critical error codes?! 2023-08-20 22:23:44 -04:00
Andrey 777c539cac fixing cypress & reducing copy-paste 2023-07-06 15:34:42 -04:00
rusefillc 330017db67 refactoring: reducing copy-pasta 2023-07-06 14:16:33 -04:00
rusefillc 6e638b779c refactoring: reducing copy-pasta 2023-07-06 13:46:50 -04:00
rusefillc d709afe21b
global_port.h (#5388)
* global_port.h

* global_port.h

---------

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-07-04 23:45:10 -04:00
rusefillc 9e838f1d12
HW_LAYER_EMS* renamed to HW_LAYER_PORT* (#5387)
* HW_LAYER_EMS_CPP renamed to HW_LAYER_PORT_CPP

* HW_LAYER_EMS renamed to HW_LAYER_PORT

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-07-04 22:30:20 -04:00
Andrey G d5e9c3a5e1
Openblt usb for F7 (#5365)
* OpenBLT: enable USB for F7

* OpenBLT: simple flash over USB script
2023-07-02 09:22:55 -04:00
Matthew Kennedy 61e5b4b1ad change ObdCode to enum class builds firmware 2023-04-29 00:44:00 -04:00
Nathan Schulte f99e480e66
enable LSE (via: LSE max wait patches) (#4944)
* enable LSE (via: LSE max wait patches)

* ChibiOS: LSE patches
2023-02-12 16:01:03 -05:00
Matthew Kennedy 5770c8a2aa
build f7 with -Os (#4996) 2023-01-30 07:38:59 -05:00
rusefillc 083bafb3ba Refactoring: less confusion macro names around serial/uart/etc in connectivity #4999 2023-01-23 05:09:32 -05:00
rusefillc 3862430aa3 specific PN F7 boards bricking on incremental flash due to ST bug #3566
let me try
2023-01-11 11:43:11 -05:00
Andrey G 12842e485b
OpenBLT: F7: ups, missed shared section (#4714) 2022-10-30 09:38:09 -04:00
Andrey Gusakov b7820ee713 port: stm32: f4/f7: enable ICU drivers, enable ICU for TIM2 2022-10-19 15:14:29 -04:00
Matthew Kennedy 1ae642e7a7
build tweaks for size (#4661)
* don't align on non-cached mcu

* lua decimal point

* no snprintf

* sort sections by alignment

* unit tests
2022-10-13 20:30:30 -04:00
rusefi 46d5db4d5f We are mostly focused in standby, not in stop 2022-10-03 19:37:17 -04:00
Andrey G aecd997d4b
OpenBLT shared params (#4417)
* OpenBLT: linker file: use last 16 bytes of ram for shared area

This area is used for communication between FW and OpenBLT.

* OpenBLT: startup: invalidate only DFU breadcumb from startup code

Same location (but different seed) is used for shared param's
signature in OpenBLT.

* OpenBLT: enable shared params

* OpenBLT: enable hooks

If 0x01 is stored in shared param idx=0, then stay in OpenBLT forever.

* Jump to OpenBLT: store proper shared param when OpenBLT is requested

TODO: calculate and store CRC too!

* OpenBLT: move shared_params to start of RAM

* Bootloader: Allocate 16 bytes at start of RAM for bootloader shared area

* OpenBLT: shared_params: reuse same .c and .h file for main application

* OpenBLT: shared_params: enable CRC check

* OpenBLT: no need to manualy set breadcumb before reset

* Revert "OpenBLT: startup: invalidate only DFU breadcumb from startup code"

This reverts commit 6b064714b953560227ae53e38355332cf9f46f7f.

* OpenBLT: guard for builds without OpenBLT

* OpenBLT: reboot to OpenBLT on CAN request with ID=0x667 and DLC=2

* config: options to enable OpenBLT on CAN interfaces

* OpenBLT: comments
2022-08-07 19:33:19 -04:00
Andrey G cbef71e97c
Openblt to dfu jump fixed (#4367)
* OpenBLT: supress "target 'startup_xxxxxx.o' given more than once in the same rule" warning

* OpenBLT: check for DFU request, do not ignore dead beef
2022-07-22 07:43:15 -04:00
rusefillc 25cc8ed0df
STM32_HSE_BYPASS where we need it (#4338)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-11 04:30:49 -04:00
Matthew Kennedy e9d092f975
big delete ICU (#4270)
* big delete

* icu vestiges

* changelog
2022-07-07 15:27:59 -04:00
Matthew Kennedy 0cc1f729c4
Write hard faults to backup ram, print on next boot (#4324)
* use backup ram, hard fault handler improvement

* wire it up

* upload elf

* s

* I guess I'll just use strncpy

* s

* what is it even complaining about?

* neat, we don't need a cast

* cypress and kinetis

* cleanup

* ci

* guard for tests
2022-07-07 15:14:31 -04:00
rusefillc 03fa7c7d95 reducing code duplication, also one step back with HSE 2022-05-24 16:25:16 -04:00
rusefillc 35eb39e11e typos 2022-05-24 15:07:31 -04:00
Matthew Kennedy e4a0979dc2
Brain pin is enum class (#4108)
* change most usages to Gpio::

* board configs

* engine configs etc

* isBrainPinValid, smart gpio

* generator

* generator

* generator

* connector yamls

* kinetis enums

* cypress txt

* kinetis config

* frankenso

* config generator

* actually do it for the others

* disable skips for pr ci

* fix tle8888

* misc

* weird cast from int

* needs this operator too

* this can be an unsigned subtract

* happy tests

* s

* kinetis isConfigurationChanged weirdness

* missed J/K

* cypress efifeatures

* build script mistake (!)

* mistake in smart gpio

* debounce

* eg33

* kinetis, so needy

* it's pretty green, we can skip these again
2022-04-28 17:32:39 -04:00