Commit Graph

213 Commits

Author SHA1 Message Date
749f19b105 ld_current_out_ctrl_timer: lower current ramp rate
- Ld current ramp now updates in 250Hz (< 500Hz IIR filter cutoff
    frequency) for pwr_exc_protector
2025-01-28 16:38:51 +08:00
bd83a8fc92 LdPwrExcProtector: Use IIR filter for OPP logic
- Do not use the built-in analog watchdog
- IIR Filter limits ADC noise to be below 1 LSB
- Fix false positive error for the overpower protection due to ADC noise
2025-01-28 16:38:38 +08:00
c1855f6a08 pd_mon: Add iir filter to voltage readings
- analog wdg behaviour is unchanged
2025-01-27 12:44:27 +08:00
5909ead681 max1968: Add IIR filter to Tec Readings 2025-01-27 12:43:58 +08:00
6db375d6b8 Fix incorrect Adc filter settings name 2025-01-27 12:43:58 +08:00
b3a9f61648 cmd_handler: add warning msgs for cmd with val clamped 2025-01-24 18:32:33 +08:00
e1ee3ec959 firmware: clamp input against invalid value 2025-01-24 18:32:27 +08:00
7f9dc37c10 cmd_handler: Add msg to InvalidCmd Response 2025-01-24 16:59:49 +08:00
c2806aee27 cmd_handler: Add new cmd to for commit hash 2025-01-24 16:59:49 +08:00
227d9d4877 laser: Short LD terminals when ld pwr is off 2025-01-24 16:59:49 +08:00
cd3347798c driver, firmware: Rm active report mode & cmd 2025-01-21 11:31:02 +08:00
85f81ee8e4 Change default tcp port 1337 -> 1550 2025-01-09 16:38:02 +08:00
388e6725ef thermostat: Clear alarm when settings are loaded 2024-10-17 17:36:17 +08:00
f4c761c5ca pid: Scale PID Parameters with Sampling Rate
- Breaking changes
2024-10-17 17:36:06 +08:00
e560d8f1eb thermostat, gui: Set max v range according to datasheet 2024-10-16 16:21:11 +08:00
0437c6e76e thermostat, gui: Relax the max settable TEC Current Limit
- Improper settings can cause PoE power failure and over heating
- See hardware repo Issue #51
2024-10-16 16:14:58 +08:00
51b82e0447 cmd_handler: Add cmd to get temp adc polling interval 2024-10-10 13:41:15 +08:00
31e108a4b5 thermostat: settings obj now contains the exact filter type and val 2024-10-10 13:39:37 +08:00
253f4410ee sys_timer: Add fn to retrieve ts in us resolution 2024-10-10 13:31:20 +08:00
bd72c382b0 thermostat: Fix incorrect Dac Calibration Algo
- Thermostat Firmware repo PR #133
2024-10-08 15:57:18 +08:00
a512614de5 net: add option not to open sock when it is polled
- fix a bug, which mcu can get stuck in State::HardReset indefinitely
2024-09-11 17:54:23 +08:00
0aeffdbf7b ld_pwr_exc_protector: disable irq after pwr off
-setting 0V threshold during power off might trigger IRQ
2024-09-11 17:05:38 +08:00
86e6d3764e laser: check pd_mon params & pwr limit before set
- Design to prevent Issue #47 on hardware kirdy repo from happening
- responsitivity, i_dark & transconductance determine the pwr limit range
- when "ApplyPdParams" and "SetLdPwrLimit" are called, pwr limit range
    is checked before applying new parameter
- Send out a "InvalidSettings" response with error message if settings
    cannot be applied
- Add settable power range to settings json object
2024-09-11 17:05:34 +08:00
1896e2534b main: Add PrepareForDfu state 2024-09-04 16:12:06 +08:00
0b5fda2cd9 net: close oldest sock if available socks run out
- By default, smoltcp by default reset any new connections
    if there is no available socket
2024-09-04 15:46:43 +08:00
b763350a8b net: disable IRQ when data is being enqueued
- This prevents broken json to be sent out due to IRQ
2024-09-04 15:46:43 +08:00
c5826876a6 firmware: Add cmd to get hw_rev 2024-09-04 15:39:27 +08:00
9c611fc861 main: poll iface for dfu & hard rst ctrl msgs 2024-09-03 12:15:03 +08:00
51913f2e2f net: fix incorrect poll_iface() calls
- poll_iface might be called by interrupt while poll_iface was being called in main loop
- Disable interrupt when poll_iface is being processed
- Only use IfacePollTimer to poll_iface
2024-08-27 18:49:43 +08:00
3ba8b99084 Use degree celsius as temperature base unit
- Breaking: Erase settings before flashing
- except beta in Steinhart-Hart equation
- to keep the temperature value set consistent with the value returned
- f32 floating point calculation is inaccurate
2024-08-07 17:36:12 +08:00
c214e4182d temp_mon: fix limits not effective at stable temp
- previously, temp is stable, temp limits are not checked
2024-08-07 12:12:07 +08:00
fb69ae3306 main: Don't change temp ctrl mode at otp 2024-08-07 11:26:47 +08:00
3f9a4bf140 ld: Block pwr on request if alarm is asserted
- Align the alarm and pwr up behavior with thermostat temp_mon
2024-07-26 14:29:46 +08:00
201148fb21 main: allow loading flash without device settings
- Fix bugs: ld & thermostat settings cannot be loaded if device settings
    are not present. But, device settings can be left not configured.
2024-07-26 11:10:32 +08:00
a90031dd6c ld_pwr_exc_protector: clear irq bit at pwr up 2024-07-26 11:10:32 +08:00
7b52072617 ld: cfg hardware when pd_mon params changes 2024-07-26 11:10:32 +08:00
20c3d42dd7 rm ld soft current limit 2024-07-25 15:53:00 +08:00
a76b8de994 thermostat: Save the user config-ed value directly
- the firmware recorded the actual value set with quantization errors or
    other errors
- this caused confusion for the user when they read back the settings
2024-07-22 17:37:25 +08:00
3410a271fd thermostat: rst pid_state at pwr_up 2024-07-22 10:54:01 +08:00
8f38acd0f2 thermostat: do not rst tec_i_out to 0 at pwr down 2024-07-22 10:52:32 +08:00
ec5bf1d6b6 gui, ld: term_status -> term_50ohm
- term_status (Is50Ohm / Not50Ohm) -> term_50ohm (On/Off)
2024-07-19 18:10:38 +08:00
4cd328d98c ld: apply pwr limit setting to analog watchdog
- This fixes a bug which power limit is not applied to pd_mon at startup
2024-07-19 18:10:38 +08:00
af95de0f16 thermostat: cal gain error at TEC DAC output 2024-07-19 18:10:12 +08:00
80d94270a2 fix typo 2024-06-18 15:43:36 +08:00
dc97f42bd0 boot: Do not pwr up LD & TEC at boot stage
- This fix LD current spike at boot up
2024-06-17 13:16:52 +08:00
83a764889c ld_pwr_exc_protector: set smpr to be slowest
- reduce noise on the analog watchdog
2024-06-17 13:16:52 +08:00
c09da0db98 ld_pwr_exc_protector: Apply 32-pt avg to pd_v
- Reduce noise amplitude from STM32f4 ADC
2024-06-17 13:16:52 +08:00
d5a620c76b pd_mon: make transconductance user-configurable
- hw change: different boards now have different gain settings in order
    to set a pd current range close to the ld being used
- transconductance and fin_gain params are added to flash with "Device"
    as key
2024-06-17 13:16:48 +08:00
d1660c6090 ld_pwr_exc_protector: cal volt offset for pd mon
- hw change: A voltage offset is added onto the pd mon pin
2024-06-13 15:43:44 +08:00
0dceb8c3c6 correct typo 2024-05-10 12:27:34 +08:00