Commit Graph

43 Commits (390b8bce815b09ab68403c5e7ffc1f3bd7138d89)

Author SHA1 Message Date
Greg Hogan 390b8bce81
k-line 5 baud init (#565)
* 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
2020-07-10 14:18:24 -07:00
robbederks 387fd681dd
USB enumeration detection fix (#566)
* testing

* Looks fixed now

* Cleanup
2020-07-02 00:23:12 +02:00
robbederks d6668fe4ef
Turn on fan if panda is enumerated but not receiving heartbeat (#553)
* fix linter

* Turn on fan if panda is enumerated but not receiving heartbeat

* Upped to 50%
2020-06-11 18:14:41 -07:00
robbederks 74d10ccd38
Fixed possible race condition (#487) 2020-04-07 14:59:19 -07:00
Greg Hogan da8e00f115
TX message guaranteed delivery (#421)
* 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>
2020-04-06 16:49:42 -07:00
robbederks 656f99b080
Interrupt refactor (NVIC_SM_1: #334) and Fault handling (#377) (PR #373) 2019-11-27 18:11:21 -08:00
Jason Young 7f9b4a59b6 Fix USB device enumeration on Windows 8.1 and Windows 10 (#393)
* 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.
2019-11-27 11:03:37 -08:00
rbiasini fac0277169
Misra update (#280)
* 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
2019-09-27 17:18:02 -07:00
rbiasini 01072bec0b
Misra 11.x: pointer usage. (#250)
* 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
2019-07-10 20:56:03 -07:00
George Hotz fcb1208e15 fix weird code in USB_ReadPacket 2019-07-09 15:08:25 -07:00
Riccardo 9ce6311558 Misra 12.1 (operator order) and 10.4 (incompatible essential types) fixes, arised after properly checking UID_BASE config 2019-07-08 15:51:20 -07:00
Riccardo c97d60be64 Removed bad language 2019-07-08 12:05:08 -07:00
rbiasini 9be5fdead9
finished misra 17.8 (#241) 2019-07-04 01:37:26 -07:00
rbiasini 3c3aba3dbc
Misra 10.4: Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category (#240)
* Almost done with 10.4, a couple of non-obvious violations remaining
2019-07-04 01:04:58 -07:00
rbiasini 812ace5386
Misra 15_7: if … else if constructs should be terminated with an else clause (#230)
* Fixed all Misra 15_7 violations
2019-07-03 20:48:02 -07:00
rbiasini 1bd9284372
Misra 17.7: the value returned by a function having non-void return shall be used (#237)
* Fixed Misra 17.7 violations except for can_push
2019-07-03 16:01:01 -07:00
rbiasini ea908cbb75
10_1 violations: Operands shall not be of an inappropriate essential type (#233)
* 10_1 violations
2019-07-02 23:43:06 -07:00
Riccardo ecb9b6c01f Revert "Misra 10 1: Operands shall not be of an inappropriate essential type (#232)"
This reverts commit 8732e4faf0.
2019-06-30 13:43:21 -07:00
rbiasini 8732e4faf0
Misra 10 1: Operands shall not be of an inappropriate essential type (#232)
Fixe Misra 10.1 violations
2019-06-30 15:07:04 -05:00
rbiasini abd841e9be
Fix all 16_4 violations (#229) 2019-06-27 15:50:00 -07:00
Riccardo c27e7848f3 fix conflicts 2019-06-26 16:17:30 -07:00
rbiasini 4886b6b984
Misra 12.1: The precedence of operators within expressions should be made explicit (#227)
* Fixed all misra 12.1 violations
2019-06-26 16:16:35 -07:00
Riccardo e3c5e7da8c Fix Misra 15_5 violations 2019-06-26 15:52:34 -07:00
rbiasini 73ae4f6acf
Misra 14.4: The controlling expression of an if statement and the controlling expression of an iteration‑statement shall have essentially Boolean type (#225)
* Fixed 14.4 Misra violations
2019-06-26 13:13:16 -07:00
Riccardo 97a11115bb hardwired input param is now a boolean 2019-06-26 12:18:06 -07:00
Riccardo 541f8beee3 Fix bad bug 2019-06-24 19:16:53 -07:00
Riccardo 6a9ae3b7c3 The comma operator should not be used 2019-06-24 18:12:23 -07:00
Riccardo 5e3458df72 Fix Misra 20.7: Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses 2019-06-24 17:57:18 -07:00
rbiasini e2d781380a
Strict compiler (#222)
have no Wall warnings from the strict compiler and enforcing it in the regression test.
2019-06-24 10:25:30 -07:00
rbiasini a3f65d66e9
capitalize MIN and MAX macros (#220) 2019-06-17 13:48:14 -07:00
George Hotz 0a9f8eb581 remove many ifdef PANDA 2019-05-23 12:39:54 -07:00
George Hotz 506900576b remove nested includes and include guards 2019-05-23 12:39:54 -07:00
George Hotz 2c1e5f6325 the refactor continues 2019-05-23 12:39:22 -07:00
George Hotz 5516ebf3ce one more ifdef 2018-04-11 21:14:37 -07:00
Chris Vickery 6dbd8c972b
Implement WebUSB and upgrade WinUSB to 2.0 (#107)
* Implement webusb and winusb 2.0 specs

* Add missing constants

* Refactor string system, add support for USB2.1

* Uncapitalize the panda

* Add USB 2.0 extension descriptor and device qualifier getter

* Sleep during reconnect process to be more reliable

* Disable compiler optimizations because they break SPI coms
2018-04-11 10:08:56 -07:00
Greg Hogan 85807735f2 fix sending WinUSB Extended Properties Feature Descriptor 2018-02-24 20:33:52 -06:00
gregjhogan 0d3806000c auto-install WinUSB device driver 2018-02-10 23:09:02 -06:00
George Hotz 72a92f5610 spi flasher can power the panda 2017-08-25 11:52:27 -07:00
Firmware Batman 798f942346 fix legacy build issue, add build test, fix warnings 2017-08-01 03:00:53 +02:00
Firmware Batman 6b9ba40089 remove some dumb prints 2017-07-29 18:16:08 -07:00
Firmware Batman 9a1c1b692f write soft flasher 2017-07-24 15:16:22 -07:00
Firmware Batman 9783a2ab13 refactor drivers into drivers.h 2017-07-21 11:30:07 -07:00
Firmware Batman 2dd6c3f90c big refactor to drivers 2017-07-20 23:45:48 -07:00