From ce7a38acdae49181b7b64745e09b08915fc22a13 Mon Sep 17 00:00:00 2001 From: zhji Date: Fri, 10 Oct 2025 11:57:48 +0800 Subject: [PATCH] [feat] modify lamp&heat&dac to 4Hz --- ate/src/config.h | 2 +- ate/src/heat.c | 2 +- ate/src/ltc2640.c | 12 ++---------- ate/src/ltc2640.h | 1 + 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/ate/src/config.h b/ate/src/config.h index 1436abe..b3c3297 100755 --- a/ate/src/config.h +++ b/ate/src/config.h @@ -5,7 +5,7 @@ extern "C" { #endif -#define LEDIR_FREQ (8) +#define LEDIR_FREQ (4) #define SAMPLES_PER_PERIOD (64) #ifdef __cplusplus diff --git a/ate/src/heat.c b/ate/src/heat.c index 79c28ea..4471872 100755 --- a/ate/src/heat.c +++ b/ate/src/heat.c @@ -36,7 +36,7 @@ void heat_loop(void) { static uint32_t ms = 0; - if (system_tick_cnt < (ms + 62)) { + if (system_tick_cnt < (ms + 125)) { return; } ms = system_tick_cnt; diff --git a/ate/src/ltc2640.c b/ate/src/ltc2640.c index 5eb6540..f2d9cdb 100755 --- a/ate/src/ltc2640.c +++ b/ate/src/ltc2640.c @@ -7,15 +7,7 @@ uint8_t data_ltc2640_output[LTC2640_OUTPUT_LEN]; uint16_t data_ltc2640[] = { - VOLTAGE_200MV, - VOLTAGE_300MV, - VOLTAGE_400MV, - VOLTAGE_1000MV, - VOLTAGE_1200MV, - VOLTAGE_1500MV, - VOLTAGE_1800MV, - VOLTAGE_2000MV, - VOLTAGE_2400MV, + VOLTAGE_500MV, VOLTAGE_2500MV, }; @@ -98,7 +90,7 @@ void ltc2640_loop(void) static uint32_t ms = 0; static uint32_t cnt = 0; - if (system_tick_cnt < (ms + 100)) { + if (system_tick_cnt < (ms + 125)) { return; } GPIO_SetBits(GPIOA, LTC2640_PIN_CS); diff --git a/ate/src/ltc2640.h b/ate/src/ltc2640.h index f347bf5..ad27773 100755 --- a/ate/src/ltc2640.h +++ b/ate/src/ltc2640.h @@ -17,6 +17,7 @@ #define VOLTAGE_200MV (328) #define VOLTAGE_300MV (492) #define VOLTAGE_400MV (655) +#define VOLTAGE_500MV (819) #define VOLTAGE_1000MV (1638) #define VOLTAGE_1200MV (1966) #define VOLTAGE_1500MV (2458)