From a807b67fa8bdec035a222f94674068b9800765a0 Mon Sep 17 00:00:00 2001 From: YunHorn Technology Date: Wed, 18 Sep 2024 20:38:58 +0800 Subject: [PATCH] wip --- LoRaWAN/App/lora_app.c | 4 +++- LoRaWAN/Target/lorawan_conf.h | 2 +- STS/Core/Src/yunhorn_sts_process.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 10e4623..b02c521 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -501,6 +501,8 @@ void LoRaWAN_Init(void) STS_REBOOT_CONFIG_Init(); + UTIL_SEQ_RegTask((1 << CFG_SEQ_Task_YunhornSTSEventRFAC), UTIL_SEQ_RFU, STS_YunhornSTSEventRFAC_Process); + #ifdef STS_P2 UTIL_SEQ_RegTask((1 << CFG_SEQ_Task_YunhornSTSEventP5), UTIL_SEQ_RFU, STS_YunhornSTSEventP5_Process); @@ -513,7 +515,7 @@ void LoRaWAN_Init(void) UTIL_TIMER_Start(&YunhornSTSWakeUpScanTimer); UTIL_TIMER_Create(&YunhornSTSHeartBeatTimer, STS_HeartBeatTimerPeriod_sec, UTIL_TIMER_PERIODIC, OnYunhornSTSHeartBeatTimerEvent, NULL); - + UTIL_TIMER_Start(&YunhornSTSHeartBeatTimer); /* USER CODE END LoRaWAN_Init_Last */ } diff --git a/LoRaWAN/Target/lorawan_conf.h b/LoRaWAN/Target/lorawan_conf.h index 5754eb9..1706743 100644 --- a/LoRaWAN/Target/lorawan_conf.h +++ b/LoRaWAN/Target/lorawan_conf.h @@ -122,7 +122,7 @@ extern "C" { * @brief Define the read access of the keys in memory * @note this value should be disabled after the development process */ -#define KEY_EXTRACTABLE 0 +#define KEY_EXTRACTABLE 1 /*! * @brief Enables/Disables the context storage management storage diff --git a/STS/Core/Src/yunhorn_sts_process.c b/STS/Core/Src/yunhorn_sts_process.c index 6c6fc66..655d649 100644 --- a/STS/Core/Src/yunhorn_sts_process.c +++ b/STS/Core/Src/yunhorn_sts_process.c @@ -1432,7 +1432,7 @@ void STS_REBOOT_CONFIG_Init(void) /* USER CODE END OnRestoreContextRequest_1 */ //UTIL_MEM_cpy_8((void*)nvm_store_value, (void*)STS_CONFIG_NVM_BASE_ADDRESS, YUNHORN_STS_MAX_NVM_CFG_SIZE); - FLASH_IF_Read((void*)nvm_store_value, (void*)STS_CONFIG_NVM_BASE_ADDRESS, YUNHORN_STS_MAX_NVM_CFG_SIZE); + FLASH_IF_Read(nvm_store_value, STS_CONFIG_NVM_BASE_ADDRESS, YUNHORN_STS_MAX_NVM_CFG_SIZE); /* USER CODE BEGIN OnRestoreContextRequest_Last */ for (uint8_t x=0; x< 64; x++) {