From f5e54269a174ce7110ca3e7ded10e3e4f0cdba4c Mon Sep 17 00:00:00 2001 From: jhchun Date: Tue, 19 May 2026 14:05:33 +0900 Subject: [PATCH] =?UTF-8?q?MUX=20=EC=B1=84=EB=84=90=20=EC=84=A0=ED=83=9D?= =?UTF-8?q?=20=EC=9D=B4=ED=9B=84=20=EB=85=B8=EC=9D=B4=EC=A6=88=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=EB=A5=BC=20=EC=9C=84=ED=95=9C=20dummy=20burst=20?= =?UTF-8?q?=ED=9A=9F=EC=88=98=20=EB=A7=A4=ED=81=AC=EB=A1=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 6 → 5회 - 실제 측정 시 4회까지 노이즈 발견되었음 --- .../measurement/adc121s051/dr_adc121s051.c | 4 ++-- .../measurement/adc121s051/dr_adc121s051.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/project/ble_peripheral/ble_app_bladder_patch/measurement/adc121s051/dr_adc121s051.c b/project/ble_peripheral/ble_app_bladder_patch/measurement/adc121s051/dr_adc121s051.c index 9c32c54..11ced3c 100644 --- a/project/ble_peripheral/ble_app_bladder_patch/measurement/adc121s051/dr_adc121s051.c +++ b/project/ble_peripheral/ble_app_bladder_patch/measurement/adc121s051/dr_adc121s051.c @@ -1348,8 +1348,8 @@ dr_adc_err_t maa_async_start(uint8_t freq_option, uint16_t delay_us, uint16_t nu /* capture all channels without BLE TX, then start transmission */ g_maa_ctx.state = MAA_ASYNC_CAPTURING; - /* Warm up CH0 6 times and discard the results before the real capture starts. */ - for (uint8_t warmup = 0; warmup < 6; warmup++) + /* Warm up CH0 before real capture (MAA_ASYNC_WARMUP_COUNT). */ + for (uint8_t warmup = 0; warmup < MAA_ASYNC_WARMUP_COUNT; warmup++) { err = dr_adc_capture_channel_only( g_maa_ctx.freq_option, diff --git a/project/ble_peripheral/ble_app_bladder_patch/measurement/adc121s051/dr_adc121s051.h b/project/ble_peripheral/ble_app_bladder_patch/measurement/adc121s051/dr_adc121s051.h index fd09eea..ef31687 100644 --- a/project/ble_peripheral/ble_app_bladder_patch/measurement/adc121s051/dr_adc121s051.h +++ b/project/ble_peripheral/ble_app_bladder_patch/measurement/adc121s051/dr_adc121s051.h @@ -326,6 +326,11 @@ void dr_piezo_select_channel(uint8_t channel); #define MAA_NUM_CHANNELS 6 /* 4 -> 8 -> 6 jhChun 26.03.17*/ #define MAA_SAMPLES_MAX 200 +/* CH0 warm-up captures before maa/mbb/mtb (each costs ~1 MUX settle + burst + ADC). */ +#ifndef MAA_ASYNC_WARMUP_COUNT +#define MAA_ASYNC_WARMUP_COUNT 5U +#endif + /** * @brief Echo data for one channel */