Commit Graph

386 Commits

Author SHA1 Message Date
rusefillc 0ac2e043e1
Board cleanup (#39)
* io mapping typo

* board.h clean-up

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-01-01 19:57:57 -08:00
rusefillc 3c92151fc6
io mapping typo (#37)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-01-01 19:27:56 -08:00
rusefillc df47657a87
spelling (#36)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-01-01 16:57:52 -08:00
rusefillc 3a23d6bdbc
io mapping (#35)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-01-01 16:14:32 -08:00
Matthew Kennedy 03aec72af7 now this should work 2021-12-27 20:56:55 -08:00
Matthew Kennedy fc67088982 don't fail if missing 2021-12-27 20:54:25 -08:00
Matthew Kennedy 1764c38783 this build should fail 2021-12-27 20:51:09 -08:00
Matthew Kennedy 0bc41184e8 word order 2021-12-27 20:45:55 -08:00
Matthew Kennedy dd8d3c5c20 pal pump dac 2021-12-27 20:44:15 -08:00
Matthew Kennedy 8cb60d5b18 pal heater device 2021-12-27 20:42:57 -08:00
rusefillc 41105cd29f
extracting hardware-specifc CAN from BL (#32)
* extracting hardware-specifc CAN from BL
reusing CAN settings between FW and BL
moving CRC into better location

* spelling M0 stuff as M0 stuff

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2021-12-27 20:39:02 -08:00
Matthew Kennedy 17bf809a5f io pins f1 2021-12-27 20:35:45 -08:00
Matthew Kennedy df07bb4ec8 chmod +x 2021-12-27 20:34:02 -08:00
Matthew Kennedy 637ed6cbe0 scripts and ci 2021-12-27 20:23:26 -08:00
Matthew Kennedy 020dd4a392 wild swing at ADC 2021-12-27 20:20:03 -08:00
rusefillc fa8e2b1deb
better io file arrangement - Makefile gives more flexibility than relative path from .cpp file (#30)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2021-12-27 19:08:58 -08:00
rusefillc 28ac0c61f0
Can magic constants (#26)
* CAN api

* CAN api

* CAN api

* CAN api

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2021-11-08 11:01:16 -08:00
Matthew Kennedy 3146bac645 missed one 2021-11-07 22:56:20 -08:00
Matthew Kennedy 455e5381b6 pragma once 2021-11-07 22:55:07 -08:00
Matthew Kennedy 66f4921310 now it links 2021-11-07 22:53:20 -08:00
rusefillc b1372e47f6
Extract io (#25)
* LEDs for BL

* more reuse

* Windows exists

* extract NERNST pin

* Matt is asking to move

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2021-11-07 22:52:13 -08:00
Matthew Kennedy fb7d67ac7e put esr in temp field fo rnow 2021-11-06 02:20:47 -07:00
Matthew Kennedy 4714f5cfef remove aem format 2021-11-06 02:17:07 -07:00
Matthew Kennedy b8aeef09ef Merge branch 'send-version' 2021-11-06 02:12:52 -07:00
Matthew Kennedy f484c1ff41 extract definitions 2021-11-06 02:12:29 -07:00
Matthew Kennedy f675c63279 comment 2021-11-04 15:07:47 -07:00
Matthew Kennedy d86f076c37 new format 2021-11-03 23:12:20 -07:00
Matthew Kennedy 0a117089b8 uppercase functions 2021-11-03 23:02:11 -07:00
Matthew Kennedy 1ce6981b53 rusefi data 2021-11-03 22:40:43 -07:00
Matthew Kennedy 0577011222 increase heater timeout 2021-08-16 11:30:52 -07:00
Matthew Kennedy 10cbc928b0 make reality match the comment 2021-07-16 10:36:05 -07:00
Matthew Kennedy 18cc209f72 listen to heater enable bit 2021-07-15 21:50:22 -07:00
Matthew Kennedy 24cdee9c28 correct preheat duty 2021-07-15 21:48:24 -07:00
Matthew Kennedy e501510e80 less D 2021-07-12 23:49:55 -07:00
Matthew Kennedy 1119d79856 heater tweaks 2021-07-12 23:45:35 -07:00
Matthew Kennedy 21a3ae4939 overvolt protect 2021-07-12 22:44:42 -07:00
Matthew Kennedy 24fe166799 pid tuning, overvolt protect 2021-07-12 22:40:47 -07:00
Matthew Kennedy c3933827d6 lower CL threshold 2021-07-12 19:22:20 -07:00
Matthew Kennedy 00ba70522b heater control 2021-07-12 15:46:10 -07:00
Matthew Kennedy 9ff5df55fd name 2021-07-12 15:33:10 -07:00
Matthew Kennedy 7176ecb6c8 duty cycle math 2021-07-12 15:32:45 -07:00
Matthew Kennedy d645855adb get battery voltage from CAN 2021-07-12 15:31:02 -07:00
Matthew Kennedy a0f1b27c4d start on heater voltage control 2021-07-12 15:24:20 -07:00
Matthew Kennedy d3f90f2054 heater fiddling 2021-07-09 23:15:24 -07:00
Matthew Kennedy c12f4b7e43 dterm science 2021-07-09 11:22:33 -07:00
Matthew Kennedy b44fe3b98c add D term 2021-07-09 11:16:46 -07:00
Matthew Kennedy 26e46dd77a relax heater PI 2021-07-08 22:23:01 -07:00
Matthew Kennedy f9d94f1695 wait to start heater 2021-06-03 21:03:41 -07:00
Matthew Kennedy 6238eed3e3 filter esr 2021-06-03 20:50:39 -07:00
Matthew Kennedy 48dbdb842e hardware index selection works 2021-05-19 00:54:10 -07:00
Matthew Kennedy 475d7b8936 only read config when necessary 2021-05-19 00:53:52 -07:00
Matthew Kennedy 8397807cb2 progress on #11 2021-05-19 00:33:36 -07:00
Matthew Kennedy 459e45908a warn about missing submodules 2021-04-28 14:41:58 -07:00
Matthew Kennedy d0889d6115 dave's board build now 2021-04-26 17:47:17 -07:00
Matthew Kennedy 78f6f4c284 dave chconf 2021-04-26 17:43:09 -07:00
Matthew Kennedy f4c3dfd74d clarify heater ramp math 2021-04-26 17:40:06 -07:00
Matthew Kennedy fe0b2ac945 disable pump in case of problems 2021-04-26 17:37:53 -07:00
Matthew Kennedy 37ce153eac clamp ESR value over CAN 2021-04-26 17:25:10 -07:00
Matthew Kennedy e532ce1af8 long timeout 2021-03-17 23:40:23 -07:00
Matthew Kennedy c80d86f182 send extended 2021-03-17 23:40:15 -07:00
Matthew Kennedy 31288634a0 correct ramp 2021-03-17 23:40:07 -07:00
Matthew Kennedy 9163d44962 pwm doesn't work without this 2021-03-17 22:53:24 -07:00
Matthew Kennedy 374b9aaf11 implement index set 2021-03-14 00:22:58 -08:00
Matthew Kennedy b7675e6411 enable auto retransmit 2021-03-13 15:34:19 -08:00
Matthew Kennedy ab8c24564f make the compiler happy 2021-02-25 23:12:22 -08:00
Matthew Kennedy b0763f3023 dave CAN 2021-02-25 22:59:02 -08:00
Matthew Kennedy 1759245dca move CAN to port 2021-02-25 22:57:44 -08:00
Matthew Kennedy a15a71f545 stub for Dave's board 2021-02-25 22:51:32 -08:00
Matthew Kennedy 6c12914493 make uart timeout field optional 2021-02-25 22:49:51 -08:00
Matthew Kennedy 98a4dd41b2 no advanced timer 2021-02-25 22:48:35 -08:00
Matthew Kennedy bf8bfb627a unused 2021-02-25 22:48:24 -08:00
Matthew Kennedy d878252b48 move adc to port 2021-02-25 22:39:51 -08:00
Matthew Kennedy b2b05b0c45 extract mcu 2021-02-25 22:35:26 -08:00
Matthew Kennedy cdd4a60fdc grumble grumble this changes the link order 2021-02-25 22:26:55 -08:00
Matthew Kennedy 1dbc8d3402 don't need that 2021-02-25 22:21:27 -08:00
Matthew Kennedy e2fcaa40fc make bootloader optional 2021-02-25 22:10:53 -08:00
Matthew Kennedy a61b23cd44 move board-specific stuff in to its own folder 2021-02-25 22:02:15 -08:00
Matthew Kennedy fc2640205d default to index 0 2021-02-25 14:14:59 -08:00
Matthew Kennedy a972b99882 adjust control loop gains 2021-01-30 16:08:16 -08:00
Matthew Kennedy cf106b6555 slightly lower noise 2021-01-19 00:24:47 -08:00
Matthew Kennedy 9be84d5a2c simplify can 2021-01-17 03:32:17 -08:00
Matthew Kennedy 89906fddf3 correct for resistor 2021-01-17 03:31:44 -08:00
Matthew Kennedy cce888559e relax heater control a bit 2021-01-15 21:51:14 -08:00
Matthew Kennedy 00f77af2dd turn off uart for now 2021-01-15 19:21:27 -08:00
Matthew Kennedy 6e9c259c8f adjust wamup ramp to match datasheet 2020-12-25 22:46:07 -08:00
Matthew Kennedy 79965d0bc5 pin speed 2020-12-25 03:03:36 -08:00
Matthew Kennedy 407503ca2a swap blink speed 2020-12-19 16:06:45 -08:00
Matthew Kennedy 0be5297d86 restrict bl entry msg 2020-12-19 14:56:22 -08:00
Matthew Kennedy a0c9779b0c set reserved bit 2020-12-15 16:41:19 -08:00
Matthew Kennedy 3a90d3aeed log extra data over CAN 2020-12-15 15:01:38 -08:00
Matthew Kennedy 495819659d heater too 2020-12-15 15:00:11 -08:00
Matthew Kennedy fb66c03ac7 api to get pump duty 2020-12-15 14:58:39 -08:00
Matthew Kennedy 2d5d6a0026 filter pump output 2020-12-15 14:41:09 -08:00
Matthew Kennedy 36950ccea7 check crc before boot 2020-12-14 15:51:53 -08:00
Matthew Kennedy 7d96535419 update build script 2020-12-14 15:46:54 -08:00
Matthew Kennedy cb911b46af add crc code to bl 2020-12-14 14:58:14 -08:00
Matthew Kennedy 60b44d5287 tack on crc 2020-12-14 14:57:49 -08:00
Matthew Kennedy e3ebe524e4 fast warmup 2020-12-13 17:24:33 -08:00
Matthew Kennedy 129cff8b49 can 2020-12-13 15:06:32 -08:00
Matthew Kennedy 455c1ba4a0 extend lambda range 2020-12-13 14:49:58 -08:00
Matthew Kennedy 3373f65dc4 allow FW to reboot to BL 2020-12-12 20:18:20 -08:00
Matthew Kennedy 2a5242d47f pause after ack 2020-12-12 20:18:11 -08:00
Matthew Kennedy 05aa1a2da4 send ext id 2020-12-12 20:06:21 -08:00
Matthew Kennedy 17e6109aae NART 2020-12-12 15:41:44 -08:00
Matthew Kennedy 00e07d5d93 fix can mode 2020-12-12 15:17:44 -08:00
Matthew Kennedy b57a7ff4c0 bl works 🎉 2020-12-12 15:11:48 -08:00
Matthew Kennedy 0b4521693b fix flash erase 2020-12-12 14:33:23 -08:00
Matthew Kennedy 9831facfc7 fix opcode decode 2020-12-12 14:32:03 -08:00
Matthew Kennedy e33889ef14 bootloader board.h 2020-12-12 13:22:29 -08:00
Matthew Kennedy fc01d42ddc 1 mbit 2020-12-12 02:09:01 -08:00
Matthew Kennedy dfd7781cef clamp lambda 2020-12-12 00:29:48 -08:00
Matthew Kennedy e383c3575c print pump current 2020-12-11 16:51:03 -08:00
Matthew Kennedy 770283accd simpify 2020-12-11 16:50:06 -08:00
Matthew Kennedy 5c9acd4c66 detect underheat fault 2020-12-11 15:46:03 -08:00
Matthew Kennedy 41e87cc1d6 go to CL earlier 2020-12-11 15:25:01 -08:00
Matthew Kennedy 94828339f9 clamp pid 2020-12-11 15:24:56 -08:00
Matthew Kennedy a8bdedaef6 actually stop if overheated 2020-12-11 15:10:04 -08:00
Matthew Kennedy 79b49456b3 faster uart 2020-12-11 02:05:41 -08:00
Matthew Kennedy db855532c7 filter less 2020-12-11 02:04:23 -08:00
Matthew Kennedy d89cda413b sense actual Vm value 2020-12-11 00:25:50 -08:00
Matthew Kennedy b0d837f038 uart print 2020-12-11 00:24:19 -08:00
Matthew Kennedy 8aee43ba8f don't need float printf 2020-12-11 00:24:14 -08:00
Matthew Kennedy 516c787f92 fix uart pinout 2020-12-11 00:12:33 -08:00
Matthew Kennedy fec99d344a serial printing 2020-12-10 23:56:18 -08:00
Matthew Kennedy 70ea760717 fix bounds check 2020-12-10 23:49:51 -08:00
Matthew Kennedy 327e3b08ec actually do it 2020-12-10 23:48:55 -08:00
Matthew Kennedy 9b23129d2a extract uart 2020-12-10 23:48:47 -08:00
Matthew Kennedy a5ba643ec5 add full build script 2020-12-10 23:37:28 -08:00
Matthew Kennedy 36f52312db bounds check flash writes 2020-12-10 23:36:45 -08:00
Matthew Kennedy c711252791 detect sensor overheat 2020-12-10 22:08:00 -08:00
Matthew Kennedy 1110cc81ff simplify more 2020-12-10 21:58:59 -08:00
Matthew Kennedy 26312d76aa simplify blink out 2020-12-10 21:58:09 -08:00
Matthew Kennedy bb05860e97 don't nuke the BL section 2020-12-10 21:52:19 -08:00
Matthew Kennedy 8b9569d906 turn on link gc 2020-12-10 21:46:57 -08:00
Matthew Kennedy 5c2dd19c3f blink fault codes 2020-12-10 21:46:41 -08:00
Matthew Kennedy 47050e8c5a un-flip logic 2020-12-10 21:33:33 -08:00
Matthew Kennedy 266a067fed turn more off 2020-12-10 21:06:46 -08:00
Matthew Kennedy be8eb62046 turn off features 2020-12-10 21:05:07 -08:00
Matthew Kennedy 43445e80e4 warning 2020-12-10 21:05:02 -08:00
Matthew Kennedy 031c7d6b3f makefile 2020-12-10 21:03:59 -08:00
Matthew Kennedy 745c14a160 detect warmup failure 2020-12-10 18:32:41 -08:00
Matthew Kennedy a86340767c format 2020-12-10 18:12:44 -08:00
Matthew Kennedy 180b9f6904 change closed loop threshold 2020-12-10 18:10:26 -08:00
Matthew Kennedy b8c5e42f9d change blink in closed loop 2020-12-10 18:09:52 -08:00
Matthew Kennedy ea1f528aea move CAN loop 2020-12-10 18:08:06 -08:00
Matthew Kennedy 2d483cc586 fix nernst 2020-12-10 18:06:50 -08:00
Matthew Kennedy ec20b7ed9d validate flash request 2020-12-10 17:58:02 -08:00
Matthew Kennedy a418c9903f rename flag, send nak 2020-12-10 17:30:41 -08:00
Matthew Kennedy 2c7679e526 slow down BL active blink 2020-12-10 17:29:07 -08:00
Matthew Kennedy 2b72383c8f bl blinkenlights 2020-12-10 17:28:04 -08:00
Matthew Kennedy eb3345ba71 fix board pinout 2020-12-10 17:27:53 -08:00
Matthew Kennedy bf90d1514b works on new board 2020-12-10 17:06:00 -08:00
Matthew Kennedy eef58ae5dc Revert "switch to nil"
This reverts commit d3a9f34eaf.
2020-12-10 16:55:59 -08:00
Matthew Kennedy f1af6be009 blink the blue led 2020-12-10 16:09:05 -08:00
Matthew Kennedy a85a4a8c65 warnings 2020-12-09 08:21:59 -08:00
Matthew Kennedy 98fc25540f this probably doesn't work 2020-12-09 01:03:23 -08:00
Matthew Kennedy 8ab95e18c1 flash api 2020-12-09 01:03:14 -08:00
Matthew Kennedy d3a9f34eaf switch to nil 2020-12-09 01:00:04 -08:00
Matthew Kennedy 4b5d90332d layoud 2020-12-09 00:24:11 -08:00
Matthew Kennedy c986a2e05c shared flash impl 2020-12-09 00:24:06 -08:00
Matthew Kennedy 0e0281f372 bl build 2020-12-08 23:40:32 -08:00
Matthew Kennedy c13385a32f narrator: no, it is not 2020-12-08 23:40:16 -08:00
Matthew Kennedy d7b6ee1422 use shared linker config 2020-12-08 23:32:54 -08:00
Matthew Kennedy 8d9f2b44ad expand bl 2020-12-08 23:17:53 -08:00
Matthew Kennedy 9998a14cc0 tx both frames 2020-12-08 23:17:06 -08:00
Matthew Kennedy 7fca3663bb emulate aem xseries 2020-12-08 23:16:47 -08:00
Matthew Kennedy 97a353ec68 bootloader clock the same as app 2020-12-04 23:16:26 -06:00
Matthew Kennedy 1222d00bb3 blink faster 2020-12-02 21:15:22 -08:00
Matthew Kennedy 362323e9ba turn on optimization 2020-12-02 21:10:53 -08:00
Matthew Kennedy a318bedcfe app linker settings for bl 2020-12-02 16:01:54 -08:00
Matthew Kennedy d7c1e3b350 cleanup 2020-12-02 15:59:13 -08:00
Matthew Kennedy e6a6bcd23a cleanup 2020-12-02 15:58:18 -08:00
Matthew Kennedy c2bc75792d working bootloader 2020-12-02 15:57:22 -08:00
Matthew Kennedy e6b97d78fc cleanup 2020-11-30 22:29:32 -08:00
Matthew Kennedy 2cbbcd7e82 Revert "add f103 linker script"
This reverts commit 3daed0e1c3.
2020-11-30 22:28:58 -08:00
Matthew Kennedy 3daed0e1c3 add f103 linker script 2020-11-29 22:17:17 -08:00
Matthew Kennedy 7780810b45 add hal features that the f103 has 2020-11-29 22:15:33 -08:00
Matthew Kennedy c2b535facf cleanup 2020-11-28 03:04:04 -08:00
Matthew Kennedy f68a12b2fc send over CAN 2020-11-28 02:56:46 -08:00
Matthew Kennedy 95d14ad170 correct CAN 2020-11-28 02:56:34 -08:00
Matthew Kennedy 95ba8de396 cleanup 2020-11-28 02:13:25 -08:00
Matthew Kennedy a5f0f4eb3b custom linker script 2020-11-27 19:58:38 -08:00
Matthew Kennedy 1febbe0266 debugging config 2020-11-11 16:30:31 -08:00
Matthew Kennedy 22916eef37 more gain 2020-11-06 21:46:04 -08:00
Matthew Kennedy a1115c78f4 sample faster 2020-11-03 01:52:19 -08:00
Matthew Kennedy 3d80ff1d8b comment about bosch datasheet 2020-11-02 23:05:35 -08:00
Matthew Kennedy a61157760a fix lambda math 2020-11-02 01:28:30 -08:00
Matthew Kennedy bd5d77044b improve comment 2020-11-01 01:26:02 -08:00
Matthew Kennedy 2aedbd6eef lambda conversion 2020-11-01 01:17:13 -08:00
Matthew Kennedy 85b0c4b6b4 gains 2020-10-31 18:44:09 -07:00
Matthew Kennedy 139a5fef81 less pid 2020-10-31 17:47:52 -07:00
Matthew Kennedy 0b7f591671 heater PID works 2020-10-31 17:34:36 -07:00
Matthew Kennedy 0e350c9f66 oops 2020-10-31 17:12:34 -07:00
Matthew Kennedy e16c1b626d Merge branch 'master' of https://github.com/mck1117/wideband 2020-10-31 17:01:37 -07:00
Matthew Kennedy 76859f851d printing 2020-10-31 17:01:33 -07:00
Matthew Kennedy 3fdf60b956 pump controller 2020-10-31 16:59:35 -07:00
Matthew Kennedy d39df2d199 heater pid 2020-10-31 14:58:34 -07:00
Matthew Kennedy 453a4c4337 add IsRunningClosedLoop 2020-10-31 14:54:50 -07:00
Matthew Kennedy ac7a2a9e68 maybe heater logic 2020-10-30 02:40:18 -07:00
Matthew Kennedy fbce57558f clamp pwm duty 2020-10-30 02:39:39 -07:00