Commit Graph

80 Commits

Author SHA1 Message Date
linuswck f6677d874c LD: Rst LD current at power_up for soft start 2024-01-26 16:56:55 +08:00
linuswck d391e3a1fb LD: Setting LD output current now ramps up slowly 2024-01-26 16:56:55 +08:00
linuswck edd30e94a0 laser_diode: Add fn to set pd_dark_i 2024-01-26 16:56:55 +08:00
linuswck ad731c2f15 rename pd_mon -> pd_responsitivity 2024-01-26 16:56:55 +08:00
linuswck 9d8a553669 pd_mon: add fns to convert between pwr and current 2024-01-26 16:56:55 +08:00
linuswck e22f424531 rm unused cargo config target definition 2024-01-26 16:56:55 +08:00
linuswck 6af0f992d5 LdPwrExcProtector: Cleanup 2024-01-26 16:56:55 +08:00
linuswck f50505feaf Rename Analog_Wdg -> LdPwrExcProtector 2024-01-26 16:56:55 +08:00
linuswck 9ae867cd88 max1968: rm redundant adc config 2024-01-26 16:56:55 +08:00
linuswck 85b50bf824 Analog_Wdg: Finish Power Excursion Protection fns
- Verified to be working
2024-01-26 16:56:39 +08:00
linuswck 07ea733b34 thermostst: Patch hw related settings for rev0_3 2024-01-24 12:25:45 +08:00
linuswck 5bea3f0e5f boot: init analog wdg & power up laser after cfg
- Verified to be boot-able on Rev0_3 board
2024-01-24 12:19:07 +08:00
linuswck af283b17ac laser_diode: use analog wdg fns 2024-01-24 12:18:42 +08:00
linuswck c3022e9db1 Analog_Wdg: Add GPIO init 2024-01-24 12:18:42 +08:00
linuswck c02181c80c laser diode: Add Analog Watchdog initial commit
- rm pid_state for laser diode
2024-01-24 12:18:42 +08:00
linuswck 095fe8ea69 AD7172: Rm deprecated warning for Rev0_2 hw bug 2024-01-24 12:18:42 +08:00
linuswck a0b67cdb09 MAX1968: Patch DacVfb pinout for rev0_3 2024-01-24 12:18:42 +08:00
linuswck 381f25f036 AD7172: correct wrong NSS pinout definition 2024-01-24 12:18:42 +08:00
linuswck c768bdc93a Thermostat: Add fn to calibrate ADC's VDDA
- ADC1 exclusive feature
- Calibrated VDDA val can be passed to other ADCs to adjust gain error
2024-01-24 12:18:42 +08:00
linuswck 0d12c902fc pd_mon: Separate ld_power calculation to a file 2024-01-24 12:18:37 +08:00
linuswck 3cfdee917a rename current_source -> ld_ctrl 2024-01-24 12:16:06 +08:00
linuswck 5f582be143 rename ld_drive to laser_diode 2024-01-24 12:16:06 +08:00
linuswck 2f7ca2a706 Thermostat: Add fns to report status & settings
- Report all system status, PID Settings, NTC parameter, TEC Settings
2024-01-24 12:16:06 +08:00
linuswck ff3d9b790a thermostat: pid_state rename variables 2024-01-24 12:16:06 +08:00
linuswck bc7bf9a6e7 rename channel_state -> pid_state 2024-01-24 12:16:02 +08:00
linuswck ca110962f7 Thermostat: Add pid_ctrl parms & its related fns
- setup: include the pid_ctrl
- poll_adc: Fetch Temperature and Update PID to set the current output
2024-01-24 12:16:02 +08:00
linuswck d0f226ce03 Thermostat: Add default to ChannelState 2024-01-24 12:16:02 +08:00
linuswck f49fd08c69 ad7172: impl default for ch_calibration 2024-01-24 12:16:02 +08:00
linuswck ccaf728c75 thermostat: Add channel_state mod for PID Control 2024-01-24 12:15:57 +08:00
linuswck 3ac287ace2 steinhart_hart: Add Steinhart-Hart eq fns
- Port from thermostat firmware
2024-01-17 12:20:34 +08:00
linuswck cdf900a5b6 gpio: Add AD7172 phy gpio init
- Will not function on rev0_2 kirdy due to wrong hardware connection
2024-01-16 17:36:16 +08:00
linuswck af8d361b95 AD7172: Add AD7172 drivers fns
- Port from Thermostat Firmware
2024-01-16 16:19:01 +08:00
linuswck e355e83d28 memory.x: Add comment on the reserved flash sector 2024-01-16 15:27:43 +08:00
linuswck 285fc9b5d6 memory.x: Reserved Flash Sector 11 for Config 2024-01-15 17:44:44 +08:00
linuswck 8c612fc0c9 memory.x: RM CONFIG MEMORY area in linker script
- STM32f407 does not have second bank or flash/ Sector 12 unlike F427
2024-01-15 17:43:17 +08:00
linuswck 42cd55645c main: Add demo fns to use on-board flash 2024-01-15 17:21:48 +08:00
linuswck d190b8b192 flash: Add init boot seq
- Max flash erase time for PSize = 8 and 128KiB Sector is 4s
- Watchdog period is changed accordingly
2024-01-15 17:21:06 +08:00
linuswck 74325a3cee flash: Add fns to store data in flash
- Writing to the wrong flash sector can cause MCU to stall
- Only 16KiB out of 128KiB in the sector is used to save RAM for compacting
2024-01-15 17:14:58 +08:00
linuswck 709eae8566 max5719: Slow down SPI clock
- setting it to 30MHz hang MCU core
2024-01-11 17:46:35 +08:00
linuswck d3e3451d37 Add README.md for flashing instructions 2024-01-11 17:17:38 +08:00
linuswck 33ff0c3678 main: Add demo fns reading all hardware status 2024-01-11 17:17:38 +08:00
linuswck 33d9cb45c4 ld_drive: Add soft current limit 2024-01-11 17:17:38 +08:00
linuswck 8ae27725c6 Port PID Controller from thermostat firmware
- Add serde Cargo
2024-01-11 17:17:10 +08:00
linuswck 20fc6d6fac rm photodiode folder and its mod.rs
- photodiode related fns are written inside laser diode folder
- as they are closely related
2024-01-10 17:51:27 +08:00
linuswck 654964831a boot: Change thermostat boot seq for new setup seq
- Power Up -> Calibrate -> Set the TEC current to some value
2024-01-10 10:38:05 +08:00
linuswck 27c7b5929e thermostat: change setup seq
- default power off
- with all params set to default val on hw
- rm calibration from setup
2024-01-10 10:38:05 +08:00
linuswck e48f1979f0 Clean up warnings 2024-01-10 10:38:05 +08:00
linuswck 59f2385ecf ld_drive: make settings private & add set & get fn 2024-01-10 10:38:05 +08:00
linuswck d4e074cbd4 ld_drive: rebase to the point that declare set_i 2024-01-10 10:38:05 +08:00
linuswck 277796d2a4 boot: Add ld_drive boot sequence 2024-01-10 10:38:05 +08:00