workable STS_M1 2024 11 01

This commit is contained in:
Yunhorn 2024-11-01 17:11:37 +08:00
parent bad758d575
commit e6d964cd52
12 changed files with 75 additions and 46 deletions

View File

@ -302,23 +302,24 @@ void Error_Handler(void);
// STS_M1, WATER LEAKAGE PA1 READ DATA, PA1 // STS_M1, WATER LEAKAGE PA1 READ DATA, PA1
//#ifdef STS_M1 #ifdef STS_M1
//#define WATER_DETECT_Pin GPIO_PIN_1 #define WATER_DETECT_Pin GPIO_PIN_10
//#define WATER_DETECT_Port GPIOA #define WATER_DETECT_Port GPIOA
//#define WATER_DETECT_STATE HAL_GPIO_ReadPin(WATER_DETECT_Port, WATER_DETECT_Pin) #define WATER_DETECT_STATE HAL_GPIO_ReadPin(WATER_DETECT_Port, WATER_DETECT_Pin)
//#endif #endif
#if defined(STS_M1) #if defined(STS_M1)
/* Water leakage MEMS_IF_1, PA1 */ /* Water leakage MEMS_IF_1, PA1 */
#define WATER_LEAKAGE_STATUS_Pin GPIO_PIN_10 //#define WATER_LEAKAGE_STATUS_Pin GPIO_PIN_1
#define WATER_LEAKAGE_STATUS_GPIO_Port GPIOA //#define WATER_LEAKAGE_STATUS_GPIO_Port GPIOA
/* Water leakageON_OFF, MEMS_IF_1, PB5 */ /* Water leakageON_OFF, MEMS_IF_1, PB5 */
#define WATER_LEAKAGE_SWITCH_Pin GPIO_PIN_5
#define WATER_LEAKAGE_SWITCH_GPIO_Port GPIOB //#define WATER_LEAKAGE_SWITCH_Pin GPIO_PIN_5
#define WATER_LEAKAGE_ENABLE HAL_GPIO_WritePin(WATER_LEAKAGE_SWITCH_GPIO_Port, WATER_LEAKAGE_SWITCH_Pin, GPIO_PIN_SET ) //#define WATER_LEAKAGE_SWITCH_GPIO_Port GPIOB
#define WATER_LEAKAGE_DISABLE HAL_GPIO_WritePin(WATER_LEAKAGE_SWITCH_GPIO_Port, WATER_LEAKAGE_SWITCH_Pin, GPIO_PIN_RESET ) //#define WATER_LEAKAGE_ENABLE HAL_GPIO_WritePin(WATER_LEAKAGE_SWITCH_GPIO_Port, WATER_LEAKAGE_SWITCH_Pin, GPIO_PIN_SET )
#define WATER_LEAKAGE_DATA HAL_GPIO_ReadPin(WATER_LEAKAGE_STATUS_GPIO_Port,WATER_LEAKAGE_STATUS_Pin) //#define WATER_LEAKAGE_DISABLE HAL_GPIO_WritePin(WATER_LEAKAGE_SWITCH_GPIO_Port, WATER_LEAKAGE_SWITCH_Pin, GPIO_PIN_RESET )
//#define WATER_LEAKAGE_DATA HAL_GPIO_ReadPin(WATER_LEAKAGE_STATUS_GPIO_Port,WATER_LEAKAGE_STATUS_Pin)
#endif #endif

View File

@ -176,20 +176,20 @@ void MX_GPIO_Init(void)
#if defined(STS_M1) #if defined(STS_M1)
HAL_GPIO_WritePin(WATER_LEAKAGE_SWITCH_GPIO_Port, WATER_LEAKAGE_SWITCH_Pin, GPIO_PIN_RESET); HAL_GPIO_WritePin(WATER_DETECT_Port, WATER_DETECT_Pin, GPIO_PIN_RESET);
/*Configure GPIO pins : PAPin PAPin */ /*Configure GPIO pins : PAPin PAPin */
GPIO_InitStruct.Pin = WATER_LEAKAGE_STATUS_Pin; GPIO_InitStruct.Pin = WATER_DETECT_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING; //GPIO_MODE_INPUT; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING; //GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_PULLUP; GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(WATER_LEAKAGE_STATUS_GPIO_Port, &GPIO_InitStruct); HAL_GPIO_Init(WATER_DETECT_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = WATER_LEAKAGE_SWITCH_Pin; //GPIO_InitStruct.Pin = WATER_LEAKAGE_SWITCH_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; //GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_PULLDOWN; //GPIO_InitStruct.Pull = GPIO_PULLDOWN;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; //GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(WATER_LEAKAGE_SWITCH_GPIO_Port, &GPIO_InitStruct); //HAL_GPIO_Init(WATER_LEAKAGE_SWITCH_GPIO_Port, &GPIO_InitStruct);
#endif #endif

View File

@ -244,7 +244,7 @@ void EXTI1_IRQHandler(void)
/* USER CODE END EXTI1_IRQn 0 */ /* USER CODE END EXTI1_IRQn 0 */
//#if defined(STS_M1) //#if defined(STS_M1)
//HAL_GPIO_EXTI_IRQHandler(WATER_LEAKAGE_STATUS_Pin); //HAL_GPIO_EXTI_IRQHandler(WATER_DETECT_Pin);
//#else //#else
// HAL_GPIO_EXTI_IRQHandler(BUT2_Pin); // HAL_GPIO_EXTI_IRQHandler(BUT2_Pin);
//#endif //#endif
@ -404,7 +404,7 @@ void EXTI15_10_IRQHandler(void)
HAL_GPIO_EXTI_IRQHandler(HALL2_Pin); HAL_GPIO_EXTI_IRQHandler(HALL2_Pin);
#endif #endif
#ifdef STS_M1 #ifdef STS_M1
HAL_GPIO_EXTI_IRQHandler(WATER_LEAKAGE_STATUS_Pin); HAL_GPIO_EXTI_IRQHandler(WATER_DETECT_Pin);
#endif #endif
#if defined(L8)||defined(STS_P2)||defined(STS_R1D)||defined(STS_R5) #if defined(L8)||defined(STS_P2)||defined(STS_R1D)||defined(STS_R5)
HAL_GPIO_EXTI_IRQHandler(TOF_INT_EXTI_PIN); HAL_GPIO_EXTI_IRQHandler(TOF_INT_EXTI_PIN);

View File

@ -51,7 +51,9 @@ extern volatile uint32_t rfac_timer;
extern volatile uint32_t STS_TOFScanPeriod_msec, STS_TxPeriod_sec, STS_HeartBeatTimerPeriod_sec; extern volatile uint32_t STS_TOFScanPeriod_msec, STS_TxPeriod_sec, STS_HeartBeatTimerPeriod_sec;
volatile uint8_t sts_data_buf[LORAWAN_APP_DATA_BUFFER_MAX_SIZE]={0x0}; volatile uint8_t sts_data_buf[LORAWAN_APP_DATA_BUFFER_MAX_SIZE]={0x0};
//volatile LmHandlerAppData_t sts_app_data={ 0, 0, sts_data_buf }; //volatile LmHandlerAppData_t sts_app_data={ 0, 0, sts_data_buf };
#ifdef STS_M1
extern volatile uint8_t sts_water_leakage_state;
#endif
/* USER CODE END EV */ /* USER CODE END EV */
/* Private typedef -----------------------------------------------------------*/ /* Private typedef -----------------------------------------------------------*/
@ -587,7 +589,24 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
break; break;
#elif defined(STS_M1) #elif defined(STS_M1)
case WATER_LEAKAGE_STATUS_Pin: case WATER_DETECT_Pin:
sts_water_leakage_state = WATER_DETECT_STATE;
if (0 == sts_water_leakage_state)
{
HAL_Delay(20);
sts_water_leakage_state = WATER_DETECT_STATE;
if (0 == sts_water_leakage_state)
APP_LOG(TS_OFF, VLEVEL_M, "\r\n water leakage state == 0 \r\n");
} else
{
HAL_Delay(20);
sts_water_leakage_state = WATER_DETECT_STATE;
if (1 == sts_water_leakage_state)
APP_LOG(TS_OFF, VLEVEL_M, "\r\n water leakage state == 1 \r\n");
}
HAL_Delay(100);
__HAL_GPIO_EXTI_CLEAR_IT(GPIO_Pin);
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; break;
#else #else

View File

@ -98,6 +98,9 @@
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.1950275040" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/> <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.1950275040" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/>
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries>
<entry excluding="Application/User/STS/TOF/App" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
@ -209,6 +212,9 @@
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.807803134" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/> <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.807803134" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/>
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries>
<entry excluding="Application/User/STS/TOF/App" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>

View File

@ -7,16 +7,19 @@
C_SRCS += \ C_SRCS += \
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/X-WL55_WLE5_53L0X.c \ D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/X-WL55_WLE5_53L0X.c \
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/app_tof.c \ D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/app_tof.c \
/app_tof_peoplecount.c \
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/app_tof_vl53l0x_range.c D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/app_tof_vl53l0x_range.c
OBJS += \ OBJS += \
./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.o \ ./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.o \
./Application/User/STS/TOF/App/app_tof.o \ ./Application/User/STS/TOF/App/app_tof.o \
./Application/User/STS/TOF/App/app_tof_peoplecount.o \
./Application/User/STS/TOF/App/app_tof_vl53l0x_range.o ./Application/User/STS/TOF/App/app_tof_vl53l0x_range.o
C_DEPS += \ C_DEPS += \
./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.d \ ./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.d \
./Application/User/STS/TOF/App/app_tof.d \ ./Application/User/STS/TOF/App/app_tof.d \
./Application/User/STS/TOF/App/app_tof_peoplecount.d \
./Application/User/STS/TOF/App/app_tof_vl53l0x_range.d ./Application/User/STS/TOF/App/app_tof_vl53l0x_range.d
@ -25,13 +28,15 @@ Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.o: D:/ONEDRIVE/STM32WLV13/Project
arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_M1 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WLE5xx -c -I../../Core/Inc -I../../STS/Core/Inc -I../../STS/TOF/App -I../../STS/TOF/Target -I../../STS/TOF/vl53l1x_uld -I../../STS/TOF/vl53l0x -I../../LoRaWAN/App -I../../LoRaWAN/Target -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../../../../Utilities/trace/adv_trace -I../../../../../../../Utilities/misc -I../../../../../../../Utilities/sequencer -I../../../../../../../Utilities/timer -I../../../../../../../Utilities/lpm/tiny_lpm -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler/Packages -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Crypto -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac/Region -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Utilities -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver -I../../../../../../../Middlewares/ST/STM32_Cryptographic/include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../../../../Drivers/BSP/Components/vl53l8cx/porting -I../../../../../../../Drivers/BSP/Components/Common -I../../../../../../../Drivers/BSP/53L8A1 -I../../../../../../../Drivers/BSP/Components/vl53l8cx/modules -I../../../../../../../Drivers/BSP/Components/vl53l8cx -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_M1 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WLE5xx -c -I../../Core/Inc -I../../STS/Core/Inc -I../../STS/TOF/App -I../../STS/TOF/Target -I../../STS/TOF/vl53l1x_uld -I../../STS/TOF/vl53l0x -I../../LoRaWAN/App -I../../LoRaWAN/Target -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../../../../Utilities/trace/adv_trace -I../../../../../../../Utilities/misc -I../../../../../../../Utilities/sequencer -I../../../../../../../Utilities/timer -I../../../../../../../Utilities/lpm/tiny_lpm -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler/Packages -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Crypto -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac/Region -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Utilities -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver -I../../../../../../../Middlewares/ST/STM32_Cryptographic/include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../../../../Drivers/BSP/Components/vl53l8cx/porting -I../../../../../../../Drivers/BSP/Components/Common -I../../../../../../../Drivers/BSP/53L8A1 -I../../../../../../../Drivers/BSP/Components/vl53l8cx/modules -I../../../../../../../Drivers/BSP/Components/vl53l8cx -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@"
Application/User/STS/TOF/App/app_tof.o: D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/app_tof.c Application/User/STS/TOF/App/subdir.mk Application/User/STS/TOF/App/app_tof.o: D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/app_tof.c Application/User/STS/TOF/App/subdir.mk
arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_M1 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WLE5xx -c -I../../Core/Inc -I../../STS/Core/Inc -I../../STS/TOF/App -I../../STS/TOF/Target -I../../STS/TOF/vl53l1x_uld -I../../STS/TOF/vl53l0x -I../../LoRaWAN/App -I../../LoRaWAN/Target -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../../../../Utilities/trace/adv_trace -I../../../../../../../Utilities/misc -I../../../../../../../Utilities/sequencer -I../../../../../../../Utilities/timer -I../../../../../../../Utilities/lpm/tiny_lpm -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler/Packages -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Crypto -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac/Region -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Utilities -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver -I../../../../../../../Middlewares/ST/STM32_Cryptographic/include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../../../../Drivers/BSP/Components/vl53l8cx/porting -I../../../../../../../Drivers/BSP/Components/Common -I../../../../../../../Drivers/BSP/53L8A1 -I../../../../../../../Drivers/BSP/Components/vl53l8cx/modules -I../../../../../../../Drivers/BSP/Components/vl53l8cx -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_M1 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WLE5xx -c -I../../Core/Inc -I../../STS/Core/Inc -I../../STS/TOF/App -I../../STS/TOF/Target -I../../STS/TOF/vl53l1x_uld -I../../STS/TOF/vl53l0x -I../../LoRaWAN/App -I../../LoRaWAN/Target -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../../../../Utilities/trace/adv_trace -I../../../../../../../Utilities/misc -I../../../../../../../Utilities/sequencer -I../../../../../../../Utilities/timer -I../../../../../../../Utilities/lpm/tiny_lpm -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler/Packages -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Crypto -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac/Region -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Utilities -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver -I../../../../../../../Middlewares/ST/STM32_Cryptographic/include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../../../../Drivers/BSP/Components/vl53l8cx/porting -I../../../../../../../Drivers/BSP/Components/Common -I../../../../../../../Drivers/BSP/53L8A1 -I../../../../../../../Drivers/BSP/Components/vl53l8cx/modules -I../../../../../../../Drivers/BSP/Components/vl53l8cx -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@"
Application/User/STS/TOF/App/app_tof_peoplecount.o: /app_tof_peoplecount.c Application/User/STS/TOF/App/subdir.mk
arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_M1 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WLE5xx -c -I../../Core/Inc -I../../STS/Core/Inc -I../../STS/TOF/App -I../../STS/TOF/Target -I../../STS/TOF/vl53l1x_uld -I../../STS/TOF/vl53l0x -I../../LoRaWAN/App -I../../LoRaWAN/Target -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../../../../Utilities/trace/adv_trace -I../../../../../../../Utilities/misc -I../../../../../../../Utilities/sequencer -I../../../../../../../Utilities/timer -I../../../../../../../Utilities/lpm/tiny_lpm -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler/Packages -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Crypto -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac/Region -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Utilities -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver -I../../../../../../../Middlewares/ST/STM32_Cryptographic/include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../../../../Drivers/BSP/Components/vl53l8cx/porting -I../../../../../../../Drivers/BSP/Components/Common -I../../../../../../../Drivers/BSP/53L8A1 -I../../../../../../../Drivers/BSP/Components/vl53l8cx/modules -I../../../../../../../Drivers/BSP/Components/vl53l8cx -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@"
Application/User/STS/TOF/App/app_tof_vl53l0x_range.o: D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/app_tof_vl53l0x_range.c Application/User/STS/TOF/App/subdir.mk Application/User/STS/TOF/App/app_tof_vl53l0x_range.o: D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/app_tof_vl53l0x_range.c Application/User/STS/TOF/App/subdir.mk
arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_M1 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WLE5xx -c -I../../Core/Inc -I../../STS/Core/Inc -I../../STS/TOF/App -I../../STS/TOF/Target -I../../STS/TOF/vl53l1x_uld -I../../STS/TOF/vl53l0x -I../../LoRaWAN/App -I../../LoRaWAN/Target -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../../../../Utilities/trace/adv_trace -I../../../../../../../Utilities/misc -I../../../../../../../Utilities/sequencer -I../../../../../../../Utilities/timer -I../../../../../../../Utilities/lpm/tiny_lpm -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler/Packages -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Crypto -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac/Region -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Utilities -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver -I../../../../../../../Middlewares/ST/STM32_Cryptographic/include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../../../../Drivers/BSP/Components/vl53l8cx/porting -I../../../../../../../Drivers/BSP/Components/Common -I../../../../../../../Drivers/BSP/53L8A1 -I../../../../../../../Drivers/BSP/Components/vl53l8cx/modules -I../../../../../../../Drivers/BSP/Components/vl53l8cx -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_M1 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WLE5xx -c -I../../Core/Inc -I../../STS/Core/Inc -I../../STS/TOF/App -I../../STS/TOF/Target -I../../STS/TOF/vl53l1x_uld -I../../STS/TOF/vl53l0x -I../../LoRaWAN/App -I../../LoRaWAN/Target -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../../../../Utilities/trace/adv_trace -I../../../../../../../Utilities/misc -I../../../../../../../Utilities/sequencer -I../../../../../../../Utilities/timer -I../../../../../../../Utilities/lpm/tiny_lpm -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler/Packages -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Crypto -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac/Region -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Utilities -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver -I../../../../../../../Middlewares/ST/STM32_Cryptographic/include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../../../../Drivers/BSP/Components/vl53l8cx/porting -I../../../../../../../Drivers/BSP/Components/Common -I../../../../../../../Drivers/BSP/53L8A1 -I../../../../../../../Drivers/BSP/Components/vl53l8cx/modules -I../../../../../../../Drivers/BSP/Components/vl53l8cx -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@"
clean: clean-Application-2f-User-2f-STS-2f-TOF-2f-App clean: clean-Application-2f-User-2f-STS-2f-TOF-2f-App
clean-Application-2f-User-2f-STS-2f-TOF-2f-App: clean-Application-2f-User-2f-STS-2f-TOF-2f-App:
-$(RM) ./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.cyclo ./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.d ./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.o ./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.su ./Application/User/STS/TOF/App/app_tof.cyclo ./Application/User/STS/TOF/App/app_tof.d ./Application/User/STS/TOF/App/app_tof.o ./Application/User/STS/TOF/App/app_tof.su ./Application/User/STS/TOF/App/app_tof_vl53l0x_range.cyclo ./Application/User/STS/TOF/App/app_tof_vl53l0x_range.d ./Application/User/STS/TOF/App/app_tof_vl53l0x_range.o ./Application/User/STS/TOF/App/app_tof_vl53l0x_range.su -$(RM) ./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.cyclo ./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.d ./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.o ./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.su ./Application/User/STS/TOF/App/app_tof.cyclo ./Application/User/STS/TOF/App/app_tof.d ./Application/User/STS/TOF/App/app_tof.o ./Application/User/STS/TOF/App/app_tof.su ./Application/User/STS/TOF/App/app_tof_peoplecount.cyclo ./Application/User/STS/TOF/App/app_tof_peoplecount.d ./Application/User/STS/TOF/App/app_tof_peoplecount.o ./Application/User/STS/TOF/App/app_tof_peoplecount.su ./Application/User/STS/TOF/App/app_tof_vl53l0x_range.cyclo ./Application/User/STS/TOF/App/app_tof_vl53l0x_range.d ./Application/User/STS/TOF/App/app_tof_vl53l0x_range.o ./Application/User/STS/TOF/App/app_tof_vl53l0x_range.su
.PHONY: clean-Application-2f-User-2f-STS-2f-TOF-2f-App .PHONY: clean-Application-2f-User-2f-STS-2f-TOF-2f-App

View File

@ -0,0 +1,9 @@
################################################################################
# Automatically-generated file. Do not edit!
# Toolchain: GNU Tools for STM32 (12.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
# Each subdirectory must supply rules for building sources it contributes

View File

@ -18,9 +18,9 @@ RM := rm -rf
-include Drivers/BSP/Components/subdir.mk -include Drivers/BSP/Components/subdir.mk
-include Drivers/BSP/53L8A1/subdir.mk -include Drivers/BSP/53L8A1/subdir.mk
-include Application/User/Startup/subdir.mk -include Application/User/Startup/subdir.mk
-include Application/User/STS/TOF/vl53l1x_uld/subdir.mk
-include Application/User/STS/TOF/vl53l0x/subdir.mk -include Application/User/STS/TOF/vl53l0x/subdir.mk
-include Application/User/STS/TOF/Target/subdir.mk -include Application/User/STS/TOF/Target/subdir.mk
-include Application/User/STS/TOF/App/subdir.mk
-include Application/User/STS/Core/Src/subdir.mk -include Application/User/STS/Core/Src/subdir.mk
-include Application/User/LoRaWAN/Target/subdir.mk -include Application/User/LoRaWAN/Target/subdir.mk
-include Application/User/LoRaWAN/App/subdir.mk -include Application/User/LoRaWAN/App/subdir.mk

View File

@ -26,9 +26,9 @@ Application/User/Core \
Application/User/LoRaWAN/App \ Application/User/LoRaWAN/App \
Application/User/LoRaWAN/Target \ Application/User/LoRaWAN/Target \
Application/User/STS/Core/Src \ Application/User/STS/Core/Src \
Application/User/STS/TOF/App \
Application/User/STS/TOF/Target \ Application/User/STS/TOF/Target \
Application/User/STS/TOF/vl53l0x \ Application/User/STS/TOF/vl53l0x \
Application/User/STS/TOF/vl53l1x_uld \
Application/User/Startup \ Application/User/Startup \
Drivers/BSP/53L8A1 \ Drivers/BSP/53L8A1 \
Drivers/BSP/Components \ Drivers/BSP/Components \

View File

@ -315,26 +315,14 @@ void STS_YunhornSTSEventP1_Process(void)
#if defined(STS_M1) #if defined(STS_M1)
PME_ON;
APP_LOG(TS_OFF, VLEVEL_M, "\r\n WATER LEAKAGE DETECTION Process \n"); APP_LOG(TS_OFF, VLEVEL_M, "\r\n WATER LEAKAGE DETECTION Process \n");
WATER_LEAKAGE_ENABLE;
HAL_Delay(50);
WATER_LEAKAGE_ENABLE;
LED1_ON; LED1_ON;
//HAL_Delay(40); HAL_Delay(50);
sts_water_leakage_state = WATER_DETECT_STATE;
sts_water_leakage_state = WATER_LEAKAGE_DATA;
APP_LOG(TS_OFF, VLEVEL_M, "\r\n DETECTION RESULT =%d \r\n", sts_water_leakage_state); APP_LOG(TS_OFF, VLEVEL_M, "\r\n DETECTION RESULT =%d \r\n", sts_water_leakage_state);
//LED1_OFF;
//HAL_Delay(50);
WATER_LEAKAGE_DISABLE;
//HAL_Delay(50);
//LED1_ON;
HAL_Delay(40); HAL_Delay(40);
sts_water_leakage_state = WATER_LEAKAGE_DATA; PME_OFF;
APP_LOG(TS_OFF, VLEVEL_M, "\r\n DETECTION RESULT =%d \r\n", sts_water_leakage_state);
//PME_OFF;
LED1_OFF; LED1_OFF;
#endif #endif
@ -593,9 +581,10 @@ void STS_R4_sensor_read(sts_r_sensor_data_t *sts_r_sensor_data)
#ifdef STS_M1 #ifdef STS_M1
void STS_M1_sensor_read(sts_r_sensor_data_t *sts_m_sensor_data) void STS_M1_sensor_read(sts_r_sensor_data_t *sts_m_sensor_data)
{ {
APP_LOG(TS_OFF, VLEVEL_M, "\r\n M1 sensor read =%d \r\n", WATER_LEAKAGE_DATA);
sts_m_sensor_data->on_off_event = sts_water_leakage_state; sts_m_sensor_data->on_off_event = sts_water_leakage_state;
sts_m_sensor_data->on_off_event = WATER_LEAKAGE_DATA; //sts_m_sensor_data->on_off_event = WATER_LEAKAGE_DATA;
APP_LOG(TS_OFF, VLEVEL_M, "\r\n M1 sensor read =%d \r\n", sts_water_leakage_state);
sts_m_sensor_data->measure_tech = 0; //weak current detection sts_m_sensor_data->measure_tech = 0; //weak current detection
} }
#endif #endif