revised bat level with ER34615

This commit is contained in:
Yunhorn 2024-02-23 18:13:17 +08:00
parent fba4492fe3
commit 0a12838556
4 changed files with 10 additions and 9 deletions

View File

@ -47,12 +47,12 @@ extern "C" {
/** /**
* @brief Verbose level for all trace logs * @brief Verbose level for all trace logs
*/ */
#define VERBOSE_LEVEL VLEVEL_H #define VERBOSE_LEVEL VLEVEL_OFF
/** /**
* @brief Enable trace logs * @brief Enable trace logs
*/ */
#define APP_LOG_ENABLED 1 #define APP_LOG_ENABLED 0
/** /**
* @brief Activate monitoring (probes) of some internal RF signals for debug purpose * @brief Activate monitoring (probes) of some internal RF signals for debug purpose
@ -75,7 +75,7 @@ extern "C" {
* @brief Enable/Disable MCU Debugger pins (dbg serial wires) * @brief Enable/Disable MCU Debugger pins (dbg serial wires)
* @note by HW serial wires are ON by default, need to put them OFF to save power * @note by HW serial wires are ON by default, need to put them OFF to save power
*/ */
#define DEBUGGER_ENABLED 1 #define DEBUGGER_ENABLED 0
/** /**
* @brief Disable Low Power mode * @brief Disable Low Power mode

View File

@ -58,9 +58,9 @@
*/ */
#ifdef YUNHORN_STS_M7_ENABLED #ifdef YUNHORN_STS_M7_ENABLED
#define MajorVer 23U #define MajorVer 24U
#define MinorVer 12U #define MinorVer 02U
#define SubMinorVer 20U #define SubMinorVer 23U
#define FirmwareVersion 3U #define FirmwareVersion 3U
/* /*
#define YUNHORN_STS_M7_NVM_CFG_SIZE 3U #define YUNHORN_STS_M7_NVM_CFG_SIZE 3U
@ -133,7 +133,7 @@
#define BAT_ER14505_2P_4800MAH ((uint32_t) 3600) #define BAT_ER14505_2P_4800MAH ((uint32_t) 3600)
#define BAT_STS_BOARD_3V3 ((uint32_t) 3300) #define BAT_STS_BOARD_3V3 ((uint32_t) 3300)
#define VDD_BAT BAT_CR2450 #define VDD_BAT BAT_ER34615_19000AH
/* STM32WL55JC READ/WRITE FLASH ADDRESS AND SIZE /* STM32WL55JC READ/WRITE FLASH ADDRESS AND SIZE
* SECTION START ADDRESS SIZE * SECTION START ADDRESS SIZE

View File

@ -144,7 +144,8 @@ uint16_t SYS_GetBatteryLevel(void)
uint16_t batteryLevelmV = 0; uint16_t batteryLevelmV = 0;
uint32_t measuredLevel = 0; uint32_t measuredLevel = 0;
measuredLevel = ADC_ReadChannels(ADC_CHANNEL_VREFINT); //measuredLevel = ADC_ReadChannels(ADC_CHANNEL_VREFINT);
measuredLevel = ADC_ReadChannels(ADC_CHANNEL_VBAT);
if (measuredLevel == 0) if (measuredLevel == 0)
{ {

View File

@ -54,7 +54,7 @@ volatile uint8_t sts_ac_code[YUNHORN_STS_AC_CODE_SIZE]={0x0};
volatile uint8_t heart_beat_timer=0, sts_lorawan_joined=0; volatile uint8_t heart_beat_timer=0, sts_lorawan_joined=0;
volatile sts_cfg_nvm_t sts_cfg_nvm={sts_mtmcode1,sts_mtmcode2, sts_version, sts_hardware_ver, volatile sts_cfg_nvm_t sts_cfg_nvm={sts_mtmcode1,sts_mtmcode2, sts_version, sts_hardware_ver,
0x3C,'M', 0x60,'M', 0x04,0x00,0x00,0x20, 0x3C,'M', 0x60,'M', 0x04,0x00,0x00,0x20,
{0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}, {0x08,0x06,0x04,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
0x01,0x03,0x00,0x02, 0x01,0x03,0x00,0x02,
{0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF} {0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF}
}; };