1
0
forked from M-Labs/kirdy
Commit Graph

54 Commits

Author SHA1 Message Date
4288d465c9 thermostat: Report temp_setpoint in degree celsius 2024-04-10 16:56:20 +08:00
af68b0e90a Update rust, stm32-eth, hal, smoltcp versions 2024-03-25 15:43:12 +08:00
99cf17f7e4 temp_mon: Add support for constant current mode 2024-03-19 14:52:26 +08:00
0a01d299bc Fix wrong reporting of Thermostat Pwr_on status 2024-03-19 14:52:26 +08:00
0380c8d30b Unify naming and unit in firmware and driver
- mA, uA -> A
- K -> Degree Celsius
- tec -> thermostat
2024-03-18 15:55:05 +08:00
1480305c16 max1968: Fix ADC+DMA does not start converting bug 2024-03-15 17:12:42 +08:00
92c6cf12d4 Add fns to apply ld, tec settings summary configs 2024-03-05 10:35:05 +08:00
ef2410f441 Add fns, struct items for getting ld, tec settings 2024-03-05 10:35:05 +08:00
adfa4f5fa3 Move TempAdcFilter struct def to Thermostat 2024-03-05 10:35:05 +08:00
3aca712e1d Fix typos 2024-03-04 10:32:33 +08:00
f488786e1c Use DMA to read Tec_I & Tec_V
- Remove the single conversion polling time with DMA
2024-03-01 11:31:01 +08:00
76477065be Change f64 to f32 for SI Unit related computation
- Save computational time
- Improve the processing speed of TecSetI cmd
2024-02-28 12:59:58 +08:00
19341672a9 Correct SPI Clock Freq and Set them to Max
- Set the SPI frequency to maximum to reduce data transaction time
- SPI1 SCLK is divided from PCLK2
- SPI2, SPI2 SCLK are divided from PCLK1
2024-02-28 12:23:09 +08:00
a2bb390ae2 ad7172: Add filter configs for single channel mode 2024-02-28 12:23:09 +08:00
18dd0a7963 Save Thermostat and Laser Diode PWR On/Off status 2024-02-28 12:22:40 +08:00
d1cc677668 thermostat: split poll_adc & update_pid into 2 fns 2024-02-28 12:21:37 +08:00
c09ccc29cd cmd: Add cmd to get all device settings 2024-02-23 12:45:29 +08:00
6ee45b4814 thermostat: Limit Pid Temp SetPt to TempMon limits 2024-02-21 17:37:56 +08:00
a8787430b1 Add Temperature Monitor to Thermostat
- Issue an alarm when temperature goes out of user-defined operating range during Pid Controller startup
    or reading is outside of +-0.5 Degree from temperature set point after Pid Controller becomes stable
- If alarm is observed, power down laser and tec controller and disengage Pid Controller
- Add the corresponding cmd for configuring the temperature monitor
2024-02-21 17:32:11 +08:00
5f83b73011 cmd: Add active report mode cmd 2024-02-19 15:08:00 +08:00
ffa5f4e8ff pid: Use Thermostat's PID algo instead of IDSP
- Has lower steady state error upon testing with PID autotune
2024-02-15 12:14:14 +08:00
e9a396f001 thermostat: Add abs timestamp to StatusReport 2024-02-15 12:14:14 +08:00
f22ab430b8 pid: Use IDSP impl of Pid, Add Eth Pid Ctrl Cmds 2024-02-07 11:56:38 +08:00
4cd650367d thermostat: cleanup pid_engaged fn 2024-02-05 15:14:51 +08:00
6096711d2c eth: Poll and Handle Json based Ld ctrl cmd
- Upgrade to miniconf 9.0
- Only non report related laser diode ctrl command is implemented
2024-02-02 17:35:58 +08:00
172c3e1dfc cleanup boot.rs, thermostat.rs 2024-02-01 16:23:52 +08:00
9ae867cd88 max1968: rm redundant adc config 2024-01-26 16:56:55 +08:00
85b50bf824 Analog_Wdg: Finish Power Excursion Protection fns
- Verified to be working
2024-01-26 16:56:39 +08:00
07ea733b34 thermostst: Patch hw related settings for rev0_3 2024-01-24 12:25:45 +08:00
095fe8ea69 AD7172: Rm deprecated warning for Rev0_2 hw bug 2024-01-24 12:18:42 +08:00
a0b67cdb09 MAX1968: Patch DacVfb pinout for rev0_3 2024-01-24 12:18:42 +08:00
381f25f036 AD7172: correct wrong NSS pinout definition 2024-01-24 12:18:42 +08:00
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
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
ff3d9b790a thermostat: pid_state rename variables 2024-01-24 12:16:06 +08:00
bc7bf9a6e7 rename channel_state -> pid_state 2024-01-24 12:16:02 +08:00
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
d0f226ce03 Thermostat: Add default to ChannelState 2024-01-24 12:16:02 +08:00
f49fd08c69 ad7172: impl default for ch_calibration 2024-01-24 12:16:02 +08:00
ccaf728c75 thermostat: Add channel_state mod for PID Control 2024-01-24 12:15:57 +08:00
3ac287ace2 steinhart_hart: Add Steinhart-Hart eq fns
- Port from thermostat firmware
2024-01-17 12:20:34 +08:00
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
af8d361b95 AD7172: Add AD7172 drivers fns
- Port from Thermostat Firmware
2024-01-16 16:19:01 +08:00
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
e48f1979f0 Clean up warnings 2024-01-10 10:38:05 +08:00
c7d36bc8d5 Reorganize variables and fns structure 2024-01-10 10:38:00 +08:00
6cc2bc32c5 thermostat:reorganize fns structure, add setup seq 2024-01-10 10:36:09 +08:00
23ee568ea7 Port TEC DAC calibration procedure from Thermostat
- Needs clean up
- To be evaluated and rethink the calibration procedure
2024-01-10 10:36:05 +08:00
d3f3608136 DacVFb is changed to PC3 for rev0_2 prototype
- This requires a circuit change to connect it to the PoE_PWR_SRC
    through a 1.6k Ohm and 100nF LPF
2023-12-21 16:39:09 +08:00
4cf7b7fdf9 Rewrite MAX1968 Driver Generically
- Set variable to proper types(Rate, ElectricalPotential, etc)
- Declare const MAX_I_POS, MAX_I_NEG, MAX_V conversion
2023-12-21 13:13:06 +08:00