From 83b4a0aeda66ea6090b0d7491aef0daeedf9efc6 Mon Sep 17 00:00:00 2001 From: YunHorn Technology Date: Wed, 31 Jul 2024 18:15:46 +0800 Subject: [PATCH] ---no good, freeze after 10 seconds --- Core/Inc/sys_conf.h | 2 +- LoRaWAN/App/lora_app.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/Inc/sys_conf.h b/Core/Inc/sys_conf.h index 2b87ca3..db49324 100644 --- a/Core/Inc/sys_conf.h +++ b/Core/Inc/sys_conf.h @@ -50,7 +50,7 @@ extern "C" { * #define VLEVEL_M 2 functional traces * #define VLEVEL_H 3 all traces */ -#define VERBOSE_LEVEL VLEVEL_L +#define VERBOSE_LEVEL VLEVEL_H /** * @brief Enable trace logs diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 4ee0cda..546b5af 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -2679,7 +2679,8 @@ void STS_REBOOT_CONFIG_Init(void) uint8_t nvm_stored_value[YUNHORN_STS_MAX_NVM_CFG_SIZE]={0x0}; /* USER CODE END OnRestoreContextRequest_1 */ - UTIL_MEM_cpy_8(nvm_stored_value, (void *)STS_CONFIG_NVM_BASE_ADDRESS, YUNHORN_STS_MAX_NVM_CFG_SIZE); + //UTIL_MEM_cpy_8(nvm_stored_value, (void *)STS_CONFIG_NVM_BASE_ADDRESS, YUNHORN_STS_MAX_NVM_CFG_SIZE); + FLASH_IF_Read((void*)nvm_stored_value, (void *)STS_CONFIG_NVM_BASE_ADDRESS, YUNHORN_STS_MAX_NVM_CFG_SIZE); /* USER CODE BEGIN OnRestoreContextRequest_Last */ //#if (defined(STS_O7)||defined(STS_O5) || defined(STS_O6) || defined(STS_R0) || defined(STS_R5)|| defined(STS_R4)|| defined(STS_R1D)) @@ -2892,8 +2893,8 @@ void STS_SENSOR_Function_Test_Process(void) #endif } - memset((void*)outbuf,0x0, sizeof(outbuf)); - memcpy((void*)outbuf, tstbuf, i); + //memset((void*)outbuf,0x0, sizeof(outbuf)); + UTIL_MEM_cpy_8((void*)outbuf, (void*)tstbuf, i); STS_SENSOR_Upload_Message(LORAWAN_USER_APP_CTRL_REPLY_PORT, i, (uint8_t*)outbuf); }