Commit Graph

508 Commits

Author SHA1 Message Date
Matthew Kennedy 1dd87975a3 missed include 2023-06-06 21:30:16 -07:00
Matthew Kennedy 11af5acbc1 now it actually fails? 2023-06-06 21:21:42 -07:00
rusefillc a454635612
TunerStudio: cleanup (#263) 2023-06-01 21:44:01 -07:00
rusefillc 51c2446889
f1_dual_rev1: OpenBLT (#261)
(cherry picked from commit 790de260f6e335a22737bb7d17d82687e620c838)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-29 16:08:21 -07:00
rusefillc 96a40b4da4
f1_common: fix MFS flash allocation for STM32F103RCT6 used on dual_rev1 (#260)
(cherry picked from commit 258d33e8a7b79846afd4e0db791d87476b9d2041)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-29 16:07:23 -07:00
rusefillc 4022b40b31
Sample script to flash using OpenBLT over CAN (#257)
(cherry picked from commit 4c877b63e44966f5373c264a3c82556ac9883761)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-29 15:49:57 -07:00
rusefillc bd4646d87c
f1_port: handle MFS errors (#258)
(cherry picked from commit b23b04edf24fabfd99461e7ca38ea165836645e6)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-29 15:49:11 -07:00
rusefillc d8f8783d8c
OpenBLT: extract common code for f1 boards (#255)
(cherry picked from commit b892ed7520b20f00f1dbae88001798453a5bb07d)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-29 15:17:22 -07:00
rusefillc 5ae6cfbb41
f1_dual_rev1: fix LD file (#254)
(cherry picked from commit e9c0a26692d5f7bd8c0f1c46a2fd9b74edd223bf)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-29 15:16:45 -07:00
rusefillc 4667e991d4
max3185x: support also max31856 (#253)
(cherry picked from commit 703985dc709afad2df0ff69d929751894da51b34)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-29 15:16:28 -07:00
rusefillc e52e4a0768
f1_dual_rev1: fix SPI1 remap (#252)
(cherry picked from commit 38037e8b46ea4f9c2dd370560e6138ed35ade2f7)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-29 15:12:12 -07:00
rusefillc f8ad24484f
dual-rev1 Secondary uart settings (#247)
* f1_dual_rev1: secondary TS port (BT)

* f1_dual_rev1: two TS serial ports: primary over BT, secondary over J3

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-29 14:45:37 -07:00
rusefillc 025b687673
auxout: no need to invert PWM signal in software (#248)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-29 14:45:08 -07:00
rusefillc 9534851a66
livedata: temp is now packed int16 (#250)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-29 13:11:55 -07:00
rusefillc 94de9fd776
TS: report Nernst AC too, convert Nernst voltages to uint16 (#249)
* TS: report Nernst AC too, convert Nernst voltages to uint16

* TS: report Nernst AC too, convert Nernst voltages to uint16

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-05-03 14:51:34 -07:00
rusefillc 9519ad51dd
indication: advanced indication with per-channel status led (#235)
* indication: advanced indication with per-channel status led

(cherry picked from commit b486dfe682622c9835cf00457834cebf6e34da2f)

* f1_dual_rev1: enable advanced indication

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-03 13:18:05 -07:00
rusefillc b1bf9bf185
Rev 1pwm (#242)
* f1_dual_rev1: fix analog aux output PWM definitions

(cherry picked from commit 50e346dfcb9f223c6e0ee6cdc700cb376b536834)

* fix pwm definitions

(cherry picked from commit ce9e69b997290bbd7abcfe5af2926b1d556070cf)

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-03 11:46:32 -07:00
rusefillc 67f4aa45fe
uart: introduce TS_SECONDARY_SERIAL_PORT (#245)
(cherry picked from commit 9d8bbe38d1e63384ef0d66d3330363c894f2901b)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-05-03 11:46:13 -07:00
rusefillc c7a8365ea3
f1_dual_rev1: update ADC, measure Un_sense, avoid clamping (#244)
(cherry picked from commit 26f12766968a1999e1f12e06720ecbc334a91add)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-28 22:02:09 -07:00
rusefillc 8bd19fcc2c
Aux2 (#243)
* auxout: manually fill pwm config

(cherry picked from commit a01876bc034264de5d6930bf2cc49cf0fc0cbb0a)

* auxout: some boards use primary PWM outputs instead of complementary

(cherry picked from commit c13b95441e7b284a36445c261199e96580e94ebd)

* auxout: implement ripple cancelation using inverted PWM

(cherry picked from commit 77cbc04990421b24021639b098ea6040af3a12f8)

* f1_common: default AUXOUT value is AFR voltage

with 'default' scaling 8.5 to 18.0 AFR is represented with 0.0 to
5.0V

(cherry picked from commit 0c62ab8f509ff0ab3ab4260e308ad4b55bd64e40)

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-28 22:01:13 -07:00
rusefillc 25c5e249d9
Dual 1 (#241)
* f1_dual_rev1: add pinmux settings for port F and G

To supress compiler warning.

(cherry picked from commit 89876fe8eaad933308b63a4b0b1666deb75bfc84)

* f1_dual_rev1: fix remaps

-disable JTAG to free PA15, PB3, PB4
-use SPI3 for EGT chips without remaping

(cherry picked from commit 598f1aa0779ba6e90ccf2eb74445d074f2bfbc75)

* f1_dual_rev1: disable unused TIM1, TIM2

(cherry picked from commit 9e71c3813fd09c080c0eb2f1e63fe82b475efb4f)

* f1_dual_rev1: run at 72MHz from HSE

(cherry picked from commit eaa4577ef85bdfdba637c203646883202a1f8e02)

* f1_dual_rev1: fix can timings

(cherry picked from commit 6437b3d92047adefe6534efaa57062bdda449d37)

* f1_dual_rev1: add CAN timings for 125L, 250K and 1Mbps

(cherry picked from commit bc988d10dda43bfc8b4566de274e3b99bc6b8a5e)

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-27 14:12:48 -07:00
rusefillc 78faa25b15
better file name to facilitate upload/download (#240)
for instance see https://rusefi.com/online/ini/rusefi/2023/04/21/
2023-04-27 12:59:23 -07:00
rusefillc ef1c89a51d
Dual rev1 (#229)
* f1_dual: revision 1

(cherry picked from commit 855585fcf66d5ca8d1d549236c1c472bbfcaa356)

* github: build f1_dual_rev1

(cherry picked from commit 8ac01d43831b5231303a430cdf56fcabafe9c990)

* pump_dac: support DAC as utput interface

(cherry picked from commit 5240ec1a9ed88110e63785b1611223bb4f6a023c)

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-27 12:56:27 -07:00
rusefillc 9d618d228e
auxout: designated initializers (#230)
(cherry picked from commit d458a094b64de13e8a1540dc0fb4facade6b332f)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-27 12:55:05 -07:00
rusefillc 4ca946b91a
uart: rename UART_DEBUG to DEBUG_SERIAL_PORT (#236)
Also allow coexistance of DEBUG_SERIAL_PORT and TS_ENABLED

(cherry picked from commit 87cb7d1309cb8aac38f2e4e979252690df0cbb39)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-27 12:54:32 -07:00
rusefillc 5c06f03439
doc (#237) 2023-04-27 12:53:37 -07:00
rusefillc 27deaf524b
doc (#234)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-04-27 12:53:21 -07:00
rusefillc b5947eab1d
doc (#233)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-27 12:53:15 -07:00
Andrey G 998d75557d
dac: fix overflow (#238) 2023-04-26 14:01:14 -07:00
rusefillc 21202975b9
TS: serial: do not disable serial after failed BT init attemp (#231)
Instead enable it on default baudrate and wait for direct connection

(cherry picked from commit 4f2aa57bee6a50195768ffb0e7d7d2ff374048e4)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-20 11:22:59 -07:00
rusefillc 2f90b66fdb
f1_rev2: remove duplicated definitions (#227)
(cherry picked from commit 10b482e759cf2f0aa0d55e53ad540737586e3991)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-17 16:25:44 -07:00
rusefillc 898fa20c2b
Dac helper (#226)
* dac: move helpers to separate cpp and h

(cherry picked from commit aee71931db269fc256ab43e1fb84b71c77e215d7)

* dac: HAL_USE_DAC guards

(cherry picked from commit 5517844e4d0f79c7cf8c5bb097c110541063bddf)

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-17 14:11:34 -07:00
rusefillc 36d57e7d73
TS: report heater effective voltage (#225)
(cherry picked from commit c37180517d5522876a7efb7fcc17a3ca40ffee9f)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-17 14:10:38 -07:00
rusefillc 0abaae13e7
f1_dual: remove duplicated definitions (#224)
(cherry picked from commit 57b3ac51770fb7676d1bd93daac9384d44f18667)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-04-17 14:08:45 -07:00
rusefillc 26564a0efc
More on magic constants (#223)
* More on magic constants

* More on magic constants

* More on magic constants #223
2023-04-12 19:46:30 -07:00
Matthew Kennedy a588f15808 board can override CAN format 2023-03-28 00:01:21 -07:00
Matthew Kennedy 0b27e6a8e7 Merge branch 'master' of https://github.com/mck1117/wideband 2023-03-27 23:08:08 -07:00
Matthew Kennedy 0e1161b6d7 cleanup 2023-03-27 23:08:05 -07:00
rusefillc ebc39b3690
f1_rev3: used MCU has gpio port F and G (in bigger package) (#221)
Set safe state for gpio ports F and G to keep compiler happy.

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-03-24 14:59:06 -07:00
Matthew Kennedy 9d4fabeda7 Use temperature thresholds instead of ESR thresholds 2023-03-22 14:59:52 -07:00
rusefillc e9343db75f
fail fast (#216)
* fail fast

* More of bash magic

---------

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-03-21 11:20:48 -07:00
Andrey G e9b942df31
heater_control: hanle no supply state (#219) 2023-03-21 11:20:19 -07:00
Matthew Kennedy 85e61227ab this is port specific 2023-03-15 18:08:40 -07:00
Matthew Kennedy 00cc305d02 GetCanConfig 2023-03-15 18:07:31 -07:00
Matthew Kennedy 120b37c4b7 Merge branch 'master' of https://github.com/mck1117/wideband 2023-03-06 21:28:36 -08:00
Matthew Kennedy 9c7b9364c7 don't need to specify full path, just folder for dst 2023-03-06 21:28:31 -08:00
rusefillc 84c7c4c576
time to squash (#213)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-03-06 21:26:32 -08:00
rusefillc 6364c7cb2c
TS: use BOARD_NAME in Test and Version commands reply (#211)
* TS: use BOARD_NAME in Test and Version commands reply

* making source code two bytes smaller

* making source code two bytes smaller

* making source code two bytes smaller

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-03-06 21:18:54 -08:00
Matthew Kennedy 43def3f982 output to deliver dir, so that ci picks it up 2023-03-06 21:12:49 -08:00
rusefillc fa2b205583
Openblt composite hex (#212)
* composite OpenBLT+Wideband hex file

* Install srecord for srec_cat

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-03-06 01:32:34 -08:00
rusefillc 248794965d
main: do not forget to call startTunerStudioConnectivity() (#210)
Currently useless.

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-02-27 15:27:25 -08:00
rusefillc b5ed6d3af7
heater_control: smarter PWM duty limiting for VBat measurement (#196)
Apply duty cycle limit only 2 cycles of 20 (per second). This
allows 100% duty PWM while heating sensor on low VBat.

(cherry picked from commit 28a01bd6c3dad0d0712a3b6412b9e87fe514555b)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-02-25 11:51:12 -08:00
Andrey G a9bc33abbd
LSU type from settings (#207)
* port: per-board SetupESRDriver() and GetESRSupplyR() functions

* Pick sensor type from settings

* f1_rev2: build helper for LSU4.2 FW
2023-02-25 11:46:36 -08:00
Andrey G f7b2326b44
TS: ini: hide invalid sensor types (#209) 2023-02-19 23:20:32 -08:00
rusefillc d8b8ba7019
MemFault: supress warning about unused faultAddress (#205)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-02-17 11:43:21 -08:00
rusefillc df5d7ed4cd
ts: fix compilation warning (#206)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-02-17 11:42:35 -08:00
rusefillc bb86ba1e6b
Warning (#200)
* AUX out: cleanup warning

(cherry picked from commit f52b12c5d77ed537060eca4ba4a48392ed8e2418)

* HardFault handler: fix unused warning

(cherry picked from commit 6baa0fc1207142990b1501354a2b88ea322f1c4f)

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-02-15 10:25:28 -08:00
Matthew Kennedy ab84b694b6 decode temperature based on sensor type 2023-02-15 10:24:30 -08:00
rusefillc 62520aee78
TS: dead code (#197)
(cherry picked from commit 3a4bd2c3f8796297dca20441ba93a810d52ea3e6)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-02-15 10:19:01 -08:00
rusefillc 2bb430d32b
TS serial: do BT setup only after 30sec timeout (#199)
This will avoid BT module restart after MCU restart. This will keep
BT connection between MCU reboots.

(cherry picked from commit 12443d73a0fa2a1fd0de0dcae3231473016b9efb)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-02-15 10:17:54 -08:00
Matthew Kennedy 2f79f62399 lsu 4.9 and adv temperature curves 2023-02-14 13:53:52 -08:00
rusefillc 4148ba1567
heater: do index to channels mapping in all cases (#189)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-02-05 12:39:21 -08:00
rusefillc 6d908fb110
f1_dual: sample PWM pins first than do math (#190)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-02-04 18:21:22 -08:00
rusefillc ac44c6bbef
pump_dac: GetPumpOutputDuty() translate logocal to physical pwm channel (#188)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-02-02 17:00:49 -08:00
Matthew Kennedy f1448e5cf1 lambda conversion for LSU 4.2, stub LSU ADV 2023-02-02 16:58:52 -08:00
rusefillc 2a6d13f57c
CAN: send data for all AFR channels (#186)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-02-02 16:38:16 -08:00
rusefillc 4730f1a2ca
TS ini files: add gauge8 to have 2x4 default layout (#184)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
2023-02-02 16:36:28 -08:00
rusefillc f4bd1a4197
Smaller version of heater settings for other types of sensors (#183)
* heater settings for other types of sensors

* port: GetSensorType

* fancier C++ version

* fancier C++ version

* Why not a function

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-02-01 11:43:52 -08:00
Matthew Kennedy f365492565 c++ instead of deifnes 2023-01-29 02:06:11 -08:00
Andrey G 8bfe7faecb
TS minor fixes (#178)
* ts: fix copy-paste

* TS: fallback to default baudrate if BT setup failed

* io_serial: BT setup: no goto

* ini: dual: fix typo

* ts: BT: fix baudrate switch when using JDY33
2023-01-29 02:02:59 -08:00
Andrey G a6052895e9
f1_dual/rev3: Revert CPU clock back to 48 MHz due to ADC problems on GD32 (#181) 2023-01-23 11:23:14 -08:00
Andrey G 2132e50c93
Fix fault handlers for Cortex-M0 (#180) 2023-01-16 03:49:00 -08:00
Andrey G e5a7952db0
Ts dev (#175)
* Remove pageValueWrite command support

Move advanced pageChunkWrite is used

* Straight logic in validateOffsetCount(), simplify, move to tunerstudio.cpp

* Remove some more unused commands

* More unused defines

* Command defines cleanup

* Test command

* TS: fix signature

* pageIdentifier is optional

* pageActivate command is not used

* TS: extract offset and size from incoming packet only for packets with such data

* TS: cast to packet header

* TS: use page in commands

* TS: support scatteredOchGetCommand

* TS: incapsulation

* TS: scatter: optimization for CPU load

* More CPU load optimization

* Update libfirmware
2023-01-11 00:29:22 -08:00
Matthew Kennedy 60445fbed3 catch faults 2023-01-05 16:56:28 -08:00
rusefillc 89d15aefa4
docs (#167)
* docs

* At least some doc is better than zero doc?

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-01-01 03:28:15 -08:00
Andrey G 45fc9e4d78
TS: fix signature (#176) 2022-12-22 08:08:30 -08:00
Andrey G cdf632652b
f1_X: adjust CAN timings for 64MHz CPU clock (cAN clock is 32MHz) (#177) 2022-12-22 08:08:03 -08:00
Andrey G 1aa7c661f6
f1_rev and threads (#173)
* f1_rev3: high speed (strenght) for heater PWM output

* threads: set name for all thread

* f1_dual: enalbe CH_CFG_USE_REGISTRY so GDB can see thread

* f1_rev3: enalbe CH_CFG_USE_REGISTRY so GDB can see thread
2022-12-12 19:29:32 -08:00
Matthew Kennedy 1e3a227f50 add ESR, fix datalog section 2022-12-06 17:05:49 -08:00
Matthew Kennedy 387c03a4d7 avoid bogus temperature with disconnected sensor 2022-12-06 17:00:20 -08:00
Matthew Kennedy a7961e178f bad signature copypaste 2022-12-06 16:59:36 -08:00
Matthew Kennedy d0434da08f ini updates 2022-12-06 16:58:28 -08:00
Matthew Kennedy 4d37f3748a oops snuck in 2022-12-06 16:57:03 -08:00
Matthew Kennedy 3807bb20e2 ini updates 2022-12-06 16:46:07 -08:00
Matthew Kennedy 36c0c3e4ab spelling 2022-12-06 15:53:36 -08:00
Matthew Kennedy 85365bcb68
faster f1 clocks (#172)
* faster f1 clocks

* PWM happy
2022-12-03 17:23:02 -08:00
Matthew Kennedy e015576e71 disable aux out dac PWM primary outputs as it conflicts with serial 2022-12-03 02:00:52 -08:00
Matthew Kennedy 1543561ed2 Revert "Revert "turn off unused OS features""
This reverts commit e48fa2cbba.
2022-12-03 01:35:20 -08:00
Matthew Kennedy e48fa2cbba Revert "turn off unused OS features"
This reverts commit cc25a0f94f.
2022-12-03 01:15:01 -08:00
Matthew Kennedy 3c0f930508 ini updates 2022-12-02 23:31:32 -08:00
Matthew Kennedy 6d0c971ec9 typo 2022-12-02 22:34:26 -08:00
Andrey G 94c348b88b
Jdy33 (#171)
* tunerstudio: support JDY33 BT module init on UART

* tunerstudio: BT: try most popular baudrates first

* tunerstudio: BT: protect from overflow

* tunerstudio: BT: limit retries

* tunerstudio: BT: directly do chprintf() to SD device

* TS: serial: make BT setup optional
2022-12-02 14:08:11 -08:00
Matthew Kennedy cc25a0f94f turn off unused OS features 2022-12-02 13:20:35 -08:00
Matthew Kennedy 320efe05a5 memory savings 2022-12-02 02:07:21 -08:00
Matthew Kennedy f654cbd14b don't keep two or three copies of the config 2022-12-02 01:46:23 -08:00
Matthew Kennedy 75d48dfe8e tweak uart debug text 2022-12-02 00:58:03 -08:00
Matthew Kennedy 91c989dc9a speed tuning 2022-12-01 23:41:19 -08:00
Matthew Kennedy 0870981763 minor cleanup 2022-12-01 22:55:55 -08:00
Matthew Kennedy 91677672bf
use gcc 11.3 (#166)
* use gcc 11.3

* does the full image work?

* does this work?
2022-12-01 16:15:05 -08:00
Matthew Kennedy 3518b4397a save f0 memory, turn off OS features 2022-12-01 15:59:30 -08:00