Commit Graph

293 Commits

Author SHA1 Message Date
Andrey 51d0f6e347 it's going to be painful 2023-04-29 00:44:00 -04:00
Matthew Kennedy 197d75395d don't need this line at all 2023-04-29 00:44:00 -04:00
Matthew Kennedy 61e5b4b1ad change ObdCode to enum class builds firmware 2023-04-29 00:44:00 -04:00
Matthew Kennedy 01f7e4068d rename obd_code_e -> ObdCode
(cherry picked from commit d6534157a03d19bb2e8aeece301642c053a081d0)
2023-04-29 00:44:00 -04:00
Andrey 7bfadd2daa whoever needs it should speak up 2023-04-28 20:18:03 -04:00
Andrey Gusakov d79ef84e40 Fix 'equality comparison with extraneous parentheses' warning/error 2023-04-07 03:47:56 -04:00
rusefillc 1f3b3e82fb
Lcd (#5217)
* WS2812 LED strip on TIM1_CH1_UP using pin PE9 and DMA.

* Applied suggestions

* linux and Windows have different approach

* linux and Windows have different approach

---------

Co-authored-by: benas-gavea <bbrazdziunas@gavea.co.uk>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-04-03 11:31:07 -04:00
rusefi ce59e17670 Revert "https://github.com/rusefi/alphax-4chan/issues/100"
This reverts commit 86d326893a.
2023-03-25 01:24:45 -04:00
rusefi 86d326893a https://github.com/rusefi/alphax-4chan/issues/100
https://github.com/rusefi/rusefi/pull/5196
2023-03-25 00:58:49 -04:00
rusefi fd3f08fdd0 https://github.com/rusefi/alphax-4chan/issues/100
flexibility
2023-03-24 23:39:20 -04:00
rusefillc 58b5764024 hellen81 does not approve
https://github.com/rusefi/rusefi/pull/5196

https://github.com/rusefi/alphax-4chan/issues/100
2023-03-24 21:08:08 -04:00
rusefillc ddacf77146 flexibility?
https://github.com/rusefi/rusefi/pull/5196

https://github.com/rusefi/alphax-4chan/issues/100
2023-03-24 19:54:03 -04:00
rusefillc ee5c1fd446 https://github.com/rusefi/rusefi/pull/5196
https://github.com/rusefi/alphax-4chan/issues/100
2023-03-24 19:42:52 -04:00
rusefi 7accc0eb9b https://github.com/rusefi/alphax-4chan/issues/100 2023-03-24 17:37:19 -04:00
Matthew Kennedy dc6f53bda5
extract newton's method implementation (#5157)
* move expected, update libfirmware

* hellen ID solver uses shared Newton's method

* comment shouldn't have been moved
2023-03-07 08:45:17 -05:00
Andrey f5ba716c5b explicit errors are best 2023-02-26 20:25:24 -05:00
Andrey 818ff54948 adding flexibility 2023-02-26 20:25:24 -05:00
Andrey e6a4c66fa7 we have weird unconditional coupling with ST_STM32F4_DISCOVERY #5134 2023-02-26 17:18:39 -05:00
rusefi f849522474 random flexibility 2023-02-19 14:47:21 -05: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
rusefillc 558f88ce23 external muxes for internal ADC #3350 2023-01-07 21:56:12 -05:00
rusefillc a4eea87440 external muxes for internal ADC #3350 2023-01-05 21:23:00 -05:00
Andrey G e989859cb8
S105: more support (#4937)
* s105: ts_name for battery input

* flash: allow one copy for devices with 512K of flash

* s105: all outputs are open drain
2023-01-04 16:39:17 -05:00
Andrey G 1ddd871f8f
Support boards with no HSE (#4931)
* ENABLE_AUTO_DETECT_HSE: allow override from board config or board.mk

* Cleanup comments references to removed rtcWorks variable

* Allow board with no HSE oscillator
2023-01-03 15:01:51 -05:00
rusefillc 89bf9fb423 kind of a fix? 2022-12-17 18:59:38 -05:00
rusefillc 6c9f59fd56 big delete ICU #4270
random doc
2022-11-20 19:15:07 -05:00
rusefillc 87c3e957de docs 2022-11-20 16:20:01 -05:00
Andrey G 17f98a7c79
SENT: fix null pointer dereference (#4776) 2022-11-13 11:50:08 -05:00
rusefillc 0be6559ced
does gcc11 know something? (#4738)
* does gcc11 know something?

* fix BACKUP_FLASH_ADDR assertion semantic (#4750)

* fix BACKUP_FLASH_ADDR assertion semantic

* cast BACKUP_FLASH_ADDR as flashaddr_t

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
Co-authored-by: Nathan Schulte <8540239+nmschulte@users.noreply.github.com>
2022-11-07 19:22:58 -05:00
Andrey G 12842e485b
OpenBLT: F7: ups, missed shared section (#4714) 2022-10-30 09:38:09 -04:00
Matthew Kennedy f967231bb9
bigger blocking factor (#4703) 2022-10-26 16:49:55 -04:00
Andrey G 7abe3ba112
SENT improvements (#4702)
* smt32_common.mk: reduce copy-paste

* SENT: sentPins is not used

* hw: stm32: add ICU helper

* hw: stm32: icu helpers: also return timer base clock

* SENT: icu: use helper to get ICU & channel and AF

* SENT: icu: use CPU ticks for pulse measurements

* hw: stm32: icu: cleanup
2022-10-26 15:33:47 -04:00
Matthew Kennedy 6e3efed09c
more f429 business (#4679)
* 429 boots and LEDs work

* oops missed a comma

* enable on f767 too, since it should be the same board

* why not just completely duplicate it

* script should not be fancy

* script should not be fancy

* correct pins

* h743 while we're at it
2022-10-20 00:59:39 -04:00
Andrey Gusakov b7820ee713 port: stm32: f4/f7: enable ICU drivers, enable ICU for TIM2 2022-10-19 15:14:29 -04:00
rusefillc 38639e8877 nicer (?) parameter names 2022-10-19 10:25:02 -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
Matthew Kennedy ff9ce3730a
rtc cleanup (#4596)
* rtc formatting and code style

* more cleanup

* s

* time example
2022-09-20 05:28:42 -04:00
Andrey G 8ff49301e5
stm32: microsecond timer: set correct period value (#4567)
Driver sets (period - 1) to ARR (auto-reload register)
So we need to set period to (1 << 32) to get maximum
0xffffffff value in ARR. But period is uint32_t.
So set it to 0 and it will ovelap to UINT32_MAX at
pwmp->tim->ARR  = pwmp->period - 1;
2022-09-12 07:35:31 -04:00
Andrey ab4b451195 os_access.h dead? 2022-09-07 15:56:45 -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
rusefillc 026a28d651
Adc mux (#4379)
* adc mux

* cypress is a special ADC size case

Co-authored-by: Matthew Kennedy <matthewkennedy@outlook.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-26 14:12:00 +03: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
Andrey G 59eee6641c
Add "Reset to OpenBLT" button (#4364)
Similar to "Reset to DFU", but uses different seed
2022-07-22 08:21:11 +03:00
rusefillc 15f2725282 more on MRE BT drama part 2 2022-07-18 02:15:31 -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 5d844b1ebe
Error handling cleanup (#4332)
* dead code in stm32

* rusefi.cpp can have some noreturn

* handle lua panic

* unused error codes

* simplifications of error_handling.cpp

* comment

* put that back

* guard
2022-07-07 23:49:02 -04:00