1
0
forked from M-Labs/kirdy
Commit Graph

61 Commits

Author SHA1 Message Date
0d12c902fc pd_mon: Separate ld_power calculation to a file 2024-01-24 12:18:37 +08:00
3cfdee917a rename current_source -> ld_ctrl 2024-01-24 12:16:06 +08:00
5f582be143 rename ld_drive to laser_diode 2024-01-24 12:16:06 +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
e355e83d28 memory.x: Add comment on the reserved flash sector 2024-01-16 15:27:43 +08:00
285fc9b5d6 memory.x: Reserved Flash Sector 11 for Config 2024-01-15 17:44:44 +08:00
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
42cd55645c main: Add demo fns to use on-board flash 2024-01-15 17:21:48 +08:00
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
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
709eae8566 max5719: Slow down SPI clock
- setting it to 30MHz hang MCU core
2024-01-11 17:46:35 +08:00
d3e3451d37 Add README.md for flashing instructions 2024-01-11 17:17:38 +08:00
33ff0c3678 main: Add demo fns reading all hardware status 2024-01-11 17:17:38 +08:00
33d9cb45c4 ld_drive: Add soft current limit 2024-01-11 17:17:38 +08:00
8ae27725c6 Port PID Controller from thermostat firmware
- Add serde Cargo
2024-01-11 17:17:10 +08:00
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
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
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
59f2385ecf ld_drive: make settings private & add set & get fn 2024-01-10 10:38:05 +08:00
d4e074cbd4 ld_drive: rebase to the point that declare set_i 2024-01-10 10:38:05 +08:00
277796d2a4 boot: Add ld_drive boot sequence 2024-01-10 10:38:05 +08:00
be8bf0a8b6 ld_drive: add setup fn 2024-01-10 10:38:05 +08:00
b1123047c7 ld_drive: Add fns to get pd current & cal ld pwr 2024-01-10 10:38:05 +08:00
707fac0775 ld_drive: add a param for setting to cal pd pwr
- Conversion ratio between pd current and ld output power
2024-01-10 10:38:05 +08:00
a99dde8b38 current_source: add driver to read pd voltage 2024-01-10 10:38:05 +08:00
d1f7a20c15 ld_drive: Add fns to set ld output current 2024-01-10 10:38:05 +08:00
58a8b15c40 ld_drive: add unit type and hw related constant 2024-01-10 10:38:05 +08:00
590ba8171c Add high level ld_drive mod
- Use current_source driver to interface with the board
2024-01-10 10:38:05 +08:00
0807f66b3c Add digital gpio related fns to Current source
- power_up
- power_down
- ld_short_enable
- ld_short_disable
    - Rev0_2 has hardware connection bug for LD_EN net.
    - laser driver power will always be enabled
2024-01-10 10:38:05 +08:00
2953d4edde Rewrite current_source obj and add gpio init 2024-01-10 10:38:05 +08:00
f2c026ffdd Rewrite MAX5719 Driver into a separated file 2024-01-10 10:38:05 +08:00
c7d36bc8d5 Reorganize variables and fns structure 2024-01-10 10:38:00 +08:00
784fc03957 cargo: add miniconf 2024-01-10 10:36:13 +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
0179e7641a Add MAX1968 Startup Sequence 2023-12-20 14:51:34 +08:00
f6767b147b Fix typo in MAX1968 driver power_down fn 2023-12-20 14:48:47 +08:00
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