Ver 2.0.4 - IMU direct read/FIFO FSR 통일

- zephyr 포팅본에서 누락됨(주기 측정 시 direct read/FIFO 스케일)
- accel FSR = + 4g
= gyro FSR = ± 500dps
This commit is contained in:
2026-08-28 09:44:46 +09:00
parent f3c906a99d
commit f39778a8e8
3 changed files with 12 additions and 10 deletions
+6 -6
View File
@@ -394,12 +394,12 @@ int imu_read(int16_t accel[3], int16_t gyro[3])
uint8_t raw[12];
int ret;
// 자이로 설정: ±2000dps FSR, 100Hz ODR
ret = imu_write_reg(REG_GYRO_CONFIG0, 0x09);
// 자이로 설정: ±500dps FSR, 50Hz ODR
ret = imu_write_reg(REG_GYRO_CONFIG0, IMU_CFG_50HZ_500DPS);
if (ret) { DBG_PRINTF("[IMU] FAIL — gyro config write (ret=%d)\r\n", ret); return -1; }
// 가속도 설정: ±4g FSR, 100Hz ODR
ret = imu_write_reg(REG_ACCEL_CONFIG0, 0x29);
// 가속도 설정: ±4g FSR, 50Hz ODR
ret = imu_write_reg(REG_ACCEL_CONFIG0, IMU_CFG_50HZ_4G);
if (ret) { DBG_PRINTF("[IMU] FAIL — accel config write (ret=%d)\r\n", ret); return -1; }
ret = imu_set_data_big_endian();
@@ -447,10 +447,10 @@ int imu_read_with_temperature(int16_t accel[3], int16_t gyro[3], int16_t *temp_c
return -EINVAL;
}
ret = imu_write_reg(REG_GYRO_CONFIG0, 0x09);
ret = imu_write_reg(REG_GYRO_CONFIG0, IMU_CFG_50HZ_500DPS);
if (ret) { DBG_PRINTF("[IMU] FAIL — gyro config write (ret=%d)\r\n", ret); return -1; }
ret = imu_write_reg(REG_ACCEL_CONFIG0, 0x29);
ret = imu_write_reg(REG_ACCEL_CONFIG0, IMU_CFG_50HZ_4G);
if (ret) { DBG_PRINTF("[IMU] FAIL — accel config write (ret=%d)\r\n", ret); return -1; }
ret = imu_set_data_big_endian();
+2 -2
View File
@@ -28,8 +28,8 @@ int imu_init(void);
*
* 센서 설정 → 전원 ON → 80ms 대기 → 12바이트 읽기 → 전원 OFF
*
* @param accel 가속도 XYZ (int16, ±4g, 100Hz)
* @param gyro 자이로 XYZ (int16, ±2000dps, 100Hz)
* @param accel 가속도 XYZ (int16, ±4g, 50Hz)
* @param gyro 자이로 XYZ (int16, ±500dps, 50Hz)
* @return 0 성공, 음수 에러
*/
int imu_read(int16_t accel[3], int16_t gyro[3]);
+4 -2
View File
@@ -16,9 +16,9 @@
* Firmware identification : Default values, can be overridden by NVS
*============================================================================*/
#define HARDWARE_VERSION "VB0HW0000"
#define SERIAL_NUMBER "VBT260300ZZ"
#define SERIAL_NUMBER "VBT2608000Z"
#define DEFAULT_PASSKEY "123456"
#define FIRMWARE_VERSION "VBTFW0203"
#define FIRMWARE_VERSION "VBTFW0204"
/*
* Firmware Version History
@@ -26,6 +26,8 @@
* 2026-07-31 | VBTFW0200 | 2.0.0+0 | Initial release
* 2026-08-05 | VBTFW0201 | 2.0.1+0 | Added allowlist, fixed bond delete issue
* 2026-08-05 | VBTFW0202 | 2.0.2+0 | Added production command(mpd?)
* 2026-08-25 | VBTFW0203 | 2.0.3+0 | Fixed piezo power on/off timing, piezo sweep timing, and BLE settings
* 2026-08-28 | VBTFW0204 | 2.0.4+0 | Align IMU direct read(mbb?) FSR with FIFO scale
*/
/*==============================================================================