Commit Graph

691 Commits

Author SHA1 Message Date
rusefillc 4b79aa451e
refactoring: extract magic constant (#133) 2022-08-09 22:59:36 -07:00
rusefillc c1057ad951
f1_dual: limit max heater duty (#132)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-08-01 00:17:06 -07:00
Andrey G 0572719783
Makefile: add ChibiOS C++ wrappers (#129)
After adding max31855 driver linker needs __cxa_pure_virtual.
I'm not a C++ expert, bit this wrapper already exist in ChibiOS
so lets use it.
2022-07-21 10:14:21 -07:00
rusefillc 41e87292c5
Add max31855 driver (#103)
* Add max31855 driver

* f1_dual: enable EGT driver

* bit.h: bit helper

* max31855 driver progress

* max31855 driver fixing guard

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-20 16:36:23 -07:00
Andrey G dd9e9b94d1
Linux scripts update and improve (#127)
* tools: linux update scripts: more verbose, more checks

* tools: can_update: more checks, help
2022-07-20 15:37:20 -07:00
Andrey G c2e28dd24a
Can fix (#126)
* ChibiOS: fix CAN on GD32

* CAN: remove workaround for GD32 (now in ChibiOS)
2022-07-19 15:36:34 -07:00
Matthew Kennedy a08a7dc3de fragments from lib 2022-07-18 15:26:00 -07:00
Andrey G 63ef4b7a10
TS more and more (#123)
* TunerStudio: simplify enable magic

* TS integration: livedata, FragmentEntry

* f1_dual: reorder TS hooks

* f1_rev2: dummy settings for TS

* f1_rev2: TS signature

* f1_rev2: TS ini file

* Integrate with TS interface

* livedata: access adapters, no extern, make livedata static

* FragmentEntry: no FragmentEntry()

* livedata: struct not needed
2022-07-18 12:31:09 -07:00
rusefillc 27566f7b0b
Deliver (#125)
* initial version

* it works!

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-18 02:28:22 -07:00
rusefillc 3ddfc3e35d
tidy cats (#124)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-18 01:20:40 -07:00
Andrey G 8f5a23c2bc
main: always call InitUart, get rid of ECHO_UART (#122) 2022-07-17 16:58:56 -07:00
Matthew Kennedy f40064663b update libfirmware 2022-07-16 22:31:59 -07:00
Matthew Kennedy 1be860538b use math lib 2022-07-16 19:42:30 -07:00
Matthew Kennedy 6135464dc8
use libfirmware for crc, table lookup (#121)
* use libfirmware for crc

* kick

* bootloader

* bootloader

* use shared interpolate2d

* cleanup
2022-07-16 19:08:45 -07:00
rusefillc 700d763c29
f1_dual: fix aux pwm outputs (#119)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-15 23:02:02 -07:00
rusefillc 55f65ad02d
Ts top down (#104)
* TS top down

* TS top down

* TS top down

* TS top down

* Ts top down #104

removing the controversial part

* Ts top down #104

removing the controversial part

* docs

* fix build (switch to serial)

* f1_dual: UART->Serial

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-15 11:10:15 -07:00
rusefillc cb7c9bf612
bootloader: make bootloader flash area reserve optional (#118)
and increase config flash area to 8K

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-15 11:08:44 -07:00
rusefillc a251f60f7a
pump_dac: return float not scalled int (#117)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-15 01:48:49 -07:00
Andrey G 18c22abdfa
bootloader: make bootloader flash area reserve optional (#111)
* bootloader: make bootloader flash area reserve optional

and increase config flash area to 8K

* f1_rev2: empty blflash section
2022-07-15 00:07:41 -07:00
rusefillc b298389fb5
Bat measurment (#113)
* board: f1_dual: add way to measure battery through Heater-

* heater_control: allow board to limit max heater duty

* board: f1_dual: use max sample for battery measurement, filter

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-15 00:07:13 -07:00
rusefillc e51dc3ba0b
f1_dual: set O0 optimization level due to ADC issue on GD32 (#116)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-15 00:06:44 -07:00
rusefillc ee230be7e2
Introducing dual channel board (#109)
* port: ID_SEL2_PIN is optional

Dual version is out of mcu pins and implement only one sel pin.

* board: f1_dial: add dual channel board

* GH actions: add f1_dual build to actions

* f1_dual: use uart driver, not serial

* f1_dual: setup correct remaps

* f1_dual: DEBUG: enable uart debug (disable TS)

* board: f1_dual: add way to measure battery through Heater-

* fix dual board

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-13 23:14:46 -07:00
Andrey G 50b1483c1b
Can mailboxes & timeout (#110)
* CAN: rotate mailboxes used for TX (workaround for GD32)

To avoid overwrite of not-yet-transmitted message by next one.

* CAN: 100mS timeout
2022-07-13 23:10:58 -07:00
rusefillc fa6df58caf
flash.bat utility (#107)
* tested on real stm32

* docs

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-13 10:50:13 -07:00
rusefillc 124c403783
byteswap fix (#108)
* byteswap fix

* no usage even better

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-13 10:37:35 -07:00
rusefillc 463d3d382b
helping Windows openblt build (#106)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-13 09:19:23 -07:00
rusefillc 87390c6218
ignoring OpenBLT artifacts (#105)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-13 09:18:58 -07:00
rusefillc e90cc45787
Flash scripts (#102)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-04 04:24:20 -07:00
rusefillc 1561c13a15
f1_rev2: OpenBLT: update gpio and interfaces setup (#97)
* f1_rev2: OpenBLT: update gpio and interfaces setup

* f1_rev2: OpenBLT: set default board name

* f1_rev2: no need to have bootloader region in main app LD file

* f1_rev2: use gpio settings from application include file

* f1_rev2: OpenBLT: update gpio and interfaces setup

* f1_rev2: OpenBLT: close backdoor

* f1_rev2: OpenBLT: fix uart setup

* f1_rev2: OpenBLT: gracefully close CAN after use

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-04 03:50:31 -07:00
rusefillc 0119d8e716
comments (#101)
* comments

* comments

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-03 20:48:42 -07:00
rusefillc 1454c10713
AUX outputs (#95)
* AUX outputs

* Rev2: define AUX output PWM device and channels

* Rev2: enalbe TIM1 used for aux outputs

* Rev2: define aux output gain

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-03 12:11:12 -07:00
rusefillc fe50e80a89
original hardware by Dave has changed enough (#100)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-03 12:07:01 -07:00
rusefillc 542601da41
Board Rev 2 (#98)
* Board Rev 2

* f1_rev2: fix for new AnalogResult format

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-03 00:00:43 -07:00
rusefillc d1a2ee2b5b
Rev 2: default settings for LSU4.9 (#99)
* Rev 2: default settings for LSU4.9

* Rev2: LSU 4.2 and ADV ESR drive pins

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-03 00:00:17 -07:00
rusefillc 1efc499126
Rev2: GD32 ADC workaround (#96)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-02 13:48:27 -07:00
rusefillc 0430e4a7ba
board: common make script (#73)
* board: common make script

(cherry picked from commit cb087c60e9)

* common_make -> build_f1_board

* f1_rev2: use build_f1_board.sh helper

* Add encedo hex2dfu tools (bin for linux and win)

See https://github.com/encedo/hex2dfu

* Makefile: priduce srec too

* f1_rev2: OpenBLT: build bin and hex files

* f1_rev2: OpenBLT: optimize for size to fit into 8K flash

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-02 13:47:55 -07:00
rusefillc 2fa9549d83
0701 rev2 2 (#91)
* Rev 2: VM_RESISTOR_VALUE

(cherry picked from commit 84ae91fc67cf6764afd5b00210edbc3cfe4444a5)

* Rev 2: default settings for LSU4.9

(cherry picked from commit 5a1fe84bc1ec8d7ee6e0a5f2906a1b18d2ff8a8e)

* Per-board VM_RESISTOR_VALUE

(cherry picked from commit 0bdd19e058db579bed13488066df1176ea9addb2)

* Rev2: ID correct pins

(cherry picked from commit 59e4b36ad9bc7c166c3dae7e25b6317caf562056)

* Rev2: LSU 4.2 and ADV ESR drive pins

(cherry picked from commit 2f2b4399431136951fe2fa6819f44ba28c3cda17)

* Rev2: aux pwm pins: no need to be 50MHz fast

(cherry picked from commit b0af5c07c391438ca561118174df498207255f3b)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-01 15:57:05 -07:00
rusefillc 076406e4b0
f1_rev2: add OpenBLT (#92)
(cherry picked from commit 85e1ac8e5e75e22b247db0f5a512656453425729)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-07-01 12:12:24 -07:00
Andrey G d3d260b828
f1_rev2: set O0 optimization level due to issue with ADC on GD32 (#94) 2022-07-01 12:10:28 -07:00
Andrey G 5ec79b52a5
f1_rev2: this is single channel board (#93) 2022-07-01 12:03:48 -07:00
rusefillc 7d8eaab3d1
Min rev2 (#90)
* Board Rev 2

(cherry picked from commit 2f1e2bd3e27fdfd43f0ccf8292aacfb1194060fc)

* CI good

(cherry picked from commit 2163af402ebc40f76fa53ac8f1648949b12aa50f)

* min r2

* min r2

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-01 01:17:04 -07:00
rusefillc fad49f553f
Crc bootloader (#88)
* more code reuse

* more code reuse

* more code reuse

* more code reuse

* more code reuse

* more code reuse

* make it compile and actually include all the functions

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2022-06-30 10:07:33 -07:00
rusefillc 1b0145d104
GD32: ADC workaround (#83)
(cherry picked from commit 02fd9f248189e3e801b50c920e1166daa23283bc)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-06-29 12:14:08 -07:00
rusefillc 1e19b43d35
s/C/CPP/ (#86)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-06-29 11:43:36 -07:00
Matthew Kennedy cca3c6a5de I'll just do it myself, then 2022-06-29 11:41:45 -07:00
rusefillc 1e3dc3808e
0624 pwm (#81)
* pwm.cpp: support multichannel

(cherry picked from commit 27995893ee)

* pwm.cpp: allow external config

(cherry picked from commit 70856151b7)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-06-29 11:39:50 -07:00
rusefillc ccb790f532
Steal tunerstudio files from RusEFI (#71)
* Steal tunerstudio files from RusEFI

(cherry picked from commit dcba04fbd3)

* Steal crc32 files from RusEFI

(cherry picked from commit bfe88b5297)

* fix TS steal

(cherry picked from commit a77b9761da)

* fix crc32

(cherry picked from commit cdb4df09f6)

* TS stealed from RE

(cherry picked from commit ff470e1340)

* Steal TS

(cherry picked from commit d11406edc2)

* Steal Thread Controller

(cherry picked from commit 2aa5bbd571)

* Update TunerStudio protocol files

(cherry picked from commit 58f14216ec)

* byteswap.h

(cherry picked from commit 581d647fd4)

* bugfix

* one more file to compile, another file not ready - removing from this PR

* removing more from this PR

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-06-29 01:29:40 -07:00
rusefillc 8269687295
Add OpenBLT submodule (#76)
(cherry picked from commit 712eddf0b8)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-06-29 01:03:08 -07:00
rusefillc 1dc862229e
can: avoid stack overflow (#77)
(cherry picked from commit 6f15807902)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-06-25 17:27:33 -07:00
rusefillc 3d14be42dc
Update ChibiOS submodule (#79)
(cherry picked from commit 7993021597)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2022-06-25 17:27:18 -07:00