* no more magic
* bump version
* no need for this
* comment cleanup
* add comms_can_reset tests
* we can't ensure this for compatibility reasons
* add CANPacket_t checksum
* DAC POC
* change freq
* some cleanup
* wip: cleaning up and trying to use DMA
* no clue why this doesn't work
* this works
* wip multi-master i2c for fake siren
* cleanup and some more i2c stuff
* seems more stable
* retry disabling and cleanup force siren
* fix misra violations
* not needed
* messed up rebase
Co-authored-by: Comma Device <device@comma.ai>
* simple chunking
* make pylint happy
* misra happy?
* good practice anyways since we cast to a uint32_t later
* fix bug dropping packets
* minor fixes + prepare for shared lib testing
* working library now
* first queue test
* can send test
* fix running in github actions?
* add big rx test and fix it
* don't complain about empty buffers
* disable for now
* comment
* test runs
* some cleanup
* merge those
* test works
* rm that
* comment
* proper logging
* makes things too slow
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* cleanup external debug serial
* wip: bring up uart7
* more wip
* this does something
* this works
* increase fifo size
* fix misra
* cleanup
* fix misra again
* add SOM debug enum
* reduce SOM buffer on F4
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* cleanup is_enumerated, rename comms and init spi
* big comms refactor, building now
* misra fixes
* more fixes
* misra try 3
* cleanup
* this belongs in a separate PR
* remove unneccesary file
* revert llspi changes
* llspi misra fix
* enable SPI on F4 and setup gpio
* duh
* wip: spi comms
* more spi wip
* dynamic sector erasing
* Revert "dynamic sector erasing"
This reverts commit fce1215a2e.
* more sectors to be erased
* debugging
* woah, this works
* cleanup on the panda side
* add sync and checksum checks, and fix recovery on errors
* this seems relatively stable
* add retrying
* this is stabler
* some endianness and endpoint fixes
* builds
* revert that
* add that back
* checksum start
* start splitting up driver
* spi behind flag
* cleanup test
* bump up timeout
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* fast rpm measurement
* fix indentation
* this seems stable
* clip fan integral
* fix misra
* add fan power to health
* board-specific max rpm
* refactor fan enable
* cleanup
* stall detection and reset
Co-authored-by: Comma Device <device@comma.ai>
* cleanup is_enumerated, rename comms and init spi
* big comms refactor, building now
* misra fixes
* more fixes
* misra try 3
* cleanup
* this belongs in a separate PR
* remove unneccesary file
* revert llspi changes
* this needs packing
* fix pedal usb
Co-authored-by: Comma Device <device@comma.ai>
* block lkas
* taco time
* local changes
* start
* tx checks
* counter + vehicle moving
* support big can fd
* check crc
* add torque to rx checks
* tests
* little more
* little more
* get some misra coverage
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Add RTC with LSI for BP, GP, WP
* disable jenkins temporarily, REVERT!
* experiments
* cleanup is still needed
* cppcheck unused suppress
* raise deepsleep limit timeout to 120sec
* more experiments on usb_enumerated
* continue
* soft_disconnect
* almost done
* not enough
* no ignition
* still don't like it..
* rename to has_rtc_battery
* clock_source on the way!?
* delay 3 sec
* works on C3, needs test on C2
* And this is for C2
* disable bootkick
* misra 10.4
* ..
* ..
* set power state the right way
* change that
* seems don't need that? check on C2/C3
* partially works on RP...
* comments (will work after rebase)
* change fault name
* switch to manual activation mode
* Revert "disable jenkins temporarily, REVERT!"
This reverts commit 578d425fa7.
* my dear pedal!
* cleanup python lib
* remove wifi leftovers from firmware
* few spots in firmware
* forgot
* remove usb to wifi test
* linter
* more cleanup in flasher.h
* more found
* check in tests too
* linter
* expose debug flags and improve debug console output
* puth4
* other flags need to be set more locally
* fix misra violations
* fix misra violation
* fix misra violation
* H7 drivers
* Include H7 into the code
* fix flash write for H7
* get serial from flasher.h from F4 and H7
* flash.sh and recover.sh for gen3
* add set_data_speed for BRS CAN FD
* build all fws
* gen3 to panda lib
* gen3 name in scons project
* disable fd can and brs
* gen3 to CI tests
* jenkins fix for new tests and build_all
* fix pedal test
* pedal in panda tests again...
* cleanup llfdcan.h
* cleanup clock.h
* Add LDORDY bit check instead of delay
* missing define in stm32h735xx.h lib
* board_id helper
* enable debug detection again
* clean gpio inits
* fix board_id helper, make cleaner
* comment MCUs in stm lib for faster misra
* target MCU
* misra-5.5
* improve headers and misra speed
* cleanup CI tests
* change naming from gen3 to h7
* readable if statement
* cleanup llusb.h
* only cycle one transceifer in bus-off
* move unused funcs to common header
* bus_off_err reset
* misra 10.4 fdcan
* extern to can_data_speed variable
* limit can_data_speed array size to 3
* reinit fd can on data speed change
* Improve test with ELM327 and extaddr check
* bugfix for fdcan
* panda python config naming
* abstracted init request in llfdcan
* misra fdcan
* Improve llusb.h for H7
* Let refactoring begin!
* Fix pedal build
* Fix pedal safety tests
* Forgot few TIM2 instances
* Try this way with misra
* More misras...
* More misras...
* Still fighting with misra blindfolded
* Almost got it!
* Last misra error..
* Last misra error..
* Misra works locally..
* Maybe this?
* Looks like it was cppcheck bug, revert changes
* Suggested changes and reverts
* File structure change
* revert includes
* remove spaces
* remove timer delay
* endings
* more typing
* rename early to early_initialization
* Remove delay_us
* Revert RTC default values
* Revert initialization sequence
* Fix quotes
* Revert
* Return TIM6EN
* Alias slow timer to TICK_TIMER
* Refactor files structure
* Remove definition of PANDA
* Abstract timers
* Fix include
* tick_timer_init
* Split usb driver
* Move LL stuff: adc
* Move LL stuff: usb
* Fix include again...
* Will check pedal builds also locally..
* Move LL stuff: CAN
* Move LL stuff: clock
* Rename common to peripherals and move
* Move board HAL
* Change include, not needed for pedal
* llgpio to gpio and new lines fix
* remove board_has_relay, not used
* Remove board_functions.h and add to board struct
* Move include
* Fk MISRA...
* has_onboard_gmlan to has_hw_gmlan
* Typos
* Move board_declarations include
* Shuffle
* More abstraction
* fix paths, fix cppcheck test
* Fix for pedal build with USB
* remove unused wifi tests
* remove that one too
* no bootmode from ESP
* clean that up
* remove two more wifi tests
* remove boardesp and esptool
* esp_gps -> gps
* missed those
* remove esptool refs
* remove esp certs
* no more wifi
* that was old
* cleanup jenkins dockerfile
* fix linter
* remove more wifi refs
* clone panda jungle from github
* no copy
* always default esp to off
* k-line slow init
* k-line slow init LED bit blink
* fix misra violations
* better names for k-line methods
* debug prints match names
* switch to timer
* use TIM4 until I figure out TIM5
* tickle faster
* fix bit bug and add stop bit
* TIM5 working
* USB return after addr sent
* fix l-line reset
* fix misra violations
* blink for the ones instead of the zeros
* k-line 5 baud fault type
* lin check
* use TIM5 or wakeup
* better names
* enable UART RX interrupts
* update debug prints for python3
* improve kline functions and fix checksum
* k-line wake-up conforming to KWP2000 fast init
* fix timing
* toggle k and l line together by default
* k-line wakeup using timer
* k and l were flipped
* fix misra compliance
* wait for tx slots before clearing nak
* fix bootstub
* Fixed misra
* Cleanup
* Added bulk write test to test USB NAK on bulk CAN messages
* Added automated bulk tx test
* Fixed linter
* Fixed latency test influence
* Added timeout to python API
* Disabled can write timeout in bulk write test
Co-authored-by: Robbe <robbe.derks@gmail.com>
* Added an initial working implementation of the register readback and applied it to the LLCAN registers. Also fixed an init bug in CAN.
* Locally disable pylint import error
* Reverted change to CAN-obj->FA1R setting
* Fixed misra compliance
* Changed hash function name
* Fixed CAN filter setting
* Added voltage health test
* Converted ADC to register functions
* Converted clock to use register setters
* Added check to see if fault status is zero after running test
* Converted DAC to use register setters
* Converted fan to use register setters
* Converted gmlan bitbanging to use register setters
* Changed over interrupt driver to use register setters. Also moved some includes and definition places for critical sections
* Fixed build
* Converted LLGPIO to use register setters
* Converted pwm to use register setters
* Fixed cold boot
* Fixed health fault check in automated tests
* Added comment for the future (issue #367)
* Converted RTC driver to use register setters
* Converted SPI to use register setters
* Converted timer driver to use register setters
* Fixed register fault on white pandas and disabled showing of fault for release
* Bump version
* Remove USB 2.0 Extension from BOS descriptor.
* Declutter usb.h of unused code.
Now that I'm more confident the USB 2.0 Extensions are only required
for USB 3.0 devices, and there's less mystery around why the change
worked for us, garbage-collect the commented-out descriptor.
* Exit power saving also for CAN based ingition detection and replace interrup with simple state machine. a bit of delay it's fine
* bug fixes and also CDP set on start
* sorry misra
* move comment
* typo
* remove ignition interrupts
* Power saving state machine should be done by boardd, which also sets safety modes and usb power modes
* typo
* Added usb command for power save state setting
* Added power save enabled packet
* Added power_save_enabled to python lib too
* Added uno
* Added usb switch support
* Added PWM and IR power functions
* Implemented bootkick
* Added uno as a new hw type
* Bumped version
* Added fan control and tach readout
* WIP: RTC support
* Working RTC
* Fixed python
* Misra compliance
* Added USB control messages for fan/IR power
* Added USB commands + tests for fan & IR control. Fixed bootstub and pedal compilation
* Added IR and fan to power saving mode
* Changed defaults
* Fix safety considering uno
* passing safety now
* Minor UNO tweaks
* Fixed version
* More minor temporary tweaks
* Removed usb load switch from uno
* Added power control for shutting down the fan completely
* Disable IR LEDs by default
* Fixed linter issue
* Linter fix#2
* make ignition logic common for all cars
* ignition_can is not a safety thing. move it to can drivers
* bump version
* gm safety passive is deprecated
* move tx 1 on logic into board specific headers.
* Fixed UART overrun error
* Added stability test scripts
* Refactored UART code. ESP/GPS now uses DMA in circular mode to directly write into the ring buffer, saving a bunch of interrupts and potential race conditions.
* Changed stability test to use amount of bytes instead of amount of non-zero messages, since the ring buffer pointer is only updated on half or full DMA transfer or on line idle (e.g. no more 1 char messages from the gps)
* Increase data limit. It's too low sometimes in normal operation
* Forgot to set write pointer in ring buffer
* Increased test limit even more
* Updated cppcheck ref. New rules to be fixed
* changed 2 MACRO names that had more than 31 characters in common
* Fix newly popped 10.4: same type on arithmetic ops
* Fix 18.4: operators should not be applied to an expression
* ensure a NULL pointer isn't dereferenced
* late usb
* Added type support for black panda
* Added harness presence and orientation detection
* harness relay driving code
* Added intercept support in black panda code. Switched around can0 and can2
* Disable ADCs after orientation detection. Ignition interrupts via harness
* WIP: Hardware abstraction layer + black panda bringup
* Fixed bootstub build
* Fixed bootstub for pedal
* Fixed infinite loops
* Got CAN buses working on white again
* Fixed pedal build and black can interfaces
* Got CAN buses working on black panda
* Finished loopback test for black panda
* Erase all flash sectors on the panda. Increased binary limit. Added extra python functions.
* Fixed python
* Made new code MISRA compliant
* Cleaned up ignition. Fixed build
* Fixed health packet
* Fixed CAN mode on black bug. Changed OBD to switch on ELM mode
* Fixes from Github review
* Fixed MISRA issue for pedal
* Fixed failing gmlan tests
* ELM327 safety: allow diagnostic on all buses
* Cleaned up EON relay code
* delete only 3 sectors instead of 11 to allow a new build to be flashed. Much faster to flash
* Removed CAN only can0 output mode. Does not make sense on black panda due to reversibility issues.
* Added heartbeat logic for EON code on panda. Go to NOOUTPUT if EON does not send a heartbeat for 5 seconds.
* Remove all CAN buses live on EON startup. Shouldn't be necessary to have this separate case
* Formatting
* Added file I forgot to push
* Added heartbeat to testing code to make sure EON tests don't fail. Should probably find a better way to do this though. Heartbeat thread didn't work, concurrent USB connection issues...
* Safety: support black panda for Honda Bosch
* Disable OBD2 if setting to NOOUTPUT mode
* Run safety tests for all hw_types
* Fail test if subtest fails
* fix safety tests
* RDLR, RDHR gone from safety
* back at not failing misra safety
* fix safety tests
* did not mean this
* Use get-bytes in pedal too
* Ignore Misra 11.5 and Fix 11.8 violaitons
* Fix 11.3 violations
* Neglect Misra 11.4, fix pointer issue in bootstub and rutn on Werror for pedal builds
* Fix Misra 11.6: can't assign number to void pointer
* Fix test after changing honda_moving name
* for loop is better
* Fix bugs from fbck