* unit_tests: sent: zero-init
* sent: SENT_SLOW_CHANNELS_MAX to header
* unit_tests: sent: clock, falling edges
* SENT: support and autodetect if device sends pause pulse
Also rework tick time calculation
* unit_tests: SENT: verbose debug on request
* unit_tests: SENT: actual checks
* unit_tests: SENT: extract common code for reuse
* unit_test: SENT: add test with fuel pressue captured data
* unit_test: SENT: add test with Ford ETB CLOSED captured data
* smt32_common.mk: reduce copy-paste
* SENT: sentPins is not used
* hw: stm32: add ICU helper
* hw: stm32: icu helpers: also return timer base clock
* SENT: icu: use helper to get ICU & channel and AF
* SENT: icu: use CPU ticks for pulse measurements
* hw: stm32: icu: cleanup
* use tabs
* SENT: Lua glue: getSentValue returns ETB position now
Can be tested with following LUA script:
setTickRate(100)
function onTick()
pos = getSentValue(1)
setLuaGauge(1, 10000 * pos)
print(pos)
end
* SENT: measure more pulses during Unit time calibration
* SENT: no magic numbers
* SENT: fix typo
* SENT: setninfo output: do not show slow channels if not detected
* SENT: fix GM-style CRC calculation
* SENT: another one CRC algorithm, now for pressure sensor
* SENT: show CRC error percentage
* SENT: cache current setting to do proper clean-up on stop
* SENT: microRusEfi supports send on "AN temp 2" = PA1 only
* SENT: microRusEfi: fix pin number
* SENT: use activeConfiguration during sentStop()
* MRE: pin 23: can accept events (for SENT)
* 429 boots and LEDs work
* oops missed a comma
* enable on f767 too, since it should be the same board
* why not just completely duplicate it
* script should not be fancy
* script should not be fancy
* correct pins
* h743 while we're at it
* tle8888: ups IGN1
* tle8888: more BIT() macro
* tle8888: fix typos
* tle8888: fix LS2 output on MRE when stepper is enabled
Default settings casue one (or few) not used direct driver inputs
to be mapped to OUT5 (LS2 on MRE)
* smart_gpio: comments for TLE8888 on MicroRusEFI
* smart_gpio: typo
* tle8888: more comments
* stub simulator CAN driver
* comments
* CAN sensor
* maybe implement?
* s
* fix
* tx and rx actually work!?!?!
* check_can_isr
* modify chibios
* Sim has no CAN on Windows (for now?)
* safer init/deinit, enable assertions
* smarter handling of missing CAN device
* better guards
* guards for windows
* make things c++ friendly
* install various canaries in coal mines
* using is much clearer than typedef
* fixing builds
* lps25
* trigger includes were a mess
* c -> c++ cleanup
* os util
* why did so many include os_util.h?
* fwd declare
* cypress/kinetis
* s
* eg33 happy
* happy sim
* cypress usb
* pch
* cypress
* doesn't need to include all that
* h7
* static functions with (void)
* more
* Revert "more"
This reverts commit 246e53441f935451437df186ac92d7df26b62fb6.
* s
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* Typo fix
* flash_main: always allow to write settings to ext NOR while running
* mc33810: do not enable outputs right after undervoltage
Wait for next active signal
* QSPI flash: set correct dummy cycles for fast read command
* board subaru: fix connector pinout. again.
* board subaru: fix SDMMC pin configuration
* board subaru: fix DMA conflict SPI4_RX vs SDMMC2
* flash_main.cpp: reorder code for easy integration of ext storage
* Add EFI_STORAGE_INT_FLASH option
Default set to TRUE
* Add ChibiOS's Managed Flash Storage to build
* Add support for QSPI flash (SST26F064A tested)
* board: subaru: enable WSPI and NOR flash drivers
* Add option to save settings on ext flash MFS partition
* board: subaru: store settings on QSPI NOR flash
* 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>
* 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>
* 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
* 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
* 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
* 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
* 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>
* 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>
* 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>
* ChibiOS: add support for STM32F765
This chip is used on Subaru EG33 p'n'p RusEFI board from Dron_Gus
* drivers: gpio: mc33810: commulative update
- use BIT macro
- fix wake-up method
- fix order of arguments in _add function
* port: stm32f4/7: detectCanDevice check for enabled interfaces only
* ADC: fix internal array size
internalAdcIndexByHardwareIndex should be EFI_ADC_LAST_CHANNEL size
couse adc_channel_e is used as index
* status LEDs: support status LEDs that driven by low level
* Proper way to add lis302 driver
* Proper way to add license directory to includes
* Makefile: simplify
All ChibiOS stuff is accumulated in ALLCSRC, ALLINC and so on.
* board.mk: append sources and includes to ALLSRC, ALLCPPSRC, ALLINC
* Cypress: fix CANv2 includence into build
* gpios: isBrainPinValid helper
* LCD HD44780: do not touch pins if DM_NONE or invalid gpio
* Fix isEnabled checks for GPS and Joystick
* LCD HD44780: writePad use this method wider
* We still need consoleEventListener for boards with EFI_CONSOLE_SERIAL_DEVICE
* MC33810: add MC_ prefix for command defines
As CMD_PWM define is now used by console command
* switch to CriticalSectionLocker
* that's just about all
* clean up last usage
* include hpp for sim
* need the cpp wrappers in the makefile too
* include dir
* include
* TLE8888: add support MR switching from SW
Main Relay has limitation - it is always active while KEY=1. When
KEY=0 MR can be switched on from SW.
* TLE8888: support reading of KEY and WAKE inputs
* Rusefi enums: add new TLE8888 pins
* smart gpio: fix tle8888 direct pin mapping for MRE
* MRE: use TLE8888 pins instead of MCU gpios that drives TLE8888
* TLE8888: cleanup
* TLE8888: do not reset driver private data on WD/undervoltage reset
* TLE8888: diagnostic updates
* TLE8888 driver: BIG driver rework
* TLE8888: check SPI answers for abnormal states
Reply with other than requested register can be a sign of:
-Power-On-Reset, then OpStat0 will be replyed
-WatchDog reset, then FWDStat1 will be replyed
-Invalid communication frame, then Diag0 will be replyed
Keep tracking last accessed register and check with the next reply.
* TLE8888: debug clean-up
* TLE8888: implement spi array write
This reduce CS inactive state time between two consequent accesses
from 8.8 uS to 1.4 uS
* TLE8888: fix PP outputs in OD mode
* TLE8888: cleanup register definitions
* TLE8888: run separate driver thread for each chip instance
Calculating poll interval for few chips become more complex, avoid
this running thread for each device.
* TLE8888: fix cypress and kinetic compilation
Both platforms define its own MAX and cause redifination error if
common.h is included in driver.
* MRE: update mapping.yaml and fix direct pin mapping for TLE8888
* TLE8888: diagnnostic: disable switch off in case of overcurrent
For all output, use current limiting instead
* TLE8888: check for overvoltage on OUT8..OUT13
* TLE8888: add TODO note about how to recover from failure condition
Currently TLE8888 automaticly recovers only from overcurrent and
(may be) overtemperature conditions.
Short to bat cause output disable (bit in OECONFIG is reset) and
needs driver/host intervention.
* TLE8888: save few bytes of RAM
* TLE8888: Lada Kalina is test mule for IDLE stepper on TLE8888
Don't forget to enable PP mode for TLE8888 outputs 21..24:
uncomment line 1087 in tle8888.c
* TLE8888: reorder code, cleanup
* TLE8888: mode all debug/statisctic to per-chip struct
* TLE8888: rework poll interval calculation
* MRE: use TLE8888 pins instead of MCU gpios that drives TLE8888 #2
* second can bus, first steps
* added most important messages; no more errors
* cleaned up can messages
* second can bus, first steps
* added most important messages; no more errors
* cleaned up can messages
* post rebase/merge fixes
* more rebase/merge fixes
* even more rebase/merge fixes
* more fixes, removed auto-gen files
* removed more auto-gen files...
This fixes following build issue under linux:
make: *** No rule to make target 'build/obj/.cpp cj125.cpp', needed by 'build/obj/ build/obj/cj125.o'. Stop.
make: *** Waiting for unfinished jobs....
Introduces in 8d35c35035
* aux serial updates from last PR
* trying to guess
* wow that's old! also not working maybe?
* hiding diag code which was messing with GP2/GP3 i.e. TLE8888_PIN_22 TLE8888_PIN_23
* date
* Mc33 undervolt (#1421)
* mc33 flash check
* DI sanity checks for setting HV config
* mc33 under voltage check
* mc33 under voltage check
Co-authored-by: Christopher W. Anderson <gitstuff@pswitch.com>
* fixed {}
Co-authored-by: rusefi <rusefillc@gmail.com>
Co-authored-by: NOx-z <50815960+NOx-z@users.noreply.github.com>
Co-authored-by: Christopher W. Anderson <gitstuff@pswitch.com>
Co-authored-by: kon <dev@triggerdevel>
* tle8888: fix tle8888_chip_init flow
* tle8888: set correct pin modes for mcu gpios in tle8888_chip_init
Direct drive, reset, inj_en and ign_en gpio should be outputs
* move to can folder
* split out can rx
* only print in debug mode
* guard on feature flag
* split out tx
* headers
* headers
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* move to can folder
* split out can rx
* only print in debug mode
* guard on feature flag
* headers
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* relocate
* include path
* simulator makefile
* fix mre while we're at it
* it would help if I fixed it right
* add can_msg
* convert obd2
* guard properly
* better include order
* docs & headers
* inject CAN device
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>