Compare commits
4 Commits
1a4dec297b
...
ca9d3e1a03
| Author | SHA1 | Date | |
|---|---|---|---|
| ca9d3e1a03 | |||
| 8ae8f3fdb7 | |||
| 0a88cfb01c | |||
| 3c528b4c35 |
@@ -5,6 +5,8 @@
|
|||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
# Debug Message (RTT)
|
# Debug Message (RTT)
|
||||||
|
# Build-time switch for project DBG_PRINTF/DBG_CORE/DBG_ERR macros.
|
||||||
|
CONFIG_VESIS_DEBUG_PRINT=n
|
||||||
# Zephyr logging subsystem enable.
|
# Zephyr logging subsystem enable.
|
||||||
CONFIG_LOG=y
|
CONFIG_LOG=y
|
||||||
# Print logs immediately when log API is called.
|
# Print logs immediately when log API is called.
|
||||||
@@ -151,7 +153,7 @@ CONFIG_MCUMGR=y
|
|||||||
# Enable mcumgr/SMP messages over BLE SMP service.
|
# Enable mcumgr/SMP messages over BLE SMP service.
|
||||||
CONFIG_MCUMGR_TRANSPORT_BT=y
|
CONFIG_MCUMGR_TRANSPORT_BT=y
|
||||||
# Require authenticated BLE connection for mcumgr read/write operations.
|
# Require authenticated BLE connection for mcumgr read/write operations.
|
||||||
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW_AUTHEN=n
|
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW_AUTHEN=y
|
||||||
# Reassemble SMP packets fragmented over BLE.
|
# Reassemble SMP packets fragmented over BLE.
|
||||||
CONFIG_MCUMGR_TRANSPORT_BT_REASSEMBLY=y
|
CONFIG_MCUMGR_TRANSPORT_BT_REASSEMBLY=y
|
||||||
# mcumgr transport receive buffer size for DFU image chunks.
|
# mcumgr transport receive buffer size for DFU image chunks.
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ static int ble_request_preferred_conn_params(bool count_attempt)
|
|||||||
err = bt_conn_get_info(current_conn, &info);
|
err = bt_conn_get_info(current_conn, &info);
|
||||||
if ((err == 0) && (info.type == BT_CONN_TYPE_LE))
|
if ((err == 0) && (info.type == BT_CONN_TYPE_LE))
|
||||||
{
|
{
|
||||||
uint16_t cur_interval = info.le.interval;
|
uint16_t cur_interval = (uint16_t)(info.le.interval_us / 1250U);
|
||||||
uint16_t cur_latency = info.le.latency;
|
uint16_t cur_latency = info.le.latency;
|
||||||
uint16_t cur_timeout = info.le.timeout;
|
uint16_t cur_timeout = info.le.timeout;
|
||||||
|
|
||||||
|
|||||||
@@ -687,7 +687,6 @@ int imu_fifo_read_latest(uint8_t *sample_bytes,
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
uint16_t raw_count = record_count;
|
|
||||||
record_count = imu_fifo_compact_records(record_count);
|
record_count = imu_fifo_compact_records(record_count);
|
||||||
DBG_PRINTF("[IMU FIFO] compact %u -> %u\r\n", raw_count, record_count);
|
DBG_PRINTF("[IMU FIFO] compact %u -> %u\r\n", raw_count, record_count);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -113,6 +113,7 @@ static struct mgmt_callback dfu_status_callback = {
|
|||||||
.callback = dfu_status_cb,
|
.callback = dfu_status_cb,
|
||||||
.event_id = MGMT_EVT_OP_IMG_MGMT_DFU_STARTED |
|
.event_id = MGMT_EVT_OP_IMG_MGMT_DFU_STARTED |
|
||||||
MGMT_EVT_OP_IMG_MGMT_DFU_CHUNK |
|
MGMT_EVT_OP_IMG_MGMT_DFU_CHUNK |
|
||||||
|
MGMT_EVT_OP_IMG_MGMT_DFU_CHUNK_WRITE_COMPLETE |
|
||||||
MGMT_EVT_OP_IMG_MGMT_DFU_PENDING |
|
MGMT_EVT_OP_IMG_MGMT_DFU_PENDING |
|
||||||
MGMT_EVT_OP_IMG_MGMT_DFU_STOPPED,
|
MGMT_EVT_OP_IMG_MGMT_DFU_STOPPED,
|
||||||
};
|
};
|
||||||
@@ -553,7 +554,7 @@ static void dfu_watchdog_handler(struct k_work *work)
|
|||||||
|
|
||||||
if (ble_is_connected())
|
if (ble_is_connected())
|
||||||
{
|
{
|
||||||
DBG_PRINTF("[DFU] upload stalled (%ds), forcing disconnect\r\n", DFU_STALL_TIMEOUT_SEC);
|
DBG_CORE("[DFU] upload stalled (%ds), forcing disconnect\r\n", DFU_STALL_TIMEOUT_SEC);
|
||||||
(void)ble_disconnect_active();
|
(void)ble_disconnect_active();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -571,9 +572,10 @@ static enum mgmt_cb_return dfu_status_cb(uint32_t event, enum mgmt_cb_return pre
|
|||||||
{
|
{
|
||||||
case MGMT_EVT_OP_IMG_MGMT_DFU_STARTED:
|
case MGMT_EVT_OP_IMG_MGMT_DFU_STARTED:
|
||||||
case MGMT_EVT_OP_IMG_MGMT_DFU_CHUNK:
|
case MGMT_EVT_OP_IMG_MGMT_DFU_CHUNK:
|
||||||
|
case MGMT_EVT_OP_IMG_MGMT_DFU_CHUNK_WRITE_COMPLETE:
|
||||||
dfu_led_active = true;
|
dfu_led_active = true;
|
||||||
led_ble_solid(); // DFU 업로드 중에는 초록 LED ON
|
led_ble_solid(); // DFU 업로드 중에는 초록 LED ON
|
||||||
// 청크가 올 때마다 무진행 감시 타이머 리셋
|
// 청크 수신/flash write 완료 때마다 무진행 감시 타이머 리셋
|
||||||
k_work_reschedule(&dfu_watchdog_work, K_SECONDS(DFU_STALL_TIMEOUT_SEC));
|
k_work_reschedule(&dfu_watchdog_work, K_SECONDS(DFU_STALL_TIMEOUT_SEC));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -199,10 +199,9 @@ int piezo_measure_sweep(void)
|
|||||||
uint16_t samples = cfg->samples;
|
uint16_t samples = cfg->samples;
|
||||||
uint8_t avg = cfg->avg;
|
uint8_t avg = cfg->avg;
|
||||||
|
|
||||||
// 너무 짧은 delay가 들어오면 burst 직후 ADC capture가 겹치므로 최소 delay 보장
|
if (capture_delay_us < 0)
|
||||||
if (capture_delay_us < PIEZO_BURST_TO_ADC_DELAY_US)
|
|
||||||
{
|
{
|
||||||
capture_delay_us = PIEZO_BURST_TO_ADC_DELAY_US;
|
capture_delay_us = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINTF("[SWEEP] freq=0x%04X cycles=%u avg=%u delay_us=%u samples=%u\r\n", cfg->freq, cfg->cycles, cfg->avg, cfg->delay_us, cfg->samples);
|
DBG_PRINTF("[SWEEP] freq=0x%04X cycles=%u avg=%u delay_us=%u samples=%u\r\n", cfg->freq, cfg->cycles, cfg->avg, cfg->delay_us, cfg->samples);
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
CONFIG_GPIO_HOGS=y
|
CONFIG_GPIO_HOGS=y
|
||||||
|
|
||||||
# MCUboot RTT logging(test)
|
# Keep MCUboot LOG enabled to satisfy MCUboot default Kconfig choices,
|
||||||
CONFIG_LOG=n
|
# but disable console/log output backends.
|
||||||
CONFIG_LOG_MODE_IMMEDIATE=y
|
CONFIG_LOG=y
|
||||||
CONFIG_LOG_DEFAULT_LEVEL=3
|
CONFIG_LOG_DEFAULT_LEVEL=0
|
||||||
CONFIG_MCUBOOT_LOG_LEVEL_DBG=y
|
CONFIG_MCUBOOT_LOG_LEVEL_OFF=y
|
||||||
|
|
||||||
CONFIG_PRINTK=n
|
|
||||||
CONFIG_USE_SEGGER_RTT=y
|
CONFIG_USE_SEGGER_RTT=y
|
||||||
CONFIG_CONSOLE=n
|
CONFIG_CONSOLE=n
|
||||||
CONFIG_RTT_CONSOLE=n
|
CONFIG_RTT_CONSOLE=n
|
||||||
@@ -15,3 +14,7 @@ CONFIG_LOG_BACKEND_SHOW_COLOR=n
|
|||||||
|
|
||||||
CONFIG_LOG_BACKEND_UART=n
|
CONFIG_LOG_BACKEND_UART=n
|
||||||
CONFIG_UART_CONSOLE=n
|
CONFIG_UART_CONSOLE=n
|
||||||
|
|
||||||
|
# security boot
|
||||||
|
CONFIG_REBOOT=y
|
||||||
|
CONFIG_DISABLE_FLASH_PATCH=y
|
||||||
|
|||||||
Reference in New Issue
Block a user