1
0
Fork 0
Commit Graph

48 Commits

Author SHA1 Message Date
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 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
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 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 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 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 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 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
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 0179e7641a Add MAX1968 Startup Sequence 2023-12-20 14:51:34 +08:00
linuswck f6767b147b Fix typo in MAX1968 driver power_down fn 2023-12-20 14:48:47 +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
topquark12 361c2ff316 add gpio setup 2022-10-21 12:05:55 +08:00