Commit Graph

1992 Commits

Author SHA1 Message Date
rusefillc c1275af29c reduce chance of invalid CAM setting fix #3105 2021-08-03 22:15:40 -04:00
Matthew Kennedy 25414ebdad
yet more pch (#3068)
* big pch energy

* put back ramdisk stub

* tests are happy

* h743 nucleo

* kinetis

* I love deleting code!

* make stepper happy

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-08-03 22:05:01 -04:00
Andrey fe0ae21a16 unit test for vehicle_speed.cpp fix #3081 2021-08-03 20:22:48 -04:00
Andrey 8fe2d99254 unit test for vehicle_speed.cpp #3081 2021-08-03 19:48:24 -04:00
Andrey faaf547e8b boards file clean-up 2021-08-03 04:06:06 -04:00
Matthew Kennedy 6eab1fe506
s (#3101) 2021-08-02 19:17:17 -04:00
Matthew Kennedy a8eddbccf6
perform extra-step-prevention in the stepper driver itself (#3038)
* perform extra-step-prevention in the stepper driver itself

* isBusy flag

* I am unable to type

* the court of public opinion has decided that greater-equal is correct

* that sets target in steps, not percent

* correct var name

* mock stepper motor

* testable stepper

* build is happy

* helping build
2021-08-02 07:03:57 -04:00
Andrey G c091b18baf
Int flash fixes (#3089)
* STM32F7xx: flash write parallelism settings

Datasheed allows 32bit program operation only for 2.7..3.0
While RM defines wider range...

* Add parentheses to defines

* intFlash: show all errors to user

Currently only erase error was exported to user. Flash write error
was silent. Also define few additional error codes and show it to
user.
2021-08-01 18:26:42 -04:00
rusefillc ac6cb0601c unit test for vehicle_speed.cpp #3081 2021-08-01 12:19:59 -04:00
Andrey 511b5c22dd unit test for vehicle_speed.cpp #3081 2021-08-01 12:09:53 -04:00
Andrey G 435f712e84
Remove outdated option CH_DBG_ENABLE_TRACE (#3087)
Not used since RT5
2021-07-31 07:51:13 -04:00
Andrey d3523e5010 another dead line 2021-07-31 01:37:51 -04:00
Andrey 139c2593d5 dead var 2021-07-31 01:36:50 -04:00
Andrey 7d551a062e RUSEFI MSD to contain bundle-specific URL #2848 2021-07-30 22:47:35 -04:00
Andrey 2dedcb1152 RUSEFI MSD to contain bundle-specific URL #2848 2021-07-30 22:26:30 -04:00
Andrey 2744fa53bc RUSEFI MSD to contain bundle-specific URL #2848 2021-07-30 22:23:52 -04:00
Andrey c601659dc7 RUSEFI MSD to contain bundle-specific URL #2848 2021-07-30 21:45:55 -04:00
Andrey 7888574bf0 RUSEFI MSD to contain bundle-specific URL #2848 2021-07-30 21:18:51 -04:00
Andrey 477dc27992 Wrap PAL driver into universal 'startDigitalCapture' #2123 2021-07-30 20:57:01 -04:00
Andrey 608d5de22f Wrap PAL driver into universal 'startDigitalCapture' #2123 2021-07-30 20:48:26 -04:00
Andrey 54b29c8196 Wrap PAL driver into universal 'startDigitalCapture' #2123 2021-07-30 20:30:52 -04:00
Andrey 50240c6500 Wrap PAL driver into universal 'startDigitalCapture' #2123 2021-07-30 20:15:53 -04:00
Andrey 1ce05e9a02 Wrap PAL driver into universal 'startDigitalCapture' #2123 2021-07-30 20:10:34 -04:00
rusefillc 21a821d751 more details into output 2021-07-30 19:33:31 -04:00
rusefillc 5331daf559 RUSEFI MSD to contain bundle-specific URL #2848 2021-07-30 19:13:43 -04:00
Matthew Kennedy 9b4f8a3a29
flash erase cache invalidate (#3073)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-07-30 16:52:55 -04:00
Andrey 8c72fdfd93 RUSEFI MSD to contain bundle-specific URL #2848
refactoring and progress
2021-07-30 16:23:01 -04:00
Andrey 4f9b3cc4d0 RUSEFI MSD to contain bundle-specific URL #2848
refactoring and progress
2021-07-30 16:07:37 -04:00
Matthew Kennedy b52d50bbf2
Use pch in lots of files (#3066)
* most engine.h

* most engine_configuration

* more

* more

* more

* more

* more

* moooooore

* ok I'm done for now

* oops
2021-07-26 01:05:17 -04:00
Andrey 17ee26293c todo 2021-07-25 12:45:28 -04:00
Andrey 37247db383 Clutch switch inverted options do not invert detected pedal position
#3044
2021-07-24 18:44:13 -04:00
rusefillc ca34562d5d Clutch switch inverted options do not invert detected pedal position #3044 2021-07-24 15:54:51 -04:00
Matthew Kennedy f70c844c60
H7 ADC triggered by hardware timer (#3028)
* config

* allow changing adc speed

* timer triggered ADC

* ICU on nucleo

* turn that off too

* 10khz

* make those default for all h7

* I can't type
2021-07-23 14:50:35 -04:00
Matthew Kennedy 09192cfc4d
fast adc callback (#3031)
* fast adc callback

* guard

* missed one

* now cypress will be happy
2021-07-23 14:19:59 -04:00
Matthew Kennedy 0f0b84a6db
remove TS file read (#3004)
* remove

* more defines

* test

* lots of java

* s
2021-07-21 14:24:53 -04:00
Matthew Kennedy b28e8348ce
sd card indicators (#3001)
* sd bits

* rusefi.input
2021-07-20 21:29:24 -04:00
Matthew Kennedy c3699f8353
H7 turn off USB before reset (#2999)
* turn off USB before reset

* comment

* add link
2021-07-20 19:39:26 -04:00
Andrey 1447647411 Button to apply nDBANK #2996
still does not work
2021-07-20 15:42:57 -04:00
Andrey 7b44b5f5f3 Button to apply nDBANK #2996
it does not work, i give up for now time to install STM Cube :(
2021-07-20 14:15:58 -04:00
Andrey c93e7e7d3a Button to apply nDBANK #2996 2021-07-20 13:20:34 -04:00
Matthew Kennedy d1941aa38e
osc detector on H7 (#2992)
* detect clock with TIM11 instead of TIM5

* s

* h7 has a different register name

* detect on H7

* cleanup

* comment

* use define

* f4 typo
2021-07-19 21:58:23 -04:00
Matthew Kennedy a0a5d42eed
detect clock with TIM11 instead of TIM5 (#2989)
* detect clock with TIM11 instead of TIM5

* s

* h7 has a different register name

* s

* rename
2021-07-19 18:04:59 -04:00
rusefillc aee2ed4ba4 New hardware testing commands #2978 2021-07-17 13:42:10 -04:00
Matthew Kennedy 2ce7777865
don't require EXTERN_ENGINE in every file (#2969)
* move enginePins

* no more extern engine

* uses

* more

* extern config too

* put this where it belongs

* include correct header

* merge
2021-07-16 18:13:33 -04:00
Matthew Kennedy a62d6743bc
lua hooks for CAN tx (#2967)
* CanTxMessage usable from unit test

* testLuaReturnsNil

* CAN hook and tests

* it helps if parameter names exist

* nameless params

* s

* redefinition of default argument

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-07-16 14:06:26 -04:00
Andrey 03bb3e3ace trigger signal debug pins - logic level output #2959
test driven development is still amazing
2021-07-15 09:29:14 -04:00
Andrey 74e5eb8bb7 trigger signal debug pins - logic level output #2959 2021-07-15 02:12:57 -04:00
Andrey 5c2477752e all aboard the God object! 2021-07-15 02:00:48 -04:00
Andrey 70cc334eb2 trigger signal debug pins - logic level output #2959 2021-07-15 01:56:04 -04:00
Andrey f3b0310058 trigger signal debug pins - logic level output #2959 2021-07-15 01:49:07 -04:00
Andrey c513e976ed trigger signal debug pins - logic level output #2959 2021-07-15 01:46:30 -04:00
Andrey 23be588af6 trigger signal debug pins - logic level output #2959 2021-07-15 01:28:44 -04:00
Andrey 26481f4c2a progress 2021-07-15 01:18:38 -04:00
Andrey c30064cd15 progress 2021-07-15 01:17:42 -04:00
Andrey b1f721e20b trigger signal debug pins - logic level output #2959 2021-07-15 00:50:29 -04:00
rusefillc b65c4b5612 trigger signal debug pins - logic level output #2959 2021-07-15 00:03:31 -04:00
Andrey 6c8e80285e trigger signal debug pins - logic level output #2959 2021-07-14 23:20:18 -04:00
Andrey 85b9bbaa68 trigger signal debug pins - logic level output #2959 2021-07-14 23:05:51 -04:00
Andrey e721c1768f trigger signal debug pins - logic level output #2959 2021-07-14 22:51:08 -04:00
Andrey a926357a01 making code more testable 2021-07-14 22:37:05 -04:00
Andrey 0f6930471f making code more testable 2021-07-14 22:02:28 -04:00
Matthew Kennedy d475b4721f
Start on HSI clock (#2957)
* chibios uses HSI

* set pll to use HSE

* simplify capture

* even better logging

* string

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-07-14 15:20:38 -04:00
rusefi 7f8bdf7006 printing autoDetectedPllMValue in console 2021-07-14 12:42:35 -04:00
Andrey 994230be65 trigger signal debug pins - logic level output #2959 2021-07-13 20:15:55 -04:00
Andrey b2f09de277 refactoring - making method available 2021-07-13 19:28:03 -04:00
Andrey f028c4d727 trigger signal debug pins - logic level output #2959 2021-07-13 18:16:32 -04:00
Matthew Kennedy 15353ae3b2
auto detect HSE clock speed (#2952)
* detect hse

* implementation

* these boards don't need to set their own HSECLK

* assertions

* name

* tweaks

* how did this compile?

* s

* biiiig comment

* this script doesn't need to set 25mhz any more

* ....or PLLM

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-07-12 20:51:35 -04:00
rusefillc 363ef89a20 typo 2021-07-11 10:16:35 -04:00
Matthew Kennedy 7a21f7fbc0
inject (#2938) 2021-07-09 17:02:25 -04:00
Matthew Kennedy 43e6cef77d
more graceful chibios assertion failure (#2859)
* no custom assert hook

* dead

* setjmp/longjmp

* always call tid hook

* tests get threadid

* simulator threadid

* kick

* stubs for kinetis

* make it happier

* noreturn

* oops

* comments

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-07-05 18:18:58 -04:00
Andrey G ca4caf1df8
Chibios-Contrib for stm32 (#2903)
* Add Chibios-Contrib for STM32F/H too

* ports: stm32: add community hal and cmu configs for STM32

* ports: stm32: community: disable CRC driver
2021-07-05 09:53:45 -04:00
Matthew Kennedy 5c60973dd8
Consolidate hwHandleShaftSignal (#2875)
* consolidate trigger input

* merge functions

* comment

* dead

* hw vs. not hw

* stray comma

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-06-28 10:06:22 -04:00
Matthew Kennedy 2475cb283b
warnings (#2862)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-06-25 20:58:38 -04:00
Andrey G 802afaed34
Fixes eg33 (#2838)
* CAN HW: use designated initizalization

* board subaru eg33: set CAN transceiver EN to active state constantly

While FW does not handle CAN transceiver's EN signal
2021-06-20 08:18:16 -04:00
Andrey G a1387d3bd2
Fixes (#2807)
* tle6240: fix Matt's trap

* map: report some default value if no map sensor configured

Othervise user will get "unexpected MAP value" warning

Thread 2 hit Breakpoint 1, validateMap (mapKPa=3121.66162) at ./controllers/sensors/map.cpp:126
126		if (cisnan(mapKPa) || mapKPa < CONFIG(mapErrorDetectionTooLow) || mapKPa > CONFIG(mapErrorDetectionTooHigh)) {
(gdb) bt
 0  validateMap (mapKPa=3121.66162) at ./controllers/sensors/map.cpp:126
 1  0x002717dc in getMap () at ./controllers/engine_cycle/map_averaging.cpp:334
 2  0x0028175a in GetMapWrapper::getMap (this=0x2004214c <mapWrapper>) at ./init/sensor/init_map.cpp:12
 3  0x0028177c in operator() (__closure=0x0) at ./init/sensor/init_map.cpp:20
 4  0x002817a8 in _FUN () at ./init/sensor/init_map.cpp:21
 5  0x002811de in FunctionPointerSensor::get (this=0x20042150 <mapSensor>) at ./controllers/sensors/function_pointer_sensor.h:24
 6  0x002651c0 in SensorRegistryEntry::get (this=0x2003ddf0 <s_sensorRegistry+48>) at ./controllers/sensors/sensor.cpp:111
 7  0x002653e2 in Sensor::get (type=SensorType::Map) at ./controllers/sensors/sensor.cpp:208
 8  0x00261f38 in updateTunerStudioState (tsOutputChannels=0x2003d2e8 <tsOutputChannels>) at ./console/status_loop.cpp:637
 9  0x00262e48 in prepareTunerStudioOutputs () at ./console/status_loop.cpp:900
 10 0x00260914 in TunerStudio::cmdOutputChannels (this=0x20021a64 <tsInstance>, tsChannel=0x2003d4dc <usbChannel>, offset=0, count=340) at ./console/binary/tunerstudio_commands.cpp:24
 11 0x00260584 in TunerStudioBase::handleCrcCommand (this=0x20021a64 <tsInstance>, tsChannel=0x2003d4dc <usbChannel>, data=0x2003d4e1 <usbChannel+5> "", incomingPacketSize=5)
    at ./console/binary/tunerstudio.cpp:701
 12 0x0025fb3c in tsProcessOne (tsChannel=0x2003d4dc <usbChannel>) at ./console/binary/tunerstudio.cpp:537
 13 0x0025fbe2 in TunerstudioThread::ThreadTask (this=0x2003d608 <usbConsole>) at ./console/binary/tunerstudio.cpp:554
 14 0x0025f094 in ThreadController<1200>::StaticThreadTaskAdapter (thread=0x2003d608 <usbConsole>) at ./controllers/system/thread_controller.h:37
 15 0x0020035e in _port_thread_start () at ChibiOS/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.S:201
2021-06-10 19:39:48 -04:00
Matthew Kennedy a54a5e7f90
convert gpiochips to c++ (#2761)
* core

* basic header

* tests are happy

* tle6240

* tle8888

* 33972

* 33810

* tle8888_req_init

* unused warning

* warning

* unsigned

* 8888 debug

* fix

* don't qualify

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-06-10 04:11:01 -04:00
Matthew Kennedy 526f1f97a0
Assorted todos (#2762)
* gpiochip todos

* fuel computer

* this was already done
2021-05-30 19:23:29 -04:00
Matthew Kennedy 6d19adb24f
remove old config override (#2763) 2021-05-30 13:31:36 +03:00
Andrey G c81b01b47a
mc33810: set ignition outputs to GP mode (#2756)
IGN mode does not want to fire Subaru ignitor
2021-05-29 05:07:04 -04:00
Matthew Kennedy 080d901222
non blocking flash on f7 dual bank 2MB (#2749)
* f7 dual bank flash

* only start thread if necessary
2021-05-29 08:05:29 +03:00
Andrey G dbfe0e0fbc
Flash fix erase check (#2750)
* Fix flash erase error formating

* Flash F7: do magic calculation with local copy of sector number

* Falsh stm32: simplify

* typo?
2021-05-28 20:35:54 +03:00
Andrey 112370ae6c mkfs.fat phase kills gen_config #2736 2021-05-24 15:35:35 -04:00
Andrey 54343b7d74 mkfs.fat phase kills gen_config #2736 2021-05-24 09:04:37 -04:00
David Holdeman 6d4060d824
Doxygen titles (#2728)
* move addRow call

* undo submo bump

* add header titles
2021-05-22 22:10:58 +03:00
Matthew Kennedy 20cef63d32
Lua on f407, try again (#2725)
* lua on f4

* move perf trace to efifeatures

* check that it's defined

* cypress and kinetis

* it would help to define the correct thing

* disable buffer if not used

* we can work with 2k

* turn off ramdisk on mre qc

* wow strncpy is useless for truncated strings

* turn off for bootloader

* lto bootloader

* memory

* memory
2021-05-20 23:05:18 +03:00
Andrey ba758dd5cb refactoring magic constant STOICH_RATIO 2021-05-20 02:36:55 -04:00
Matthew Kennedy 2d5353b3d5
actually fix F7 flash this time (#2719)
* f7 sector sizes

* loop dsb

* correct sector index on f7
2021-05-18 17:40:59 -04:00
Matthew Kennedy 0ea1f15ca3
compile gpiochips as cpp (#2702)
* rename

* core

* structing

* more

* makefile

* structing

* 6240 compiles

* explicit cast instead of implicit narrowing

* 8888

* no extern C

* fix tests build

* extern "C"

* 33810

* 8860

* 33810

* linker

* unbreak master

* don't need that if compiling as C++

* bump config

* fix test

* tests

* unit tests bad merge

* build

* move subaru logic to cpp file

* cpp goodness

* hpp include

* this is probably the right thing to do

* simulator
2021-05-17 08:42:56 +03:00
Andrey G 8ac3de90fd
Hw layer rearrangement (#2705)
* Fix simulator compilation

* HW_SENSORS_SRC -> HW_SENSORS_CPP
2021-05-16 14:11:28 +03:00
Andrey G 710a512fe7
Hw layer rearrangement (#2703)
* max31855: move to sensors

* uart GPS driver: move to sensors and rename

* i2c_bb: move to drivers

* LCD HD44780: move to drivers

* ping?
2021-05-16 06:01:00 -04:00
Matthew Kennedy c2cdc382a3
don't expose private state (#2696)
* don't expose private state

* fix tle init
2021-05-14 14:56:45 -04:00
rusefillc 08de271407 hiding 8888 mess under the rug
making LPS25 one step more available to Hellen
2021-05-14 10:54:40 -04:00
Andrey G 62cbc6db91
Adc fixes (#2691)
* ADC: save few bytes

* ADC: fix limit checking, add note for futher users

* ADC: not used anymore
2021-05-13 15:51:18 -04:00
Andrey G 4178ac61c6
mc33810 (#2684)
* mc33810: ENABLE outputs

* mc33810: enable Dwell time control
2021-05-11 18:17:06 -04:00
Matthew Kennedy f7581b1869
s (#2683) 2021-05-11 15:45:35 -04:00
Matthew Kennedy 370eb0d5a5
no sd if early fatal (#2680) 2021-05-10 14:31:40 -04:00
Matthew Kennedy 5ba7577496
move FSIO aux analog inputs to sensor model (#2669)
* sensor entries

* init

* non-explicit for list init to work

* switch fsio

* no longer need this lua hook

* init
2021-05-09 19:47:37 -04:00
rusefillc 540bb8e327 Revert "lua on f407 (#2646)"
This reverts commit e8855263
2021-05-09 18:25:50 -04:00
Matthew Kennedy e885526308
lua on f407 (#2646)
* lua on f4

* move perf trace to efifeatures

* check that it's defined

* cypress and kinetis

* it would help to define the correct thing

* disable buffer if not used

* we can work with 2k

* turn off ramdisk on mre qc

* wow strncpy is useless for truncated strings

* turn off for bootloader

* lto bootloader
2021-05-09 16:25:38 -04:00
Matthew Kennedy 3f36d488bf
move ADC pin initialization (#2660)
* set the pin in adc subscription land

* remove from adc_inputs

* more subscriptions

* use our lib instead
2021-05-09 14:36:11 -04:00
Matthew Kennedy e0cd96d06d
ini drive contents update (#2665)
* add shortcuts

* move readme

* nozip version of readme

* scripts

* set the filename
2021-05-09 12:18:55 -04:00
Matthew Kennedy 155bfd9aeb
Support STM32F7 1MB devices (#2659)
* modify linker script for 1MB devices

* handle null flash address

* actually support 1MB F7

* comment
2021-05-09 09:19:20 -04:00
Andrey G e18ba01fe5
hip9011 (#2658)
* hip9011: isolate debug stuff

* hip9011: renames

* hip9011: start sensing knockDetectionWindowStart degres from fire

* engine: more realistic values for knock window

* hip9011: remove magic CS toggling

* hip9011: EFI_HIP_9011_DEBUG should depend on EFI_HIP_9011
2021-05-08 18:43:55 -04:00
Andrey G 15811a6ff0
hip9011 (#2654)
* Move HIP states enum out of rusefi_enums.h

-this is internal driver stuff. No need to have it defined globaly.

* Auto-generated configs and docs
2021-05-08 10:08:18 -04:00
Andrey G afcc8848c5
hip9011 update (#2653)
* hip9011: add check for SPI reply in advanced mode

* hip9011: read value over SPI in advanced mode
2021-05-08 09:50:28 -04:00
Matthew Kennedy 8b30776016
remove stateChangeCallback from simplepwm (#2644)
* remove callback parameter from cj125

* remove from ext

* remove stateChangeCallback

* alt doesn't need that

* demorgan

* remove call

* bad cut/paste

* check the actual pin in the test
2021-05-07 09:38:41 -04:00
Matthew Kennedy ca7308e910
move some stuff in to ccm (#2645)
* stuff in ccm

* used memory
2021-05-07 09:35:57 -04:00
Andrey G e6cf82845b
Kill warnings (#2623)
* dead code

* rtc_helper: clean-up warnings

* kill unused
2021-05-04 18:55:27 -04:00
Matthew Kennedy 8ae8484dd9
interactive lua (#2614)
* interactive lua

* unnecessary pop

* print return value

* enable f7 lua

* match f7 chconf
2021-05-03 17:46:12 -04:00
Andrey G 0f4de02223
ADC: internalIndex should be used as getAvgAdcValue argument (#2618)
* ADC: internalIndex should be used as getAvgAdcValue argument

-plus output messages re-formated

* ADC: logger -> efiPrintf
2021-05-03 16:44:19 -04:00
rusefi 92958f1959 Proteus QC build 2021-04-30 13:57:33 -04:00
Matthew Kennedy 830575a306
lua 5.4 (#2590)
* thread priority

* build

* makefile prep

* call startup

* lua 5.1

* mk

* 5.3

* mk

* I guess lua does something?

* extract hooks, builds for tests

* a bit of error handling

* guard

* bootloader makefile

* remove lua

* submodule

* submodule update

* builds with submodule

* disabled by default

* h7 chconf

* tweaks

* add a useful hook

* move luaconf

* perf trace lua

* test helpers

* lua unit tests

* include to satiate clang
2021-04-28 22:41:25 -04:00
Andrey G 6d6dca8d07
Subaru board update (#2600)
* board: subaru eg33: linker script: stack, bss and heap to ram0

* Board: Subaru EG33: clean-up configs

* board-subaru-eg33: fix board config

* engine: subaru: eg33: fixes
2021-04-28 20:25:33 -04:00
Andrey G 8ba38a8a63
Mc33972 update (#2599)
* MC33972: update

-per-instance thread
-enable pull-ups for enabled pins only

* smart-gpio: mc33972: uses 8-bit spi frames

3 bytes are sent to make 24-bit frame
2021-04-28 18:29:35 -04:00
Matthew Kennedy 742ea83bfa
Baro config (#2591)
* adjust API to allow i2c init to fail

* init

* proteus config

* 🎠🎠🎠

* buh

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-27 15:29:22 -04:00
Matthew Kennedy 17719c5da0
prep for lua (#2589)
* thread priority

* build

* makefile prep

* call startup

* s
2021-04-27 07:57:08 -04:00
rusefillc 5b2b77fc50 F429 MCU says it's too cold #2552 2021-04-25 09:11:57 -04:00
shadowm60 61446a6170
Handle can message cyclicity (#2573)
* Handle can message cyclicity

update of canDash to support different cyclicity of messages

* review updates
2021-04-23 20:16:27 -04:00
rusefi 3e44135947 improving QC process 2021-04-22 21:23:20 -04:00
Andrey G a867b3e286
HD44780: start pins on init (#2576)
This fixes bug introduced in 7803968621
Sorry!
2021-04-21 15:33:58 -04:00
Matthew Kennedy a70f113b77
finish it off: remove scheduleMsg (#2575)
* finish it off

* one more logger ptr

* fwd decl

* Revert "one more logger ptr"

This reverts commit a21fb0087ddc748978d716db2710800cf26e437b.

* unused

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-21 15:33:40 -04:00
Matthew Kennedy c26987b96b
Destroy all shared logger (#2574)
* most of shared logger

* a few more

* one more

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-21 14:28:48 -04:00
Matthew Kennedy ad71016862
rip the bandaid: find-replace most of scheduleMsg (#2572)
* biiiig find replace

* more trivial find replace

* pwm

* almost all of them

* few more

* gpio

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-21 12:53:13 -04:00
Matthew Kennedy bd1c84fa62
Logging remove 3 (#2568)
* ts logger

* sensors

* wideband too

* missed one

* init

* motors, pid, etc

* vvt

* more

* idle

* missed one

* dynoview

* launch

* can

* console IO

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-20 14:09:41 -04:00
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
Matthew Kennedy 990c3649ae
logging cleanup before refactor (#2438)
* minor cleanup

* more cleaning

* signature

* spelling

* doy
2021-03-09 08:43:29 -05:00
GitHub build-firmware Action 7dd7d45c7a Auto-generated configs and docs 2021-03-09 00:20:19 +00:00
GitHub build-firmware Action 7974f6d11a Auto-generated configs and docs 2021-03-08 19:52:22 +00:00
Matthew Kennedy 96a14fd649
ADC cleanup, enable oversampling on H7 (#2437)
* cleanup v2 adc

* simplify

* oversample on h7

* output 16b result

* port-ify ADC_MAX_VALUE

* simplify include

* guard for cypress

* make sim/tests happy

* 16x oversample + comment

* this check is uesless

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-08 14:50:50 -05:00
GitHub build-firmware Action b4f1fedc9e Auto-generated configs and docs 2021-03-08 12:42:18 +00:00
GitHub build-firmware Action 6afd9f25b5 Auto-generated configs and docs 2021-03-08 05:02:53 +00:00
GitHub build-firmware Action 6e849712e9 Auto-generated configs and docs 2021-03-08 04:23:16 +00:00
GitHub build-firmware Action 0f43375fe0 Auto-generated configs and docs 2021-03-08 01:23:25 +00:00
Matthew Kennedy 06e32d937a
avoid various "no connect" scenarios (#2432)
* init mmc and USB earlier

* connect USB faster
2021-03-07 20:21:42 -05:00
GitHub build-firmware Action 652cab4148 Auto-generated configs and docs 2021-03-08 01:20:20 +00:00
Matthew Kennedy 3d17e62d65
finish off vbatt -> sensor model (#2433)
* more vbatt

* s

* goodbye voltage

* makefile

* apparently that part was in use

* include

* mocking
2021-03-07 20:18:32 -05:00
GitHub build-firmware Action ec5ee49018 Auto-generated configs and docs 2021-03-08 00:27:34 +00:00
Matthew Kennedy b729bdbcbf
Store ini filesystem in compressed block device (#2420)
* add module

* implement compressed block device

* enable for f7/h7

* script

* stub compressed image

* implement

* call the script

* headers, comments, fix init bug

* set msd options

* update chibios-contrib

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-07 19:25:34 -05:00
GitHub build-firmware Action 4c5868dfbd Auto-generated configs and docs 2021-03-07 22:33:47 +00:00
GitHub build-firmware Action 38d0a25ffd Auto-generated configs and docs 2021-03-07 22:13:26 +00:00
GitHub build-firmware Action 09ddc5094f Auto-generated configs and docs 2021-03-07 21:45:17 +00:00
GitHub build-firmware Action e29daa2b12 Auto-generated configs and docs 2021-03-07 21:37:29 +00:00
GitHub build-firmware Action 29f92a8db7 Auto-generated configs and docs 2021-03-07 20:34:10 +00:00
GitHub build-firmware Action 98067c6ee0 Auto-generated configs and docs 2021-03-06 17:57:53 +00:00
GitHub build-firmware Action 3f1bb4d79f Auto-generated configs and docs 2021-03-06 02:45:40 +00:00
GitHub build-firmware Action ada14307a3 Auto-generated configs and docs 2021-03-06 02:41:20 +00:00
GitHub build-firmware Action c510211957 Auto-generated configs and docs 2021-03-06 02:09:06 +00:00
GitHub build-firmware Action d1056e3972 Auto-generated configs and docs 2021-03-06 01:48:51 +00:00
GitHub build-firmware Action 2ecfabd28e Auto-generated configs and docs 2021-03-06 01:45:12 +00:00
GitHub build-firmware Action 8373725f5e Auto-generated configs and docs 2021-03-06 01:34:46 +00:00
GitHub build-firmware Action 8a5d65cdbc Auto-generated configs and docs 2021-03-06 01:00:28 +00:00
GitHub build-firmware Action 6d40566a10 Auto-generated configs and docs 2021-03-06 00:30:16 +00:00
GitHub build-firmware Action 8d49cc3e48 Auto-generated configs and docs 2021-03-05 22:44:12 +00:00
Matthew Kennedy b86f081d72
don't update ramdisk image in master (#2422)
* put back the default file

* gitignore
2021-03-05 17:42:22 -05:00
GitHub build-firmware Action 8dc17d420c Auto-generated configs and docs 2021-03-05 03:41:12 +00:00
Matthew Kennedy 6aaf02be15
hook up lps25 on proteus (#2418)
* hook up lps25

* it would help to include all the files

* unguard some stuff

* unguard more

* guarding

* s

* guard

* only register if init worked

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-04 22:39:20 -05:00
GitHub build-firmware Action f0098d8bc1 Auto-generated configs and docs 2021-03-05 02:01:14 +00:00
Matthew Kennedy e264029fbc
STM32H7 Slow ADC (#2421)
* extract

* guard

* put some back

* put back

* slow is actually 500hz so slow is fine here

* no magic

* fix printFullAdcReport

* cast

* implement h7 adc ish

* analog switches

* bad merge

* no map avg on h7

* fix master while we're at it

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-04 20:58:56 -05:00
Matthew Kennedy f22f318bdb
Extract slow adc (#2402)
* extract

* guard

* put some back

* put back

* slow is actually 500hz so slow is fine here

* no magic

* fix printFullAdcReport

* cast

* if we turn those off is it happy

* stub cypress/kinetis

* guard fast stuff better

* bad merge

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-04 19:55:09 -05:00
Matthew Kennedy 496acd7fc0
Embed ini (#2417)
* replace null device with rusefi ini

* comment

* warning

* stub ramdisk for when we don' thave an image

* maybe generate the image with a build

* install mtools

* fail on error

* install deps _before_ we need them

* embed a little readme

* oops
2021-03-03 07:50:53 -05:00
Matthew Kennedy 59eecab421
prep proteus config for h7 (#2413)
* prep for h7

* weak link that

* make those weak

* remove other stubs

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-28 16:57:57 -05:00
Andrey G fbcff6f0c8
hip9011 compilation fix, cosmetic clean-ups (#2414)
* Board subaru eg33: has HIP9011 knock sensor

* hip9011: lastExecutionCount does not exist any more

* hip9011: extranc commands to header, use logic math for bitfields
2021-02-28 15:42:57 -05:00
Matthew Kennedy b1873b3d8b
set all thread priorities in the same place (#2412)
* unify thread priority

* header

* mmc
2021-02-28 07:30:45 -05:00
Matthew Kennedy 6fe0cadfc0
allow disabling fast ADC (#2406)
* mostly guard against no fast adc

* disable on h7

* guard more

* guard adc init

* you can't do that in c++

* we need that

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-28 07:30:19 -05:00
Matthew Kennedy 520fc2b4ec
H7 flash (#2408)
* enable

* defines and mpu util

* implement flash for h7

* format
2021-02-26 17:38:17 -05:00
Matthew Kennedy 1acc1f7092
make h7 chconf like f4 (#2405)
* make h7 chconf like f4

* clean up f7 while we're at it

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-26 07:59:39 -05:00
Matthew Kennedy 6dc3c20bab
fixes for f7, sdio/sdmmc (#2400) 2021-02-25 13:37:41 -05:00
Matthew Kennedy d7adbe5fef
maybe hook up sdmmc (#2398)
* maybe hook up sdmmc

* the complier didn't like that very much

* mcuconf

* guard properly

* fix

* duh

* omg that's an extra close paren

* explicitly set which device fatfs should use

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-25 01:37:44 -05:00
Matthew Kennedy 4fe0ceec61
deduplication in halconf (#2377)
* rusefi_halconf

* h7 gpt

* don't redefine that

* maybe this was necessary

* format

* no usb in cypress

* flags for bl

* cypress

* maybe bootloader

* no smart build for cypress/kinetis

* no smart build

* no really, disable smart build

* don't need to clean that env var

* cypress

* format
2021-02-24 14:08:03 -05:00
Matthew Kennedy 9c591c7733
don't cache temperature samples at all (#2392) 2021-02-24 08:15:03 -05:00
Matthew Kennedy 392a7539be
enable H7 spi (#2391)
* enable features

* move MMC SPI config to port

* correct word length

* related cleanup

* doesn't need nocache

* include

* enable that
2021-02-24 08:14:21 -05:00
Matthew Kennedy 86233c4e62
update h7 clock config (#2388)
* h7 clocks

* run the core at 400

* disable LSE

* 8mhz timer clock

* osc

* it has to be even slower

* something is wrong with WFI

* this was wrong anyway
2021-02-23 22:55:38 -05:00
Matthew Kennedy 9226f483a8
yet more TS sanity (#2382)
* ts cleanup part 1

* move more stuff in to the class

* extract base class

* switch to TsChannelBase where we can

* dfu

* more to TsChannelBase

* bad merge

* another bad merge

* bootloader

* bluetooth

* format

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-20 02:11:39 -05:00
Matthew Kennedy a50d1d5ee3
start making tunerstudio more sane: part 2 (#2381)
* ts cleanup part 1

* move more stuff in to the class

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-19 20:48:21 -05:00
rusefillc c836f766af would this give me h72 SD? 2021-02-18 17:04:51 -05:00
rusefillc 384113a984 would this give me h72 SD? 2021-02-18 16:16:45 -05:00
Matthew Kennedy 90ef4c93ad
merge mcuconf for f4/f7 (#2375)
* merge for f4/f7

* more

* include efifeatures

* s

* no TS serial on f7 for now

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-18 15:04:32 -05:00
Matthew Kennedy fa894d55a3
set MCU properly (#2371) 2021-02-17 15:25:57 -05:00
Matthew Kennedy d933d18e29
use spiPolledExchange for small transfers (#2358)
* configure for no cache

* this doesn't need a setting

* now we don't need invalidate

* reorder and comment

* mmc

* sw knock

* use spiPolledExchange for small transfers

* mock spi

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-17 14:48:21 -05:00
rusefillc 8584256677 trying to fix AuxValves 2021-02-17 08:57:18 -05:00
rusefillc 02a49de390 aux to vvt rename 2021-02-17 08:53:39 -05:00
Matthew Kennedy 39884f8934
use DECLARE_ENGINE_PTR for Engine class (#2365)
* engine cleanup

* do the cleanup

* one last spot

* expand_engine noop for firmware

* simulator
2021-02-16 16:58:54 -05:00
Matthew Kennedy 4a1d3de9a6
remove unused msg parameter (#2360)
* dead parameter

* last few
2021-02-16 09:32:16 -05:00
Matthew Kennedy 878794f9cf
properly put buffers in no-cache regions (#2357)
* configure for no cache

* this doesn't need a setting

* now we don't need invalidate

* reorder and comment

* mmc

* sw knock
2021-02-15 17:39:11 -05:00
Matthew Kennedy 187c4d00f7
USB mass storage tweaking (#2352)
* disable TS in case of USB MSD

* housekeeping while we're here

* enable on MRE

* changelog
2021-02-14 15:03:07 -05:00
Andrey G bb5ee69f29
RusEFI is green: put cpu in standby in idle (#2342)
* MRE is green: put cpu in standby in idle

* Revert "MRE is green: put cpu in standby in idle"

This reverts commit 62b5cadda014ace749b145b629da62b182b5e3ce.

* RusEFI is green on all boards
2021-02-14 10:24:21 -05:00
Matthew Kennedy 89391919dc
automatic switch between internal and MSD SD card (#2349)
* auto enable usb msd

* guard and turn on for proteus
2021-02-14 08:10:39 -05:00
Matthew Kennedy 56b7db8e9c
pullup (#2348) 2021-02-14 08:04:09 -05:00
Matthew Kennedy 6ab7e151f1
rewrite SD initialization (#2346)
* rewrite SD init

* static

* return a pointer instead
2021-02-13 21:26:11 -05:00
Andrey G f1785fee11
Config cleanups (#2347)
* Remove duplication

* Ports: STM32F7: we want PAL_USE_CALLBACKS for F7 too
2021-02-13 18:45:33 -05:00
Matthew Kennedy 7562de4f10
usb mass storage progress (#2345)
* usb mass storage

* remove old files

* this file is gone
2021-02-13 15:06:05 -05:00
rusefi 67f5b18f34 not great solution to code duplication, also helping QC build 2021-02-13 11:19:39 -05:00
Matthew Kennedy 9a3f3f34b2
USB mass storage descriptor (#2330)
* enable msd

* modify descriptors for composite device

* makefile cleanup

* format

* define

* embiggen fifos

* needed that

* cleanup too while we're at it

* rename endpoints

* switchable descriptors

* guard the request hook too

* don't need this changed yet

* cleanup

* update ep0 response

* cleanup

* use the msd hook from chibios

* this was wrong

* this was covered by other PR

* this is also covered

* s
2021-02-13 08:54:08 -05:00
Matthew Kennedy 990bfe763e
implement null block device (#2341)
* implement null device

* fix build
2021-02-13 08:53:10 -05:00
Matthew Kennedy d8032fbd8f
fix usb descriptor mistakes (#2340)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-13 01:06:55 -05:00
Matthew Kennedy 315360cb04
Rename USB endpoints, update ChibiOS-Contrib (#2334)
* rename endpoints

* update chibios contrib

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-12 14:21:56 -05:00
Matthew Kennedy 275b058e32
increase SD card speed (#2333)
* fast sd card

* fair enough
2021-02-11 20:42:23 -05:00
Matthew Kennedy fff734502d
turn in to a composite device (#2332) 2021-02-11 15:52:06 -05:00
Matthew Kennedy dade25ef34
move chconf/mcuconf/halconf in to hw_ports (#2321)
* move f4 config files

* don't need this

* f7

* f7

* h7

* this was duplicated

* turn off smart build

* loader too

* update prometheus paths

* bootloader should include confdir

* fix the flash size while we're at it

* move chconf_common

* use wait

* normalize board.mk

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-10 19:38:24 -05:00
rusefi 6f065274e4 aux pid is now VVT 2021-02-10 12:41:38 -05:00
Matthew Kennedy 85fab40d21
get mcu temperature within port (#2326)
* remove EFI_ADC_TEMP_SENSOR

* implement

* comment

* s

* switch adc_inputs over

* header

* s

* I think aligned-on-stack should work ok

* num channels

* cache safety

* move adc init too

* don't compile that file for the h7

* cypress & kinetis

* ports

* guard against bootloader

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-09 22:04:36 -05:00