Commit Graph

364 Commits

Author SHA1 Message Date
Mario Hüttel ec117e0627 Change linker script and startup code.
This is my own code from my template. It is much cleaner than the old code.
2020-08-21 23:47:55 +02:00
Mario Hüttel 95de84fa85 Fix #13: Add hang command to shell 2020-08-21 00:29:19 +02:00
Mario Hüttel 432d30cc34 Fix #12: Timing monitors are now correctly displayed in flags command 2020-08-21 00:20:16 +02:00
Mario Hüttel 0395cd19d4 SD card settings folder: Use f_stat to determine if directory is present 2020-08-21 00:06:56 +02:00
Mario Hüttel 04994bff51 Issue #9: Fix timeout bug in write block command 2020-08-21 00:00:08 +02:00
Mario Hüttel 45564a7789 Fix safety issue #11 2020-08-18 20:47:08 +02:00
Mario Hüttel fa20304df8 Makefile: Add linker script as dependency for linking step 2020-08-18 20:23:44 +02:00
Mario Hüttel 86ba94a3f3 Makefile: Add linker flag to show memory usage after linking 2020-08-18 20:10:15 +02:00
Mario Hüttel 60e990632b Fix #10: Moved static and global variablöes that are 0 initialized to CCMRAM in order to make room and increase performance. 2020-08-18 19:57:13 +02:00
Mario Hüttel 64ef7b4a3c Issue #9: Increase SDIO clock speed to 4.2 MHz 2020-08-18 19:30:51 +02:00
Mario Hüttel 277b28d7f5 Make green LED flash instead of orange one, when inserting SD card 2020-08-17 22:26:29 +02:00
Mario Hüttel bdfaa67070 Fix typo 2020-08-17 22:26:05 +02:00
Mario Hüttel 4e9b28ce15 Improve SDIO handling 2020-08-17 22:10:04 +02:00
Mario Hüttel 543127b187 Fix bugs in settings saving 2020-08-16 22:11:57 +02:00
Mario Hüttel 6c92048de5 Remove emptry line 2020-08-16 20:35:11 +02:00
Mario Hüttel 227562cf3c Load calibration when SD card is inserted.
* Load calibration when SD card is inserted and controller is not yet calibrated
* Fix #7: LED0 blinks when SD is inserted / removed.
2020-08-16 20:33:25 +02:00
Mario Hüttel 58937b46f6 Improve code 2020-08-16 20:33:17 +02:00
Mario Hüttel e06c9f7ddc Remove toml. Write calibration to dat files. Implement first draft for reading function 2020-08-16 19:37:41 +02:00
Mario Hüttel d04d8ebf9d Change save fuinction for SD card calibration data 2020-08-16 13:15:35 +02:00
Mario Hüttel 42ca1a01b5 Merge branch 'issue/1-shell-function-save-calibration-data' into dev 2020-08-16 12:53:47 +02:00
Mario Hüttel 68883735ec Remove global error state from main file 2020-08-16 12:53:05 +02:00
Mario Hüttel 15d255778c Fix #1: Implement save function for calibration 2020-08-16 12:52:37 +02:00
Mario Hüttel d1d2d514bd Add timing monitor for main loop and add monitors to safety flag command 2020-08-16 12:34:41 +02:00
Mario Hüttel fa3c980207 shell: Add dummy function save-calibration. Not yet correcly implemented! 2020-08-16 01:24:59 +02:00
Mario Hüttel 3c6200e08c Settings: Add preliminary functions to store Claibration data on SD Card. Not yet implemented correctly 2020-08-16 01:24:20 +02:00
Mario Hüttel e7d150e8f5 FatFs: Enable relative paths 2020-08-16 01:23:50 +02:00
Mario Hüttel c5667c6895 Toml: Add TOML interpreter for config files 2020-08-16 01:22:57 +02:00
Mario Hüttel b7ccd8542e Increase safety ADC timing monitor to over a second. It might take a while for the ADC to be called if a demanding operation is taking place 2020-08-16 01:22:26 +02:00
Mario Hüttel 1ad68a2c43 SDIO Driver: Fix bug created in commit 3705cc09d1 that makes writing to disk impossible 2020-08-16 01:19:56 +02:00
Mario Hüttel 4ab91ace5f Remove redundant define macro 2020-08-11 23:37:26 +02:00
Mario Hüttel a68b9176cb Move ADC_TO_RES macro to header file 2020-08-11 23:21:14 +02:00
Mario Hüttel cb3c989683 Docu 2020-08-04 00:55:16 +02:00
Mario Hüttel f6f01b0510 Improve sphinx 2020-08-03 21:13:04 +02:00
Mario Hüttel e8e3d71bbe doxygen: Remove latex output and add optional flags to buildscript 2020-08-02 22:15:33 +02:00
Mario Hüttel 464c247e32 Fix a few bugs and implement flags command further 2020-07-30 20:29:48 +02:00
Mario Hüttel 6c4b698fd7 Add safety flag for debugbuild 2020-07-28 23:29:35 +02:00
Mario Hüttel 6498aaf8b8 Add color to flag monitor command and set oven output to 0 2020-07-28 23:26:28 +02:00
Mario Hüttel b65d94b0e8 Fix ADC measurement to run at 1000 Hz and fix wrong error handling for PT1000 Watchdog. Add function for flags to shell 2020-07-28 22:55:02 +02:00
Mario Hüttel 97fc04399e Fix recursion loop in safety controller 2020-07-28 21:00:37 +02:00
Mario Hüttel da96daa767 Reworked measurement ADC to use safety controller 2020-07-27 22:15:01 +02:00
Mario Hüttel a9e300bf5b Make error structures volatile 2020-07-27 21:32:25 +02:00
Mario Hüttel 4f3016649d First draft of safety controller 2020-07-27 21:29:15 +02:00
Mario Hüttel a04e894518 Further work on safety controller 2020-07-26 21:40:09 +02:00
Mario Hüttel 9136dc196c Further rewrite safety handling 2020-07-09 22:31:42 +02:00
Mario Hüttel 5eb51f08b6 Start safety implementation. Completely dumped old stuff 2020-07-07 20:47:22 +02:00
Mario Hüttel 06a75559f0 Add structure for safety controller config. 2020-07-07 19:26:00 +02:00
Mario Hüttel 248707055e Fix watchdog init code 2020-07-06 21:37:36 +02:00
Mario Hüttel 67a32cdc20 Safety Controller:
* Add watchdog code
* Add file structure for safety controller
* Lay groundstones to move all error flags to the safety controller
* Improve doxygen
2020-07-06 21:12:18 +02:00
Mario Hüttel 8a365ab5e0 Move safety ADC to safety subfolder 2020-07-06 20:13:01 +02:00
Mario Hüttel 7cd05e1582 Update shellmatta 2020-06-25 23:54:36 +02:00
Mario Hüttel 0e97d57883 Improve menu function 2020-06-25 23:52:58 +02:00
Mario Hüttel cced874460 Add Pullup to uart RX pin 2020-06-21 01:29:50 +02:00
Mario Hüttel 49927a25cf Add Omega as unit for Ohm in LCD menu 2020-06-16 20:05:32 +02:00
Mario Hüttel a7c91cee0e GUI: About menu: Add '[DEBUG]' text if code is build in debug mode 2020-06-15 22:00:47 +02:00
Mario Hüttel acbde24c2f Makefile: Add program-debug option for flashing debug elf 2020-06-15 21:57:36 +02:00
Mario Hüttel 47d8df052a Makefile: Make a separate memory mapfile for each build configuration (release or debug) 2020-06-15 21:48:37 +02:00
Mario Hüttel 3705cc09d1 SDIO driver: Fix minor issues in SDIO driver 2020-06-15 21:31:49 +02:00
Mario Hüttel ecd8d2537d Append -release to release output elf 2020-06-15 21:24:27 +02:00
Mario Hüttel 56439a3b13 Makefile: Add differnet targets for debug and release builds 2020-06-15 21:22:05 +02:00
Mario Hüttel 78417e0c8c Progress in error handling 2020-06-14 23:36:49 +02:00
Mario Hüttel 62a3e06baa Fixx style problems and design errors in main.c 2020-06-14 23:22:35 +02:00
Mario Hüttel 485b887b54 fix too long lines 2020-06-14 22:56:34 +02:00
Mario Hüttel fe75b93ec7 Fix logical or operator 2020-06-14 20:26:32 +02:00
Mario Hüttel ab157bfb5a Fix empty line 2020-06-14 19:15:02 +02:00
Mario Hüttel f0bf10d91d use correct LED for error blinking 2020-06-14 19:13:50 +02:00
Mario Hüttel cbd28f9a12 Add safety management in PID handler and main loop 2020-06-14 19:10:09 +02:00
Mario Hüttel a33154b2d0 Move shadow buffer of LCD to CCMRAM 2020-06-14 18:02:45 +02:00
Mario Hüttel 828b47f3be Fix error in power handling of LCD FSM 2020-06-14 17:52:27 +02:00
Mario Hüttel 7b426c93c9 About GUI menu: Improve rotary handling 2020-06-14 16:26:32 +02:00
Mario Hüttel 20fd7b41e6 Edit about menu: Add new entry for serial number and compile info 2020-06-14 16:19:42 +02:00
Mario Hüttel f60545f664 make convenience pointer to global structs const 2020-06-14 14:50:27 +02:00
Mario Hüttel 679d4534cb Add formatted prinbt function for LCD menu and use systick vonversion in uptime shell command 2020-06-14 14:45:58 +02:00
Mario Hüttel 372be53471 make uptime in LCD UI use systick function for converting uptime 2020-06-14 14:16:12 +02:00
Mario Hüttel 0cdc7448e4 Systick: Add function to calculate uptime in days, hours, minutes, and seconds from global tick 2020-06-14 13:35:47 +02:00
Mario Hüttel 43b4fd1e77 Changes for menu
* Make Systick a 100us Timer. Millisecond ticks are still untouched.
* LCD now has a 100us resolution tick
* LCD uses 500us delay for waitstate
* Make 'About' menu verbose:
	* Add 3 page menu
	* 1st page: Generic info
	* 2nd page: Version info
	* 3rd page: Uptime in seconds
2020-06-14 13:25:47 +02:00
Mario Hüttel d178910594 Fix last change to make controller WFI in LCD_FMS_NOP state 2020-06-14 01:34:42 +02:00
Mario Hüttel 6f4363e021 Change return value of reflow_menu_handle 2020-06-14 01:31:44 +02:00
Mario Hüttel 0fca4c6c20 LCD Timing changes 2020-06-14 01:04:21 +02:00
Mario Hüttel 7595e6ced8 Fix smaller code mistake in LCD FSM 2020-06-13 23:37:04 +02:00
Mario Hüttel 2547c134f2 Add PID controller to oven driver module 2020-06-13 23:23:59 +02:00
Mario Hüttel a6dc4f9b46 Add about command to menu and restructure code. Delete preliminary code from mainloop. Better code will follow 2020-06-13 22:47:45 +02:00
Mario Hüttel e627cb67a5 fix smaller bugs in Menu code and implement first test of main menu with one functional sunbmenu for the safety parameters 2020-06-12 01:35:37 +02:00
Mario Hüttel d6e489bb61 Add defines for special LCD characters 2020-06-11 23:58:51 +02:00
Mario Hüttel 3b2d8c14c3 Change division to multiplication in floating point operation 2020-06-09 23:01:04 +02:00
Mario Hüttel 949d16cd03 Add display buffer to ccm ram 2020-06-09 22:53:13 +02:00
Mario Hüttel 917497e7e4 implement display update function for lcd menu 2020-06-09 22:50:20 +02:00
Mario Hüttel 7db5f02067 implemnt scrollable menu field. Not yet tested 2020-06-09 22:43:00 +02:00
Mario Hüttel 70730fd0f0 Add qtproejct target to Makefile which generates a usable qtcreator project folder 2020-06-09 21:50:37 +02:00
Mario Hüttel c63986e271 Add further testing code for rotary encoder and lcd 2020-06-09 19:03:33 +02:00
Mario Hüttel 9615fdb39d Further menu implementations 2020-06-04 21:53:00 +02:00
Mario Hüttel fc2372f754 Fix possible error in menu implementation 2020-06-04 21:47:31 +02:00
Mario Hüttel 92c0c5cd8c shrink shellmatta history buffer 2020-06-04 21:46:45 +02:00
Mario Hüttel 25bb341fa4 Implement preliminary menu functions 2020-06-04 21:20:59 +02:00
Mario Hüttel 0d44d25ec9 Add reminder to implement checking of safety ADC 2020-06-04 21:20:43 +02:00
Mario Hüttel 6b4029f8c2 Make startup file unix like and add a hardcoded enable for the FPU 2020-06-04 21:20:17 +02:00
Mario Hüttel 76f5a4e9be Fix error in safety ADC 2020-06-01 22:59:27 +02:00
Mario Hüttel f493b823b3 Add lcd-menu module as specific implementation module for the menu on the LCD 2020-06-01 21:45:36 +02:00
Mario Hüttel d508402aa8 Add basic definitions for menu entries 2020-06-01 21:42:31 +02:00
Mario Hüttel 6477950eea Merge branch 'dev' into ui 2020-06-01 20:53:43 +02:00
Mario Hüttel 5819a0736c Add defines for safety adc conversions 2020-06-01 20:53:28 +02:00
Mario Hüttel f956968cb4 Make reading the global ms tick atomic in order to prevent glitches 2020-06-01 20:45:27 +02:00
Mario Hüttel 1751db31c5 Fix typo 2020-06-01 20:44:58 +02:00
Mario Hüttel e659c6d097 make PID controller mathemtaically correct 2020-05-25 01:56:54 +02:00
Mario Hüttel 355e81ba44 Add multitone support for loudspeaker 2020-05-24 23:35:17 +02:00
Mario Hüttel c18acba48b Merge branch 'dev' into ui 2020-05-16 21:08:24 +02:00
Mario Hüttel e97092042b Add preliminary safety ADC which measures the Controller temperature and checks the reference voltage against the STM's internal reference voltage 2020-05-16 21:00:55 +02:00
Mario Hüttel dc8beefb63 Move PT1000 Measurement from ADC1 to ADC3 in order to make ADC1 free for Safety ADC implementation 2020-05-16 20:59:51 +02:00
Mario Hüttel 6c013d5aa3 Merge branch 'dev' into ui 2020-05-11 21:59:25 +02:00
Mario Hüttel 2614cea431 Make claibration routine non blocking 2020-05-11 21:59:08 +02:00
Mario Hüttel b9857745b1 Fix parentheses in macros 2020-05-11 21:52:11 +02:00
Mario Hüttel 13bdd6b8eb Cleanup main function 2020-05-11 21:51:32 +02:00
Mario Hüttel 0b83125ab5 Merge branch 'dev' into ui 2020-05-10 23:13:47 +02:00
Mario Hüttel 8d6c81441d Add oven PWM controller 2020-05-10 23:13:03 +02:00
Mario Hüttel 5fcb5305f8 Implement dummy for calibration save function 2020-05-09 20:51:30 +02:00
Mario Hüttel d6d8973800 Fix typo in comment 2020-05-09 20:51:06 +02:00
Mario Hüttel 99ae5f9bc1 Add lcd to menu 2020-05-09 20:50:15 +02:00
Mario Hüttel 4f05c084d9 Make ptdump command async: Main loop will continue if comamnd is called 2020-05-09 20:40:31 +02:00
Mario Hüttel 8f2418eb7c Merge branch 'dev' into ui 2020-05-09 20:01:56 +02:00
Mario Hüttel a25d3bc8c9 make display faster 2020-05-09 19:56:47 +02:00
Mario Hüttel 8a0572d698 Move main loop implementation torwards target 2020-05-05 18:55:55 +02:00
Mario Hüttel 2187c1a712 Write a few doxygen headers 2020-05-05 18:19:49 +02:00
Mario Hüttel 60602008d4 Update 'stm-firmware/ui/lcd.c' 2020-05-05 08:07:24 +02:00
Mario Hüttel 04389b1df6 Use correct format specifier in printf for uint32_t 2020-05-05 00:01:09 +02:00
Mario Hüttel 90da880386 Makefile: Cleanup whole obj/ dir when clean 2020-05-05 00:00:44 +02:00
Mario Hüttel bd82f55966 Show rotary encode value on display 2020-05-04 21:36:53 +02:00
Mario Hüttel 3d48bfb6a6 Fix lenght of LCD from 20 chars to 16 chars 2020-05-04 21:36:37 +02:00
Mario Hüttel ea3d0121cc Add selected functions to optimization for faster interrupt handling 2020-05-04 21:31:02 +02:00
Mario Hüttel e2c2be6e30 Implement state machine controlled async LCD writing 2020-05-04 21:21:49 +02:00
Mario Hüttel df82f14206 Make LCD code working. Add FSM for LCD in order to write it in mainloop 2020-05-02 19:10:20 +02:00
Mario Hüttel e237776810 Fix parenthesis in macros 2020-05-02 19:09:17 +02:00
Mario Hüttel 88062dc8e4 Add systick function that checks for passed ticks with correct wrap around 2020-05-02 19:06:42 +02:00
Mario Hüttel 67899c8f02 Merge branch 'dev' into ui 2020-05-01 19:53:43 +02:00
Mario Hüttel cfaffc7d50 Update shellmatta to newset version 2020-05-01 19:52:46 +02:00
Mario Hüttel fe51c80248 Merge branch 'dev' into ui 2020-04-27 21:53:27 +02:00
Mario Hüttel e7106b54c4 Add cat command 2020-04-27 21:52:52 +02:00
Mario Hüttel 119aa1b0ff Add main loop counter 2020-04-27 21:08:53 +02:00
Mario Hüttel 415979e211 Merge branch 'dev' into ui 2020-04-27 20:20:03 +02:00
Mario Hüttel d91463c458 Make MOTD clear the screen 2020-04-27 20:19:49 +02:00
Mario Hüttel 122a16ad4e Use button module in main loop 2020-04-27 20:18:45 +02:00
Mario Hüttel 3834bd404c Fix button module and adjust long keypress time to a sane value 2020-04-27 20:18:12 +02:00
Mario Hüttel eb3b0eb459 Merge branch 'dev' into ui 2020-04-27 19:28:32 +02:00
Mario Hüttel 9761204b08 Update shellmatta to newest version 2020-04-26 22:25:50 +02:00
Mario Hüttel 4df68880f0 Add correct handling of sd card, add reset command, add ls command 2020-04-26 21:23:25 +02:00
Mario Hüttel 6e07a363f4 Add settings module 2020-04-26 20:22:00 +02:00
Mario Hüttel cf3818040c Add support for subdirectories in create-c-file script 2020-04-26 20:20:57 +02:00
Mario Hüttel 2d3b61550b Fix ADC Watchdog handling 2020-04-26 19:53:06 +02:00
Mario Hüttel 85fe0f6749 Fix LEDs in ptdump command 2020-04-26 19:52:48 +02:00
Mario Hüttel 5ae31a1705 Increase ADC_PT1000_WATCHDOG_SAMPLE_COUNT to 50 2020-04-26 19:20:45 +02:00
Mario Hüttel ffe195d7b2 ADC Measurment: Introduce ADC_PT1000_WATCHDOG_SAMPLE_COUNT in order to filter out false Watchdog errors produces by EMI problems" 2020-04-26 18:09:39 +02:00
Mario Hüttel b9a38549dc Add stack_check_collision() function 2020-04-23 00:09:44 +02:00