设置喂狗时间为1S,并添加M3指令为复位指令,但是可能无效。修改了数据获取方式,从一直持续获取改为每次申请获取。

This commit is contained in:
2024-12-27 00:09:53 +08:00
parent 9a07dba591
commit 4d98e4dc30
6 changed files with 47 additions and 25 deletions

View File

@@ -28,7 +28,7 @@
/******************************************************************************/
#define I2C_TIME_OUT (uint16_t)(10000)
#define I2C_TIME_OUT (uint16_t)(5000)
#define I2C_OK 1
#define I2C_FAIL 0
#define I2C_END 1

View File

@@ -43,12 +43,13 @@
/******************************************************************************/
#define LDC1612_CONVERSION_TIME_CH0 0X0546 //0536
#define LDC1612_DRIVE_CURRENT 0X9000 //A000
#define LDC1612_MUX_CONFIG 0X020C // no auto scan and filter bandwidth 3.3MHz
#define LDC1612_SENSOR_CONFIG 0X1601
#define LDC1612_CONVERSION_TIME_CH0 0x0546 //0536
#define LDC1612_DRIVE_CURRENT 0x9000 //A000
#define LDC1612_MUX_CONFIG 0x020C // no auto scan and filter bandwidth 3.3MHz
#define LDC1612_SENSOR_CONFIG 0x1601
#define LDC1612_ERROR_CONFIG 0x0000
#define LC_STABILIZE_TIME_CH0 0X001E //30
#define LC_STABILIZE_TIME_CH0 0x001E //30
#define LDC1612_RESET_DEV 0x8000 //[15:0] 0b1000 0000 0000 0000
/******************************************************************************/

View File

@@ -39,4 +39,6 @@ OF SUCH DAMAGE.
void watchdog_init(void);
void reset_mcu(void);
#endif /* MAIN_H */

View File

@@ -13,6 +13,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include "i2c.h"
#include "ldc1612.h"
#include "tmp112.h"
/******************************************************************************/