diff --git a/Core/Src/gpio.c b/Core/Src/gpio.c
index bbfa31d..1301a4b 100644
--- a/Core/Src/gpio.c
+++ b/Core/Src/gpio.c
@@ -90,7 +90,7 @@ void MX_GPIO_Init(void)
#ifdef STS_T6
GPIO_InitStruct.Pin = PIR_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING; //GPIO_MODE_INPUT;
- GPIO_InitStruct.Pull = GPIO_PULLUP;
+ GPIO_InitStruct.Pull = GPIO_PULLDOWN;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(PIR_GPIO_Port, &GPIO_InitStruct);
@@ -222,7 +222,7 @@ void MX_GPIO_Init(void)
HAL_NVIC_EnableIRQ(EXTI15_10_IRQn);
#ifdef STS_T6
- HAL_NVIC_SetPriority(PIR_EXTI_IRQn, 0, 0);
+ HAL_NVIC_SetPriority(PIR_EXTI_IRQn, 2, 0);
HAL_NVIC_EnableIRQ(PIR_EXTI_IRQn);
#endif
diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c
index 1b16160..f201a04 100644
--- a/LoRaWAN/App/lora_app.c
+++ b/LoRaWAN/App/lora_app.c
@@ -657,9 +657,9 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
case PIR_Pin:
sts_pir_state= PIR_STATE;
// HAL_Delay(50);
- __HAL_GPIO_EXTI_CLEAR_IT(GPIO_Pin);
+ //__HAL_GPIO_EXTI_CLEAR_IT(GPIO_Pin);
// APP_LOG(TS_OFF, VLEVEL_M, "\r\nMotion Detection result=%d \r\n", sts_pir_state);
- // UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0);
+ UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0);
break;
#endif
@@ -1229,9 +1229,9 @@ static void OnJoinRequest(LmHandlerJoinParams_t *joinParams)
}
AppData.Port = 1;
AppData.BufferSize = 16;
- UTIL_MEM_cpy_8((uint8_t*)AppData.Buffer, (uint8_t *)"YUNHORN168", 10);
- UTIL_MEM_cpy_8((uint8_t*)AppData.Buffer+10, (uint8_t *)(uint8_t*)YUNHORN_STS_PRD_STRING, sizeof(YUNHORN_STS_PRD_STRING));
- AppData.BufferSize = sizeof(YUNHORN_STS_PRD_STRING)+10;
+ //UTIL_MEM_cpy_8((uint8_t*)AppData.Buffer, (uint8_t *)"YUNHORN168", 10);
+ UTIL_MEM_cpy_8((uint8_t*)AppData.Buffer, (uint8_t *)(uint8_t*)YUNHORN_STS_PRD_STRING, sizeof(YUNHORN_STS_PRD_STRING));
+ AppData.BufferSize = sizeof(YUNHORN_STS_PRD_STRING)-1;
LmHandlerParams.IsTxConfirmed = true;
LmHandlerErrorStatus_t status = LmHandlerSend(&AppData, LmHandlerParams.IsTxConfirmed, false);
if (status ==LORAMAC_HANDLER_SUCCESS ) LmHandlerParams.IsTxConfirmed = false;
diff --git a/LoRaWAN/Target/lorawan_conf.h b/LoRaWAN/Target/lorawan_conf.h
index 9ddccb0..1706743 100644
--- a/LoRaWAN/Target/lorawan_conf.h
+++ b/LoRaWAN/Target/lorawan_conf.h
@@ -109,7 +109,7 @@ extern "C" {
* - CHANNEL_PLAN_GROUP_AS923_4 (Freq offset = -5.90 MHz / Freq range = 917-920MHz)
* - CHANNEL_PLAN_GROUP_AS923_1_JP (Freq offset = 0.0 MHz / Freq range = 920.6-923.4MHz)
*/
-#define REGION_AS923_DEFAULT_CHANNEL_PLAN CHANNEL_PLAN_GROUP_AS923_1_JP
+#define REGION_AS923_DEFAULT_CHANNEL_PLAN CHANNEL_PLAN_GROUP_AS923_1
/*!
* @brief Limits the number usable channels by default for AU915, CN470 and US915 regions
diff --git a/STM32CubeIDE/.settings/language.settings.xml b/STM32CubeIDE/.settings/language.settings.xml
index 9e6a728..b12f9ea 100644
--- a/STM32CubeIDE/.settings/language.settings.xml
+++ b/STM32CubeIDE/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
diff --git a/STM32CubeIDE/Release/Application/User/Core/subdir.mk b/STM32CubeIDE/Release/Application/User/Core/subdir.mk
index a62f204..5c753fe 100644
--- a/STM32CubeIDE/Release/Application/User/Core/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/Core/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Application/User/LoRaWAN/App/subdir.mk b/STM32CubeIDE/Release/Application/User/LoRaWAN/App/subdir.mk
index 11d149f..c71703f 100644
--- a/STM32CubeIDE/Release/Application/User/LoRaWAN/App/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/LoRaWAN/App/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Application/User/LoRaWAN/Target/subdir.mk b/STM32CubeIDE/Release/Application/User/LoRaWAN/Target/subdir.mk
index 0710888..64cf432 100644
--- a/STM32CubeIDE/Release/Application/User/LoRaWAN/Target/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/LoRaWAN/Target/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Application/User/STS/Core/Src/subdir.mk b/STM32CubeIDE/Release/Application/User/STS/Core/Src/subdir.mk
index dd89627..1d2b42a 100644
--- a/STM32CubeIDE/Release/Application/User/STS/Core/Src/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/STS/Core/Src/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Application/User/STS/TOF/App/subdir.mk b/STM32CubeIDE/Release/Application/User/STS/TOF/App/subdir.mk
index 86645ab..a797153 100644
--- a/STM32CubeIDE/Release/Application/User/STS/TOF/App/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/STS/TOF/App/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Application/User/STS/TOF/Target/subdir.mk b/STM32CubeIDE/Release/Application/User/STS/TOF/Target/subdir.mk
index a954aec..f660623 100644
--- a/STM32CubeIDE/Release/Application/User/STS/TOF/Target/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/STS/TOF/Target/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l1x_uld/subdir.mk b/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l1x_uld/subdir.mk
index de63431..eb52ebc 100644
--- a/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l1x_uld/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l1x_uld/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Application/User/Startup/subdir.mk b/STM32CubeIDE/Release/Application/User/Startup/subdir.mk
index 140938e..cc5db04 100644
--- a/STM32CubeIDE/Release/Application/User/Startup/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/Startup/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Drivers/BSP/53L8A1/subdir.mk b/STM32CubeIDE/Release/Drivers/BSP/53L8A1/subdir.mk
index acbe69a..46ee871 100644
--- a/STM32CubeIDE/Release/Drivers/BSP/53L8A1/subdir.mk
+++ b/STM32CubeIDE/Release/Drivers/BSP/53L8A1/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Drivers/BSP/Components/subdir.mk b/STM32CubeIDE/Release/Drivers/BSP/Components/subdir.mk
index acbe69a..46ee871 100644
--- a/STM32CubeIDE/Release/Drivers/BSP/Components/subdir.mk
+++ b/STM32CubeIDE/Release/Drivers/BSP/Components/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Drivers/CMSIS/subdir.mk b/STM32CubeIDE/Release/Drivers/CMSIS/subdir.mk
index 29abf0f..b219409 100644
--- a/STM32CubeIDE/Release/Drivers/CMSIS/subdir.mk
+++ b/STM32CubeIDE/Release/Drivers/CMSIS/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Drivers/STM32WLxx_HAL_Driver/subdir.mk b/STM32CubeIDE/Release/Drivers/STM32WLxx_HAL_Driver/subdir.mk
index bd778e3..5052c7f 100644
--- a/STM32CubeIDE/Release/Drivers/STM32WLxx_HAL_Driver/subdir.mk
+++ b/STM32CubeIDE/Release/Drivers/STM32WLxx_HAL_Driver/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Middlewares/LoRaWAN/subdir.mk b/STM32CubeIDE/Release/Middlewares/LoRaWAN/subdir.mk
index 4b70444..f1fe17f 100644
--- a/STM32CubeIDE/Release/Middlewares/LoRaWAN/subdir.mk
+++ b/STM32CubeIDE/Release/Middlewares/LoRaWAN/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Middlewares/SubGHz_Phy/subdir.mk b/STM32CubeIDE/Release/Middlewares/SubGHz_Phy/subdir.mk
index 36a2e36..59e99e8 100644
--- a/STM32CubeIDE/Release/Middlewares/SubGHz_Phy/subdir.mk
+++ b/STM32CubeIDE/Release/Middlewares/SubGHz_Phy/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Utilities/subdir.mk b/STM32CubeIDE/Release/Utilities/subdir.mk
index 81a6d22..a58aa1d 100644
--- a/STM32CubeIDE/Release/Utilities/subdir.mk
+++ b/STM32CubeIDE/Release/Utilities/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf
index 9176ea7..b42450d 100644
Binary files a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf and b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf differ
diff --git a/STM32CubeIDE/Release/makefile b/STM32CubeIDE/Release/makefile
index d4fa33d..d6824bb 100644
--- a/STM32CubeIDE/Release/makefile
+++ b/STM32CubeIDE/Release/makefile
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
-include ../makefile.init
diff --git a/STM32CubeIDE/Release/objects.mk b/STM32CubeIDE/Release/objects.mk
index a5103de..515d2a4 100644
--- a/STM32CubeIDE/Release/objects.mk
+++ b/STM32CubeIDE/Release/objects.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
USER_OBJS :=
diff --git a/STM32CubeIDE/Release/sources.mk b/STM32CubeIDE/Release/sources.mk
index 344e5f1..9f845fe 100644
--- a/STM32CubeIDE/Release/sources.mk
+++ b/STM32CubeIDE/Release/sources.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
ELF_SRCS :=
diff --git a/STS/TOF/App/app_tof_peoplecount.c b/STS/TOF/App/app_tof_peoplecount.c
index 9d14a97..8b9b949 100644
--- a/STS/TOF/App/app_tof_peoplecount.c
+++ b/STS/TOF/App/app_tof_peoplecount.c
@@ -669,7 +669,7 @@ void STS_TOF_VL53LX_PresenceDetection_Process_Start(void)
sts_tof_vl53lx_presence_detection_init();
return ;
}
- if (sts_tof_presence_state ==1)
+ if ((sts_tof_presence_state ==1)|| (sts_pir_state ==1))
{
LED_GREEN_OFF;
LED_RED_ON;