diff --git a/Core/Inc/sys_conf.h b/Core/Inc/sys_conf.h index ea70373..a963a2e 100644 --- a/Core/Inc/sys_conf.h +++ b/Core/Inc/sys_conf.h @@ -47,12 +47,12 @@ extern "C" { /** * @brief Verbose level for all trace logs */ -#define VERBOSE_LEVEL VLEVEL_L +#define VERBOSE_LEVEL VLEVEL_H /** * @brief Enable trace logs */ -#define APP_LOG_ENABLED 0 +#define APP_LOG_ENABLED 1 /** * @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) * @note by HW serial wires are ON by default, need to put them OFF to save power */ -#define DEBUGGER_ENABLED 0 +#define DEBUGGER_ENABLED 1 /** * @brief Disable Low Power mode diff --git a/Core/Src/main.c b/Core/Src/main.c index 6144b5b..ab5f232 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -116,40 +116,11 @@ int main(void) /* USER CODE BEGIN 2 */ - HAL_Delay(3000); - /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ -#if 0 - while(1) - { - HAL_GPIO_WritePin(SOAP_SWITCH_GPIO_Port, SOAP_SWITCH_Pin, GPIO_PIN_SET); - HAL_Delay(1000); - //uint8_t soapData = SOAP_DATA; - uint8_t soapData = HAL_GPIO_ReadPin(SOAP_STATUS_GPIO_Port,SOAP_STATUS_Pin); - uint8_t read2nd = 0; - APP_LOG(TS_OFF, VLEVEL_L, "\r\n Soap State = %d \r\n", soapData); - #if 0 - HAL_GPIO_WritePin(SOAP_SWITCH_GPIO_Port, SOAP_SWITCH_Pin, GPIO_PIN_RESET); - HAL_Delay(1000); - read2nd = HAL_GPIO_ReadPin(SOAP_STATUS_GPIO_Port,SOAP_STATUS_Pin); - - APP_LOG(TS_OFF, VLEVEL_L, "\r\n 2nd read after 1 seconds= %d \r\n", read2nd); - - HAL_Delay(1000); - - read2nd = HAL_GPIO_ReadPin(SOAP_STATUS_GPIO_Port,SOAP_STATUS_Pin); - - APP_LOG(TS_OFF, VLEVEL_L, "\r\n 3rd read after another 1 seconds= %d \r\n", read2nd); - #endif - HAL_Delay(20000); - - } -#endif - while (1) { diff --git a/Core/Src/sys_app.c b/Core/Src/sys_app.c index afd0327..96c128c 100644 --- a/Core/Src/sys_app.c +++ b/Core/Src/sys_app.c @@ -122,7 +122,7 @@ void SystemApp_Init(void) /*Init low power manager*/ UTIL_LPM_Init(); /* Disable Stand-by mode */ - UTIL_LPM_SetOffMode((1 << CFG_LPM_APPLI_Id), UTIL_LPM_DISABLE); + //UTIL_LPM_SetOffMode((1 << CFG_LPM_APPLI_Id), UTIL_LPM_DISABLE); #if defined (LOW_POWER_DISABLE) && (LOW_POWER_DISABLE == 1) /* Disable Stop Mode */ diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 13e7ddc..8eee93c 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -488,7 +488,7 @@ void LoRaWAN_Init(void) /* USER CODE END LoRaWAN_Init_LV */ /* USER CODE BEGIN LoRaWAN_Init_1 */ - APP_LOG(TS_OFF, VLEVEL_L, "\r\n\n\n##### YUNHORN_STS_FW:%d SWV%d HWV:%d MTM:%d.%d R:%d.%d.%d ####\r\n\n\n", + APP_LOG(TS_OFF, VLEVEL_H, "\r\n\n\n##### YUNHORN_STS_FW:%d SWV%d HWV:%d MTM:%d.%d R:%d.%d.%d ####\r\n\n\n", FirmwareVersion, sts_version, sts_hardware_ver, sts_mtmcode1,sts_mtmcode2, MajorVer, MinorVer, SubMinorVer); /* Get LoRaWAN APP version*/ @@ -808,7 +808,7 @@ static void SendTxData(void) //UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_YunhornSTSEventP6), CFG_SEQ_Prio_0); #if defined(YUNHORN_STS_R0_ENABLED)||defined(YUNHORN_STS_R5_ENABLED) - UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_YunhornSTSEventP4), CFG_SEQ_Prio_0); + // UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_YunhornSTSEventP4), CFG_SEQ_Prio_0); STS_R0_SENSOR_Read(&r0_data); //r0_data.battery_mV = batteryLevelmV; diff --git a/STM32CubeIDE/.cproject b/STM32CubeIDE/.cproject index 9b9699d..baedf70 100644 --- a/STM32CubeIDE/.cproject +++ b/STM32CubeIDE/.cproject @@ -26,7 +26,7 @@