Commit Graph

295 Commits

Author SHA1 Message Date
Matthew Kennedy 7e2097056c unused parameters 2024-01-06 18:31:18 -08:00
Matthew Kennedy 3ef4d7c40e dead openblt files from the "old way" 2023-11-03 01:28:38 -07:00
Matthew Kennedy f293c679ce oops missed mcuconf 2023-11-02 13:33:42 -07:00
Matthew Kennedy f4d442bcf3 adc 2023-11-01 14:31:25 -07:00
Matthew Kennedy ee89ab88d6 H7 flash supports both banks! 2023-08-27 16:44:50 -07:00
Matthew Kennedy 2fb778145c forgot the h7 shared section 2023-08-27 16:32:46 -07:00
Matthew Kennedy 717aae8ce2 extract STM32 flash common 2023-08-27 15:31:29 -07:00
Matthew Kennedy bfad2e45a1 Split F4/F7 vs H7 flash controllers 2023-08-27 15:20:11 -07:00
Matthew Kennedy 12b9a3e477 H7 uses 128k pages 2023-08-27 11:35:14 -07:00
Matthew Kennedy 5813c20a32
OpenBLT-based USB serial bootloader (#228)
* flash layout

* bootloader builds

* output name

* hard fp

* strip out dfu

* bootloader gets hardfault

* loader gets USB but not MSD

* kinda usb?

* USB enumerates!

* cleanup

* shared params

* nonfunctional openblt

* stub flash

* flash.h

* openblt responds over USB!

* implement flash driver

* blt conf, linker

* boards no longer need specific openblt files

* no ccache

* common_make.sh

* cleanup

* delete bootloader crust

* simplifying linker logic

* script tweaks

* flash layout is handled entirely by FOME flash driver

* simplify memcpy

* format

* comment

* dead

* makefiles cleanup

* cleanup

* h7 linker script for bootloader

* h7 bootloader build

* build script
2023-08-27 10:30:02 -07:00
Matthew Kennedy 3e39abbfd3 this button isn't useful as it just bricks the ECU 2023-08-26 23:29:21 -07:00
Matthew Kennedy 342f704a4c null terminate usb strings 2023-08-25 12:19:13 -07:00
Matthew Kennedy 45cb8f3607 re-enable ini drive on stm32f7 2023-05-05 16:33:23 -07:00
Matthew Kennedy d5f9479f28
ObdCode is enum class (#77)
* change ObdCode to enum class builds firmware

* test builds

* don't need this line at all

* can we go down to uint16_t?
2023-04-12 23:44:33 -07:00
Matthew Kennedy d6534157a0 rename obd_code_e -> ObdCode 2023-04-11 16:32:47 -07:00
Matthew Kennedy 8b89860042 not on h7 though 2023-03-24 16:45:55 -07:00
Matthew Kennedy b59a592f94 everybody gets timer 3 pwm 2023-03-24 14:35:54 -07:00
Matthew Kennedy 718ad4a391 extract expected.h 2023-03-07 00:33:31 -08:00
Matthew Kennedy a5a6366eba this one is null terminated but the other isn't? 2023-02-26 12:15:04 -08:00
Matthew Kennedy 62ffcef1a9 usb descriptor 2023-02-26 12:05:41 -08:00
rusefi a28ddec4cc random flexibility 2023-02-19 14:47:21 -05:00
Nathan Schulte 9f1d4c4bdd 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 0647e44f9b build f7 with -Os (#4996) 2023-01-30 07:38:59 -05:00
rusefillc 3aa9ffca60 Refactoring: less confusion macro names around serial/uart/etc in connectivity #4999 2023-01-23 05:09:32 -05:00
rusefillc cea05b7418 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 b612c27917 external muxes for internal ADC #3350 2023-01-07 21:56:12 -05:00
rusefillc ba5144181a external muxes for internal ADC #3350 2023-01-05 21:23:00 -05:00
Andrey G 9ef8a8ab69 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 bfbcb5ffb4 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 940352b077 kind of a fix? 2022-12-17 18:59:38 -05:00
rusefillc fae84c2a61 big delete ICU #4270
random doc
2022-11-20 19:15:07 -05:00
rusefillc 4383d5a08a docs 2022-11-20 16:20:01 -05:00
Andrey G 4c6c74e935 SENT: fix null pointer dereference (#4776) 2022-11-13 11:50:08 -05:00
rusefillc 7f7d00fa3e 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 d897316f1b OpenBLT: F7: ups, missed shared section (#4714) 2022-10-30 09:38:09 -04:00
Matthew Kennedy 7c9e3680b3 bigger blocking factor (#4703) 2022-10-26 16:49:55 -04:00
Andrey G 051dc82e20 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 c16d2e82e4 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 de1189cf86 port: stm32: f4/f7: enable ICU drivers, enable ICU for TIM2 2022-10-19 15:14:29 -04:00
rusefillc 630f943a17 nicer (?) parameter names 2022-10-19 10:25:02 -04:00
Matthew Kennedy 7116670fd0 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 75bf7382a2 We are mostly focused in standby, not in stop 2022-10-03 19:37:17 -04:00
Matthew Kennedy 9916ff9935 rtc cleanup (#4596)
* rtc formatting and code style

* more cleanup

* s

* time example
2022-09-20 05:28:42 -04:00
Andrey G bf3c6e32c2 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 25b6d39802 os_access.h dead? 2022-09-07 15:56:45 -04:00
Andrey G 074563ddfd 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 b3e13f12b4 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 bdaf1587d7 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 4a4443a27d Add "Reset to OpenBLT" button (#4364)
Similar to "Reset to DFU", but uses different seed
2022-07-22 08:21:11 +03:00
rusefillc 5aa9942fe0 more on MRE BT drama part 2 2022-07-18 02:15:31 -04:00