Commit Graph

95 Commits

Author SHA1 Message Date
Adeeb Shihadeh 418fca3583
enable misra-config checks (#1879)
* mostly done

* fix rest of misra-config

* do other two in next pr
2024-03-24 12:10:37 -07:00
Adeeb Shihadeh a727cecdb8
remove unused deepsleep stuff (#1914) 2024-03-22 14:48:49 -07:00
Adeeb Shihadeh 6dfd4db4ab
remove rtc (#1897)
* remove rtc

* fix build

* rm taht

* revert that
2024-03-11 16:08:43 -07:00
Adeeb Shihadeh 4b6f6ac162
723 power init (#1891)
LDO only

This reverts commit ea156f7c62.

Co-authored-by: Comma Device <device@comma.ai>
2024-03-08 14:57:33 -08:00
Adeeb Shihadeh ea156f7c62 revert that for now 2024-02-28 20:31:47 -08:00
Aryan b4442a7c93
enable misra-c2012-10.3 (#1852)
* enable misra-c2012-10.3

* fix that

* cleanup

* little more

* one more

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-02-18 11:56:44 -08:00
Adeeb Shihadeh 39671c3dd6 remove 12.2 suppression added in 3cd0023 2024-02-15 13:52:39 -08:00
Robbe Derks 3cd0023bc1
cuatro power readout (#1869)
* refactor voltage / current reading

* fix bug and add readout to cuatro

* fix misra?

* just suppress then

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-02-15 13:49:06 -08:00
Adeeb Shihadeh d6b5dbb3dc Revert "detect 723 live (#1835)"
This reverts commit 9d0caa1935.
2024-01-24 15:39:11 -08:00
Adeeb Shihadeh 9d0caa1935
detect 723 live (#1835)
* detect 723 live

* cleanup

* more precise

* more precise

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-01-24 14:48:32 -08:00
Comma Device b39ef1dbfe fix 723 init 2024-01-24 21:57:28 +00:00
Adeeb Shihadeh a0ac220b0c it's cuatro 2024-01-24 13:07:47 -08:00
Adeeb Shihadeh a2d5d8ad07
stm32h723 (#1832)
* booting

* cleanup

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-01-23 23:15:59 -08:00
Adeeb Shihadeh c754171000 remove red panda v2 2024-01-23 19:03:21 -08:00
Ruben Medina 40671436ee
enable misra-constParameterPointer (#1826) 2024-01-20 21:50:42 -08:00
Ruben Medina 229e8bb3a5
enable misra-c2012-12.2 (#1824)
* enable misra-c2012-12.2

* refactor: use 1UL in all FAULT defs
2024-01-20 16:19:34 -08:00
Ruben Medina 7ab3fcf5d2
enable misra-c2012-10.7 (#1804)
* enable misra-c2012-10.7

* cleanup

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-01-16 16:52:36 -08:00
Aryan c118c2887d
enable misra-c2012-2.7 (#1813)
* cpp-check suppress

* enable misra-c2012-2.7
2024-01-16 16:02:48 -08:00
Hoang Bui 7e8b829fe8
enable misra-c2012-2.3 & misra-c2012-2.4 (#1801)
* enable misra-c2012-2.3

* enable misrac 2.4

* delete

* revert

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-01-16 15:59:15 -08:00
Aryan 369fd8c6d5
enable misra-c2012-7.2 (#1807)
* misra-c2012-7.2

* removed misra-c2012-7.2 from suppressions.txt
2024-01-16 15:49:13 -08:00
Adeeb Shihadeh dc1fd96118
Revert "H7: fix GMLAN bitbang timer (#1542)" (#1745)
This reverts commit 5778c0ae5d.
2023-11-24 16:00:18 -08:00
Igor Biletskyy 5778c0ae5d
H7: fix GMLAN bitbang timer (#1542)
* init

* move Adeeb's test

* bitbang expected to fail can_health
2023-10-03 13:14:14 -07:00
Adeeb Shihadeh b6e37f25b6
Remove flash logging (#1674)
* Revert "Disable flash logging (#1667)"

This reverts commit 62db60595b.

* Revert "Faster log retrieval (#1484)"

This reverts commit 694aae9c26.

* Revert "Flash bounds checking outside of bootstub (#1459)"

This reverts commit 054344de6b.

* Revert "Logging (#1445)"

This reverts commit 0cc91a7f7b.

* cleanup

* cleanup
2023-09-30 12:49:46 -07:00
Igor Biletskyy f89207328b
F4: fix wrong PCLK value (#1608)
* fix mistake

* clean
2023-08-31 09:35:25 -07:00
Igor Biletskyy 687e9feeb1
H7: decrease FDCAN TX FIFOs to 1 (#1614)
init
2023-08-29 13:04:20 -07:00
Igor Biletskyy 0a32b17513
H7: few more Kb of RAM found (#1605)
* init

* remove discard
2023-08-24 16:56:31 -07:00
Igor Biletskyy c3c8d8f5de
peripherals.h clean and duplicates removal (#1599)
* init

* ULPI disable

* not related to clocks
2023-08-23 15:17:06 -07:00
Igor Biletskyy ee2f9dfd9c
H7: clean up peripherals.h (#1597)
init
2023-08-23 10:22:38 -07:00
Igor Biletskyy b47b8259ef
unify CAN/FDCAN odjects naming (#1596)
* init

* happy MISRA
2023-08-21 16:09:31 -07:00
Adeeb Shihadeh c66b98b2a6
finish esp/gps removal (#1559) 2023-08-06 12:29:54 -07:00
Robbe Derks d2d207b88d
In-circuit debugging (#1560)
* openocd script and readme

* do not disable SWD on boot
2023-08-05 16:04:09 -07:00
Adeeb Shihadeh d7120be904
panda jungle (#1547)
* mv jungle

* match pedal style

* fix linter

* fix fw path

* fix paths

* safety!
2023-08-03 23:55:13 -07:00
Robbe Derks b4700a876f
Stable ADC on H7 (#1540)
* 256x oversampling

* reduce to 128x

* fix misra

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-08-01 20:48:10 -07:00
Igor Biletksyy 8a8bcb865e H7: clear irqs on reset 2023-06-28 12:39:47 -07:00
Igor Biletskyy 73798d7dce
Disable CAN irqs when transceivers are disabled in power save mode (#1485)
init test

MISRA 15.7
2023-06-28 12:33:17 -07:00
Adeeb Shihadeh 58b80f3b77
H7: adjust SPI IRQ call rate (#1469)
* H7: adjust SPI IRQ call rate

* u

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-06-19 20:44:02 -07:00
Adeeb Shihadeh fdd898bd08
H7: split SPI/DMA faults (#1466) 2023-06-16 21:54:28 -07:00
Robbe Derks 054344de6b
Flash bounds checking outside of bootstub (#1459)
* add bounds checking on flash operations outside of bootstub

* fix test
2023-06-14 15:28:49 +02:00
Robbe Derks 116485443d
UART overwrite mode (#1457)
* overwrite mode

* typo
2023-06-14 13:33:47 +02:00
Igor Biletskyy 3a7a0e0bae
H7: fix lockup on disconnected bus (#1431)
* fix h7 lockup

* love MISRA!

* EW and EP isn't actual errors

* cleaner

* typo

* oops

* increase error limit before reset
2023-06-13 14:34:15 -07:00
Robbe Derks 0cc91a7f7b
Logging (#1445)
* try 1

* some fixes

* fix some misra

* first poc working

* more things

* more misra fixes

* fix misra

* add rate limiting

* fix misra

* add some unit tests through libpanda

* add more tests and fix some stuff

* fix misra again

* add startup log hitl test

* list

* don't fail on wrong timestamps

* improvements

* fix tests

* expected logs test?

* not sure why this passed

* oh, it doesn't reset

* only show last few

* guess at expected logs

* needs this

* ugh

* reduce compiler warnings

* adjust expected logs

* this is correct

* is it really 1?

* min max

* reduce spam in SPI test

* some cleanup
2023-06-13 17:00:56 +02:00
Adeeb Shihadeh 17ca4171df
H7 SPI: disable IRQs only when necessary (#1437)
less irq disable

Co-authored-by: Comma Device <device@comma.ai>
2023-06-03 15:53:16 -07:00
Igor Biletskyy 622106d7d4
Revert "H7: fix lockup on disconnected bus" (#1430)
Revert "H7: fix lockup on disconnected bus (#1410)"

This reverts commit 03435947bb.
2023-05-18 13:54:30 -07:00
Adeeb Shihadeh 2ed514807e
H7: restart SPI peripheral between transfers (#1424)
* H7: restart SPI peripheral between transfers

* fix misra

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-05-17 20:59:37 -07:00
Adeeb Shihadeh a93bc954c5
SPI HITL tests + cleanup (#1417)
* start comms hitl tests

* pull that out

* revert that

* more test

* fix warnings

* fix linter

* another simple case

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-05-17 17:13:12 -07:00
Igor Biletskyy 03435947bb
H7: fix lockup on disconnected bus (#1410)
* fix h7 lockup

* love MISRA!

* EW and EP isn't actual errors
2023-05-12 19:20:42 -07:00
Robbe Derks 2c937656cf
Continuous harness detection (#1402)
* read in mV and make threshold board-dependent

* refactor and add SBU voltages to health

* refactor relay driving

* more refactoring and readout lock

* avoid race condition

* fix misra

* continuous detection

* 1Hz is fine

* another race condition

* use harness detection to trigger bootkick

* update orientation detection test

* more in-depth harness tests

* fix ignition

* fix

* raise threshold
2023-05-08 13:30:23 +02:00
Adeeb Shihadeh e7f2e72c3d
setup independent watchdog (#1404)
* setup independent watchdog

* builds

* same file

* configurable timeout

* disable for now

* no feed

* rm

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-05-05 16:46:38 -07:00
Robbe Derks fea1feb598
ADC cleanup (#1401)
* cleanup function names

* cleanup voltage reading

* define constant

* fix misra

* remove comments
2023-05-04 13:22:01 +02:00
Adeeb Shihadeh 8e1ca608b0
H7: remove busy wait on TXC (#1381)
* works

* cleanup

* less irq

* less diff

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-05-01 20:18:23 -07:00