Commit Graph

29 Commits

Author SHA1 Message Date
Matthew Kennedy accb87c8e2 waitForSlowAdc, stepper cleanup 2025-05-04 00:38:54 -07:00
Matthew Kennedy f0161a69ba remove AdcDevice class, do it directly in stm32_adc_v2.cpp 2025-03-07 00:04:40 -08:00
Matthew Kennedy 982526f574 adc simplification & cleanup 2025-03-06 23:51:08 -08:00
Matthew Kennedy ad3bb2ab99 modularize knock adc for h7 2024-11-18 11:36:41 -08:00
Matthew Kennedy 2155f3c019 extract some implementation details of fast ADC out to port 2024-11-08 00:58:07 +00:00
Matthew Kennedy e7f8033e32 these functions can now be static 2024-11-08 00:51:08 +00:00
Matthew Kennedy 01a397094d
execute critical tasks on one big thread (#462)
* wire up main loop

* remove PeriodicTimerController

* patch up defines, comments

* happy simulator

* format

* simulator

* ETB runs via main loop

* happy tests

* protection against invalid LoopPeriod

* stack size

* ccm

* fix |= operator

* move perf trace

* ordering

* ordering
2024-09-17 15:27:38 -07:00
Matthew Kennedy 0b31777623 adc inputs cleanup 2024-08-12 18:13:51 -07:00
Matthew Kennedy 591b8446fe minor adc_inputs cleanup 2024-07-21 13:21:02 -07:00
Matthew Kennedy 4554e099f4 if you need this command you need a debugger 2024-07-03 01:06:28 -07:00
Matthew Kennedy 3f8931f341 we often mean inline when we say static 2024-03-28 18:20:40 -07:00
Andrey G e086176fc1 Support non-uniform dividers on ADC inputs (#4938)
* adc: support per-channel dividers

* S105: non-uniform analog dividers

* adc: default weak getAnalogInputDividerCoefficient() implementation

* adc: fix emulator compilation
2023-01-08 17:29:29 -05:00
rusefillc f9b849dd8f refactoring - reducing API between FW and Java 2022-09-11 02:16:47 -04:00
Andreika 99c4dd4cb4 hellen81 ADC trigger 2021-12-01 13:03:08 -05:00
Matthew Kennedy a4998ab7a8 Fast adc API (#3327)
* dead fast tps

* oooooh map avg on hh7

* adc v4 fast support

* new fast API

* hardware.cpp

* adc v2

* warning

* guard

* no check required

* stub cypress/kinetis

* kinetis and cypress stubs
2021-10-07 08:29:01 -04:00
Matthew Kennedy 4e6b61234f 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
Matthew Kennedy 098469b88c 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 1a73dcc46e fast adc callback (#3031)
* fast adc callback

* guard

* missed one

* now cypress will be happy
2021-07-23 14:19:59 -04:00
rusefillc 79f04983eb New hardware testing commands #2978 2021-07-17 13:42:10 -04:00
Andrey G 2176d1656b 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
Matthew Kennedy c168c748ea dead code, warnings (#2461) 2021-03-15 10:23:19 -04:00
Matthew Kennedy c111d23b3d 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
Matthew Kennedy 55facb6613 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
Andrey G 71fe582ce5 Adc isAdcChannelValid helper (#2188)
* Guard define argument

* ADC: isAdcChannelValid

Check for both <= EFI_ADC_NONE and >= EFI_ADC_LAST_CHANNEL
Also check for value out of enum range (corrupted settings)

* Fix unit tests
2021-01-05 16:02:20 -05:00
rusefi 875651b471 Hellen says merge #1772 adc.h 2020-09-12 04:03:11 -04:00
Andrey G 5d421f7ffa Adc improvements (#1765)
* ADC: move DMA buffer outside of AdcDevice (save few bytes)

* ADC: inlcude fast channels to debug output

* ADC: save some CPU ticks (disabled until fully tested)

* ADC: simplify
2020-09-08 17:20:55 -04:00
rusefi 7299c79810 more fixing build? 2020-08-21 22:07:55 -04:00
Matthew Kennedy 8ab4c5c765 Analog input filtering (#1680)
* improve biquad

* cleanup

* add filtering to subscriptions

* config sensors

* comment

* doesn't need to be that fast

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-08-21 19:47:12 -04:00
rusefi 9a33e922af The Big Refactoring of 2019: folder structure #723 2020-08-02 20:46:40 -04:00