Commit Graph

37 Commits

Author SHA1 Message Date
linuswck b8241d1f27 cargo fmt
- rustfmt.toml is ported from artiq-zynq repo
2024-04-23 17:09:26 +08:00
linuswck 7be35fe7f0 thermostat: Reduce DAC calibration time
- 13 out of 18 bit of DAC is used to calibrate the output with 12bit ADC
- Calibration with more than 13 bit does not improve the accuracy
2024-04-23 15:45:37 +08:00
linuswck 10873f4791 firmware: Load default pwr_on settings from flash 2024-04-10 16:57:43 +08:00
linuswck 4288d465c9 thermostat: Report temp_setpoint in degree celsius 2024-04-10 16:56:20 +08:00
linuswck 99cf17f7e4 temp_mon: Add support for constant current mode 2024-03-19 14:52:26 +08:00
linuswck 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
linuswck 92c6cf12d4 Add fns to apply ld, tec settings summary configs 2024-03-05 10:35:05 +08:00
linuswck ef2410f441 Add fns, struct items for getting ld, tec settings 2024-03-05 10:35:05 +08:00
linuswck adfa4f5fa3 Move TempAdcFilter struct def to Thermostat 2024-03-05 10:35:05 +08:00
linuswck 3aca712e1d Fix typos 2024-03-04 10:32:33 +08:00
linuswck 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
linuswck 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
linuswck a2bb390ae2 ad7172: Add filter configs for single channel mode 2024-02-28 12:23:09 +08:00
linuswck 18dd0a7963 Save Thermostat and Laser Diode PWR On/Off status 2024-02-28 12:22:40 +08:00
linuswck d1cc677668 thermostat: split poll_adc & update_pid into 2 fns 2024-02-28 12:21:37 +08:00
linuswck c09ccc29cd cmd: Add cmd to get all device settings 2024-02-23 12:45:29 +08:00
linuswck 6ee45b4814 thermostat: Limit Pid Temp SetPt to TempMon limits 2024-02-21 17:37:56 +08:00
linuswck 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
linuswck 5f83b73011 cmd: Add active report mode cmd 2024-02-19 15:08:00 +08:00
linuswck 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
linuswck e9a396f001 thermostat: Add abs timestamp to StatusReport 2024-02-15 12:14:14 +08:00
linuswck f22ab430b8 pid: Use IDSP impl of Pid, Add Eth Pid Ctrl Cmds 2024-02-07 11:56:38 +08:00
linuswck 4cd650367d thermostat: cleanup pid_engaged fn 2024-02-05 15:14:51 +08:00
linuswck 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
linuswck 172c3e1dfc cleanup boot.rs, thermostat.rs 2024-02-01 16:23:52 +08:00
linuswck 07ea733b34 thermostst: Patch hw related settings for rev0_3 2024-01-24 12:25:45 +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 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 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 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 c7d36bc8d5 Reorganize variables and fns structure 2024-01-10 10:38:00 +08:00
linuswck 6cc2bc32c5 thermostat:reorganize fns structure, add setup seq 2024-01-10 10:36:09 +08:00
linuswck 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
linuswck 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
linuswck 475fe28604 Initial Commit for AD5680 and MAX1968 Drivers
- GPIO Initializations for AD5680, MAX1968 drivers
- CTLI voltage of  MAX1968 can be set with AD5680
- All features of MAX1968 can be controlled
2023-12-20 12:08:48 +08:00