Commit Graph

1668 Commits

Author SHA1 Message Date
Matthew Kennedy bbb6b6dd14
remove simple cases of LoggingWithStorage (#2569)
* remove simple cases

* more simple

* serial

* s

* more

* try memory

* easy

* mmc acc

* that's how much memory

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-19 08:11:59 -04:00
Matthew Kennedy 5145ee4b62
logging cleanup 2: sensors, pid, etb, etc (#2567)
* ts logger

* sensors

* wideband too

* missed one

* init

* motors, pid, etc

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-18 20:02:32 -04:00
Matthew Kennedy 6b64db7f9c
rewrite text logging system (#2439)
* minor cleanup

* enable mailboxes

* priority

* implement new logger

* more cleaning

* signature

* remove debug

* put the assertion back in

* remove debugging

* spelling

* doy

* tweaks & comments

* cleaning

* size_t

* guard more

* test build now

* needs more ram until we can remove LogginWithSTorage

* hunt for memory

* bootloader

* unused

* stub simulator

* it would help to get the signature right

* geez kinetis only has 64k ram

* more guarding because kinetis

* that's now very legal and very cool

* templatify

* s

* force null terminate

* probably fix

* const

* write a test

* disable sensor chart for now

* hide SC ui

* oh nope that breaks many things

This reverts commit c3c1bb324fb484c3d9cc44b7715c234bc0392e1e.

* missed one

* reset after scheduleLogging

* we can't print out the full message because it contains commas which break parsing

* force terminate long buffers

* let's see how much memory we have to play with

* a lot, is the answer

* real thread name

* shrink this for now before its deleted

* turn that back on

* biiig comment

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-18 18:46:47 -04:00
rusefillc ad22a00ee8 flush SD log 10x faster #2558 2021-04-15 09:42:22 -04:00
Matthew Kennedy 0eabb0cd07
flush 10x faster (#2558)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-15 09:31:38 -04:00
rusefillc fb133676c3 nothing happens here 2021-04-13 23:32:32 -04:00
Matthew Kennedy eb9cc1a08e
multiple mass storage (#2535)
* driver

* plumbing

* guard adjust

* read correct lun

* de-template

* rearrange

* guard

* guard

* memory

* headers

* memory

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-10 08:35:41 -04:00
Andrey G fa840a7593
hip9011 and friends (#2527)
* engine math: extrant getFiringOrderTable for reuse

* engine math: getNextFiringCylinderId helper

* introduce knock_logic: first member is getCylinderKnockBank()

moved from software_knock.cpp

* hip9011: support two inputs/banks

* fix CI

* Board Subaru EG33: populated with TPIC8101 with Advanced mode

* hip9011: test communication in advanced mode

* hip9011: handle situation when chip is already in advanced mode

* Board Subaru EG33: cylinder to knock bank mapping

* hip9011: count spi transactions in advansed mode too

* hip9011: reset incalid responce counter after chip initialization

* hip9011: make debug output more structured
2021-04-04 18:13:21 -04:00
Matthew Kennedy 33e4b0b721
h7 dfu and comments (#2522) 2021-04-03 21:58:29 -04:00
rusefi 0099b7ce10 explicit status for MSD SD mode 2021-04-03 19:42:54 -04:00
rusefi 1406c16119 SD init: document or fix unlock SPI fix #2516 2021-04-01 16:21:19 -04:00
rusefi 3f1d90992e SD init: document or fix unlock SPI #2516 2021-04-01 16:20:08 -04:00
Matthew Kennedy 1dffcf5729
make board config override actually usable (#2508)
* new function

* hellen

* MRE

* proteus

* put those function declarations in a reasonable place

* put the comment back

* weak

* move that to a reasonable place

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-31 14:46:50 -04:00
Andrey G 3d138958ce
Hip9011 (#2512)
* hip9011: coexistance with other spi devices

* hip9011: rework so SPI transfer is invoked from thread

also use polling spi exchange to avoid cache problems

* hip9011: move calculations from ADC callback to thread

* hip9011: big cleanup

* hip9011: simplify spi communication

* No need to set knockBandCustom if it is not custom

HIP9011 calculates knockBand from cylinderBore same way

* hip9011: make unit test happy

* hip9011: fix unit test

* hip9011: remove duplicated initialization, reorder

* hip9011: just renames and data type adjustments

* hip9011: rename BAND() to HIP9011_BAND()

* hip9011: move some code from lookup.cpp to logic.cpp

* hip9011: move initEngineNoiseTable to engine_configuration.cpp

* hip9011: move lookup tables to hip9011_logic.c

* hip9011: remove empty files

* hip9011: additional checks
2021-03-30 10:56:25 -04:00
Matthew Kennedy ed76e22e1b
speed up boot by 48 ms (#2506)
* speed up boot

* two
2021-03-29 22:59:38 -04:00
Matthew Kennedy 7cd79820da
enable serial pins on proteus (#2507)
* enable serial on proteus

* make h7 happy
2021-03-28 17:03:14 -04:00
Matthew Kennedy f0cf4f38ff
fix multi-serial-port insanity (#2476)
* carve out UART specific

* implement channel

* config cleanup

* use new config

* bootloader

* dead code

* s

* h7 inherits f7

* oops

* ok now it's right

* tests

* cleanup

* call setup

* put that in its own file

* cleanup

* format

* guard

* not needed

* improve guarding

* portable

* allow override of uart mode

* fixes for bootloader

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-28 09:06:36 -04:00
Andrey G bbe3291ccd
hip9011: get callback from spark on each cylinder (#2499)
* hip9011: get callback from spark on each cylinder

* hip9011: cleanup unused
2021-03-27 14:12:49 -04:00
Matthew Kennedy 4e3e95db2d
replace print/printMsg with scheduleMsg (#2497)
* start cleaning

* disabled feature means don't print that it's disabled

* cli

* usages

* printMsg -> scheduleMsg

* this is alllll dead now

* no crlf please

* all hope is lost if you manage to hit this line

* tests

* tests

* ok we did actually need that part

* sim

* d

* kinetis

* it did ifdef, not if

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-26 17:23:26 -04:00
Matthew Kennedy 6491c83f73
read configuration from flash exactly once (#2481)
* early hw init

* s

* read configuration exactly once

* cleanup

* housekeeping

* test friendly

* ugh bad merge

* that is a noop

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-25 18:16:26 -04:00
Matthew Kennedy 31ef22eecb
use cpp (#2493) 2021-03-25 18:12:17 -04:00
Matthew Kennedy 6f05bbc332
move some initialization steps earlier (#2480)
* early hw init

* s

* Revert "s"

This reverts commit 10d3039168613cfb2b0cf1c960d2f18894745ce3.

* bor

* I can't type

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-25 16:22:03 -04:00
Matthew Kennedy 51a5b4d6d5
rename setBoardConfigurationOverrides (#2479)
* rename

* proteus

* comments

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-22 14:15:09 -04:00
Matthew Kennedy c19f8da5d2
fix (#2478) 2021-03-20 22:07:52 -04:00
Andrey G 89b631a794
Hip9011 and cleanups (#2477)
* hip9011: move hipCs out of EnginePins to hip9011 driver

* hip9011: cleanup debug output, save few RAM bytes

* Supress few signed vs unsigned warnings
2021-03-20 08:40:36 -04:00
Matthew Kennedy 2196c7f9e8
embiggen MSD stack (#2475) 2021-03-19 19:56:47 -04:00
Matthew Kennedy 599a9b0183
USB uses its own channel, add implementations for serial channels (#2472)
* USB uses its own channel

* revise channels

* put serial ports in their own file

* h7 uart incompatible for now

* guard for sim
2021-03-19 17:05:04 -04:00
Matthew Kennedy d7698f6703
Dedicated code path for USB console/TS (#2465)
* new apis

* dedicated USB path

* move decl

* init

* don't init usb twice

* guard

* check that we're initialized before using TS

* comment

* guard

* guard USB

* brain doesn't go good

* make tests happy

* dead define

* cypress

* ifdef != if

* s

* include priority

* don't start a thread we know we don't need

* bad-ish merge

* const

* why did this code exist...?

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-18 14:07:22 -04:00
Matthew Kennedy be70524ced
harden against various no-boot scenarios (#2468)
* zero length trigger

* validate config

* validate cylinder count

* wrong type on cylinder count

* invalid comment

* invalid SPI
2021-03-17 09:24:13 -04:00
Matthew Kennedy 3072d54717
dead code, warnings (#2461) 2021-03-15 10:23:19 -04:00
Matthew Kennedy 1dd2180f76
VVT uses closed loop controller framework (#2453)
* vvt uses framework

* builds

* rename, update headers

* s

* testable

* write some basic tests

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-14 19:31:46 -04:00
Matthew Kennedy 9d7436c062
implement ads1015 driver (#2458)
* first approximation of ads1015

* fix ads

* misc

* comment

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-14 19:02:42 -04:00
Matthew Kennedy 5a003f8638
use full memory on STM32F42x (#2450)
* linker script

* hook it up
2021-03-13 07:26:58 -05:00
Matthew Kennedy 4d69ae7fc7
put back (#2452) 2021-03-13 06:59:33 -05:00
GitHub build-firmware Action 3266dc1e6d Auto-generated configs and docs 2021-03-13 02:26:53 +00:00
GitHub build-firmware Action 05cc3b0129 Auto-generated configs and docs 2021-03-12 05:52:29 +00:00
GitHub build-firmware Action aba69aa4a7 Auto-generated configs and docs 2021-03-12 05:18:18 +00:00
GitHub build-firmware Action 37038eaaa2 Auto-generated configs and docs 2021-03-12 04:19:00 +00:00
rusefillc 16b8fb64ca vBatt -> SensorType::vBatt fix #2260 2021-03-11 23:07:18 -05:00
rusefillc d650271077 vBatt -> SensorType::vBatt #2260 2021-03-11 22:52:34 -05:00
GitHub build-firmware Action e832e4c40b Auto-generated configs and docs 2021-03-11 19:11:45 +00:00
GitHub build-firmware Action fc918ddd02 Auto-generated configs and docs 2021-03-11 13:40:39 +00:00
GitHub build-firmware Action af21cd11b5 Auto-generated configs and docs 2021-03-11 04:22:28 +00:00
GitHub build-firmware Action e9b9572181 Auto-generated configs and docs 2021-03-11 02:16:35 +00:00
GitHub build-firmware Action 3c355f8825 Auto-generated configs and docs 2021-03-11 00:54:18 +00:00
Matthew Kennedy df5403356c
fix h7 adc (#2442) 2021-03-10 19:52:39 -05:00
GitHub build-firmware Action 2eb3a17dba Auto-generated configs and docs 2021-03-10 22:31:48 +00:00
GitHub build-firmware Action 00e610672f Auto-generated configs and docs 2021-03-09 23:55:38 +00:00
Matthew Kennedy 40c4238f13
enable CAN on H7 (#2393)
* enable

* guard correctly

* h7 bit timing

* allow longer frames

* allow data smaller than maximum

* mcu temperature

* typo

* tx message

* testing

* check for CAN or FDCAN

* don't need that any more

* h7 bitrate config

* undo testing

* h7-ify msg tx

* comment

* break out SID/EID macros

* guard differently

* update ChibiOS

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-09 18:54:01 -05:00
GitHub build-firmware Action 3b6d5e9b24 Auto-generated configs and docs 2021-03-09 13:45:05 +00:00