diff --git a/Core/Inc/iwdg.h b/Core/Inc/iwdg.h new file mode 100644 index 0000000..f79d539 --- /dev/null +++ b/Core/Inc/iwdg.h @@ -0,0 +1,58 @@ +/** + ****************************************************************************** + * File Name : IWDG.h + * Description : This file provides code for the configuration + * of the IWDG instances. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2021 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __iwdg_H +#define __iwdg_H +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" + +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +void MX_IWDG_Init(void); + +void Refresh_IWDG(void); + +/* USER CODE BEGIN Prototypes */ + +/* USER CODE END Prototypes */ + +#ifdef __cplusplus +} +#endif +#endif /*__ iwdg_H */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Core/Inc/stm32wlxx_hal_conf.h b/Core/Inc/stm32wlxx_hal_conf.h index 660926c..63588a9 100644 --- a/Core/Inc/stm32wlxx_hal_conf.h +++ b/Core/Inc/stm32wlxx_hal_conf.h @@ -45,7 +45,7 @@ /*#define HAL_I2S_MODULE_ENABLED */ /*#define HAL_IPCC_MODULE_ENABLED */ /*#define HAL_IRDA_MODULE_ENABLED */ -/*#define HAL_IWDG_MODULE_ENABLED */ +#define HAL_IWDG_MODULE_ENABLED /*#define HAL_LPTIM_MODULE_ENABLED */ /*#define HAL_PKA_MODULE_ENABLED */ /*#define HAL_RNG_MODULE_ENABLED */ diff --git a/Core/Inc/sys_conf.h b/Core/Inc/sys_conf.h index c8e4d0f..f10502a 100644 --- a/Core/Inc/sys_conf.h +++ b/Core/Inc/sys_conf.h @@ -47,7 +47,7 @@ extern "C" { /** * @brief Verbose level for all trace logs */ -#define VERBOSE_LEVEL VLEVEL_L +#define VERBOSE_LEVEL VLEVEL_M /** * @brief Enable trace logs diff --git a/Core/Inc/utilities_def.h b/Core/Inc/utilities_def.h index 68b7566..7d45540 100644 --- a/Core/Inc/utilities_def.h +++ b/Core/Inc/utilities_def.h @@ -92,7 +92,7 @@ typedef enum #if defined(STS_R1)||defined(STS_R1D)||defined(STS_R5)||defined(STS_R2) CFG_SEQ_Task_YunhornSTSEventP4, /* TOF RANGE */ #endif -#if defined(STS_P2)||defined(STS_T6)||defined(L8) +#if defined(STS_P2)||defined(STS_T6)||defined(STS_L8) CFG_SEQ_Task_YunhornSTSEventP5, /* TOF IN-OUT */ #endif #ifdef STS_R4 @@ -107,6 +107,9 @@ typedef enum #ifdef MODBUS_RS485 STS_YunhornSTSEventPIORS485_Process, /* RS485 MODBUS RTU */ #endif +#if defined(STS_L8) + CFG_SEQ_Task_YunhornSTSEventSelfTestProcess, /* Self Function Test Process */ +#endif /* USER CODE END CFG_SEQ_Task_Id_t */ CFG_SEQ_Task_NBR diff --git a/Core/Src/dma.c b/Core/Src/dma.c index 64afc88..0bd228e 100644 --- a/Core/Src/dma.c +++ b/Core/Src/dma.c @@ -66,6 +66,7 @@ void MX_DMA_Init(void) HAL_NVIC_EnableIRQ(DMA1_Channel1_IRQn); #endif +#if 0 // I2C2 /* DMA1_Channel4_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA1_Channel4_IRQn, 0, 0); @@ -73,7 +74,7 @@ void MX_DMA_Init(void) /* DMA1_Channel5_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA1_Channel5_IRQn, 0, 0); HAL_NVIC_EnableIRQ(DMA1_Channel5_IRQn); - +#endif // USART2 /* DMA1_Channel6_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA1_Channel6_IRQn, 0, 0); diff --git a/Core/Src/iwdg.c b/Core/Src/iwdg.c new file mode 100644 index 0000000..c57b355 --- /dev/null +++ b/Core/Src/iwdg.c @@ -0,0 +1,51 @@ +/** + ****************************************************************************** + * File Name : IWDG.c + * Description : This file provides code for the configuration + * of the IWDG instances. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2021 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "iwdg.h" +IWDG_HandleTypeDef hiwdg; +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/* IWDG init function */ +void MX_IWDG_Init(void) +{ + + hiwdg.Instance = IWDG; + hiwdg.Init.Prescaler = IWDG_PRESCALER_256; // 32k -> 30 seconds + //hiwdg.Init.Window = 0x0FFF; + hiwdg.Init.Window = IWDG_WINDOW_DISABLE; + hiwdg.Init.Reload = 0x0FFF; + if (HAL_IWDG_Init(&hiwdg) != HAL_OK) + { + Error_Handler(); + } +} + +void Refresh_IWDG(void) +{ +// IWDG->KR=0XAAAA; + HAL_IWDG_Refresh(&hiwdg); +} +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Core/Src/main.c b/Core/Src/main.c index e5be67e..ade8474 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -21,13 +21,16 @@ #include "app_lorawan.h" #include "gpio.h" #include +#include "iwdg.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ -#include "i2c.h" +//#include "i2c.h" +#include "stm32wlxx_nucleo_bus.h" #include "dma.h" #include "usart.h" #include "sys_app.h" #include "tim.h" +#include "yunhorn_sts_sensors.h" #ifdef STS_P2 #include "app_tof.h" #include "app_tof_peoplecount.h" @@ -114,19 +117,23 @@ int main(void) else #endif { - MX_I2C2_Init(); + BSP_I2C2_Init(); MX_DMA_Init(); MX_TIM1_Init(); - + MX_IWDG_Init(); MX_LoRaWAN_Init(); - //STS_Lamp_Bar_Self_Test(); - } + //STS_Lamp_Bar_Self_Test(); + + } /* USER CODE BEGIN 2 */ + STS_Sensor_Init(); /* USER CODE END 2 */ + STS_Sensor_Prepare(); + /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) @@ -136,6 +143,7 @@ int main(void) MX_LoRaWAN_Process(); /* USER CODE BEGIN 3 */ + Refresh_IWDG(); } /* USER CODE END 3 */ } diff --git a/Core/Src/stm32wlxx_it.c b/Core/Src/stm32wlxx_it.c index a8d577c..679119e 100644 --- a/Core/Src/stm32wlxx_it.c +++ b/Core/Src/stm32wlxx_it.c @@ -328,7 +328,7 @@ void DMA1_Channel3_IRQHandler(void) } /* I2C2 */ - +#if 0 /** * @brief This function handles DMA1 Channel 4 Interrupt. */ @@ -337,7 +337,7 @@ void DMA1_Channel4_IRQHandler(void) /* USER CODE BEGIN DMA1_Channel4_IRQn 0 */ /* USER CODE END DMA1_Channel4_IRQn 0 */ - HAL_DMA_IRQHandler(&hdma_i2c2_rx); + //HAL_DMA_IRQHandler(&hdma_i2c2_rx); /* USER CODE BEGIN DMA1_Channel4_IRQn 1 */ /* USER CODE END DMA1_Channel4_IRQn 1 */ @@ -352,13 +352,13 @@ void DMA1_Channel5_IRQHandler(void) /* USER CODE END DMA1_Channel5_IRQn 0 */ - HAL_DMA_IRQHandler(&hdma_i2c2_tx); + //HAL_DMA_IRQHandler(&hdma_i2c2_tx); /* USER CODE BEGIN DMA1_Channel5_IRQn 1 */ /* USER CODE END DMA1_Channel5_IRQn 1 */ } - +#endif // USART2 /** * @brief This function handles DMA1 Channel 6 Interrupt. diff --git a/Core/Src/stm32wlxx_nucleo_bus.c b/Core/Src/stm32wlxx_nucleo_bus.c index 145b527..3a74680 100644 --- a/Core/Src/stm32wlxx_nucleo_bus.c +++ b/Core/Src/stm32wlxx_nucleo_bus.c @@ -38,7 +38,7 @@ __weak HAL_StatusTypeDef MX_I2C2_Init(I2C_HandleTypeDef* hi2c); * @{ */ -extern I2C_HandleTypeDef hi2c2; +I2C_HandleTypeDef hi2c2; /** * @} */ diff --git a/Core/Src/sts_lamp_bar.c b/Core/Src/sts_lamp_bar.c index 52cd6a1..fe63260 100644 --- a/Core/Src/sts_lamp_bar.c +++ b/Core/Src/sts_lamp_bar.c @@ -127,7 +127,7 @@ void STS_Lamp_Bar_Scoller(uint8_t color, uint8_t lum_level) for(uint8_t i = 0; i 5)) + { + PIRValue = 0; + lockLow = true; + sts_pir_read = 0; + APP_LOG(TS_OFF, VLEVEL_M, "\r\n PIRValue=%d \r\n", PIRValue); + if (sts_pir_read != prev_sts_pir_state) { + sts_pir_state_changed = 1; + } + prev_sts_pir_state = sts_pir_read; + } + } + // HAL_Delay(50); + //__HAL_GPIO_EXTI_CLEAR_IT(GPIO_Pin); + APP_LOG(TS_OFF, VLEVEL_M, "\r\nMotion Detection result=%d \r\n", sts_pir_read); OnSensorPIR1StateChanged(); + + if ( sts_pir_state_changed == 1) + { + sts_pir_state_changed = 0; + UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0); + } + #endif //OnSensor3StateChanged(); //OnSensorPIR1StateChanged(); @@ -725,12 +848,14 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) } #endif +#if 0 if (sts_pir_read != last_sts_pir_read) { - last_sts_pir_read = sts_hall3_read; - UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0); + last_sts_pir_read = sts_pir_read; + // disable PIR status upload 2025 04 18 + // UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0); } - +#endif break; #if 0 case HALL4_Pin: @@ -952,7 +1077,7 @@ static void SendTxData(void) #elif defined(STS_M1) sts_r_sensor_data_t sts_m1_sensor_data={0}; #elif defined(STS_L8) - sts_fhmos_sensor_data_t fhmos_data={0}; + sts_fhmos_sensor_data_t fhmos_info={0}; #elif defined(STS_XX) #endif @@ -987,7 +1112,7 @@ static void SendTxData(void) #endif #ifdef STS_L8 - STS_FHMOS_sensor_read(&fhmos_data); + STS_FHMOS_sensor_read(&fhmos_info); #endif #ifdef VL53LX @@ -1159,33 +1284,33 @@ static void SendTxData(void) #if defined(L8) //AppData.Buffer[i++] = 4; #if 0 - if ((fhmos_data.state_fall ==3)||(fhmos_data.state_occupancy ==3)||(fhmos_data.state_human_movement ==3)) + if ((fhmos_info.state_fall ==3)||(fhmos_info.state_occupancy ==3)||(fhmos_info.state_human_movement ==3)) { AppData.Buffer[i++] = 10; AppData.Buffer[i++] = 0x04; // payload type, 0x01= regular payload - AppData.Buffer[i++] = fhmos_data.state_fall; - AppData.Buffer[i++] = fhmos_data.state_human_movement; - AppData.Buffer[i++] = fhmos_data.state_occupancy; - AppData.Buffer[i++] = fhmos_data.state_sos_alarm; - AppData.Buffer[i++] = fhmos_data.lamp_bar_color; - if (fhmos_data.state_fall ==3) + AppData.Buffer[i++] = fhmos_info.state_fall; + AppData.Buffer[i++] = fhmos_info.state_human_movement; + AppData.Buffer[i++] = fhmos_info.state_occupancy; + AppData.Buffer[i++] = fhmos_info.state_sos_alarm; + AppData.Buffer[i++] = fhmos_info.lamp_bar_color; + if (fhmos_info.state_fall ==3) { - AppData.Buffer[i++] = 0xff&(fhmos_data.time_stamp_fall_confirmed>>24); - AppData.Buffer[i++] = 0xff&(fhmos_data.time_stamp_fall_confirmed>>16); - AppData.Buffer[i++] = 0xff&(fhmos_data.time_stamp_fall_confirmed>>8); - AppData.Buffer[i++] = 0xff&(fhmos_data.time_stamp_fall_confirmed); - } else if (fhmos_data.state_occupancy ==3){ - AppData.Buffer[i++] = 0xff&(fhmos_data.time_stamp_overstay_confirmed>>24); - AppData.Buffer[i++] = 0xff&(fhmos_data.time_stamp_overstay_confirmed>>16); - AppData.Buffer[i++] = 0xff&(fhmos_data.time_stamp_overstay_confirmed>>8); - AppData.Buffer[i++] = 0xff&(fhmos_data.time_stamp_overstay_confirmed); + AppData.Buffer[i++] = 0xff&(fhmos_info.time_stamp_fall_confirmed>>24); + AppData.Buffer[i++] = 0xff&(fhmos_info.time_stamp_fall_confirmed>>16); + AppData.Buffer[i++] = 0xff&(fhmos_info.time_stamp_fall_confirmed>>8); + AppData.Buffer[i++] = 0xff&(fhmos_info.time_stamp_fall_confirmed); + } else if (fhmos_info.state_occupancy ==3){ + AppData.Buffer[i++] = 0xff&(fhmos_info.time_stamp_overstay_confirmed>>24); + AppData.Buffer[i++] = 0xff&(fhmos_info.time_stamp_overstay_confirmed>>16); + AppData.Buffer[i++] = 0xff&(fhmos_info.time_stamp_overstay_confirmed>>8); + AppData.Buffer[i++] = 0xff&(fhmos_info.time_stamp_overstay_confirmed); - } else if (fhmos_data.state_human_movement ==3) + } else if (fhmos_info.state_human_movement ==3) { - AppData.Buffer[i++] = 0xff&(fhmos_data.time_stamp_motionless_confirmed>>24); - AppData.Buffer[i++] = 0xff&(fhmos_data.time_stamp_motionless_confirmed>>16); - AppData.Buffer[i++] = 0xff&(fhmos_data.time_stamp_motionless_confirmed>>8); - AppData.Buffer[i++] = 0xff&(fhmos_data.time_stamp_motionless_confirmed); + AppData.Buffer[i++] = 0xff&(fhmos_info.time_stamp_motionless_confirmed>>24); + AppData.Buffer[i++] = 0xff&(fhmos_info.time_stamp_motionless_confirmed>>16); + AppData.Buffer[i++] = 0xff&(fhmos_info.time_stamp_motionless_confirmed>>8); + AppData.Buffer[i++] = 0xff&(fhmos_info.time_stamp_motionless_confirmed); } } else @@ -1194,38 +1319,38 @@ static void SendTxData(void) AppData.Buffer[i++] = 9; AppData.Buffer[i++] = 0x01; - AppData.Buffer[i++] = fhmos_data.state_fall; - AppData.Buffer[i++] = fhmos_data.state_human_movement; - AppData.Buffer[i++] = fhmos_data.state_occupancy; - AppData.Buffer[i++] = fhmos_data.state_sos_alarm; + AppData.Buffer[i++] = fhmos_info.state_fall; + AppData.Buffer[i++] = fhmos_info.state_human_movement; + AppData.Buffer[i++] = fhmos_info.state_occupancy; + AppData.Buffer[i++] = fhmos_info.state_sos_alarm; - AppData.Buffer[i++] = fhmos_data.lamp_bar_color; - AppData.Buffer[i++] = fhmos_data.state_hall_1; - AppData.Buffer[i++] = fhmos_data.state_hall_2; - AppData.Buffer[i++] = fhmos_data.state_PIR; + AppData.Buffer[i++] = fhmos_info.lamp_bar_color; + AppData.Buffer[i++] = fhmos_info.state_hall_1; + AppData.Buffer[i++] = fhmos_info.state_hall_2; + AppData.Buffer[i++] = fhmos_info.state_PIR; - if (fhmos_data.state_fall_released == 1) + if (fhmos_info.state_fall_released == 1) { - fhmos_data.state_fall_released == 0; + fhmos_info.state_fall_released = 0; - AppData.Buffer[i++] = (uint8_t) 0xff&(fhmos_data.time_stamp_fall_confirmed>>24); - AppData.Buffer[i++] = (uint8_t) 0xff&(fhmos_data.time_stamp_fall_confirmed>>16); - AppData.Buffer[i++] = (uint8_t) 0xff&(fhmos_data.time_stamp_fall_confirmed>>8); - AppData.Buffer[i++] = (uint8_t) 0xff&(fhmos_data.time_stamp_fall_confirmed); + AppData.Buffer[i++] = (uint8_t) 0xff&(fhmos_info.time_stamp_fall_confirmed>>24); + AppData.Buffer[i++] = (uint8_t) 0xff&(fhmos_info.time_stamp_fall_confirmed>>16); + AppData.Buffer[i++] = (uint8_t) 0xff&(fhmos_info.time_stamp_fall_confirmed>>8); + AppData.Buffer[i++] = (uint8_t) 0xff&(fhmos_info.time_stamp_fall_confirmed); } } // AppData.Buffer[i++] = 0x01; // payload type, 0x01= regular payload #if 0 - AppData.Buffer[i++] = fhmos_data.state_fall; - AppData.Buffer[i++] = fhmos_data.state_human_movement; - AppData.Buffer[i++] = fhmos_data.state_occupancy; - AppData.Buffer[i++] = fhmos_data.state_sos_alarm; + AppData.Buffer[i++] = fhmos_info.state_fall; + AppData.Buffer[i++] = fhmos_info.state_human_movement; + AppData.Buffer[i++] = fhmos_info.state_occupancy; + AppData.Buffer[i++] = fhmos_info.state_sos_alarm; - AppData.Buffer[i++] = fhmos_data.lamp_bar_color; - AppData.Buffer[i++] = fhmos_data.state_hall_1; - AppData.Buffer[i++] = fhmos_data.state_hall_2; - AppData.Buffer[i++] = fhmos_data.state_PIR; + AppData.Buffer[i++] = fhmos_info.lamp_bar_color; + AppData.Buffer[i++] = fhmos_info.state_hall_1; + AppData.Buffer[i++] = fhmos_info.state_hall_2; + AppData.Buffer[i++] = fhmos_info.state_PIR; #endif #elif defined(L8) @@ -1235,12 +1360,12 @@ static void SendTxData(void) sts_data->state_PIR = sts_pir_read;; AppData.Buffer[i++] = 8; - AppData.Buffer[i++] = fhmos_data.state_fall; - AppData.Buffer[i++] = fhmos_data.state_human_movement; - AppData.Buffer[i++] = fhmos_data.occupancy; - AppData.Buffer[i++] = fhmos_data.state_sos_alarm; - AppData.Buffer[i++] = fhmos_data.lamp_bar_color; - AppData.Buffer[i++] = fhmos_data.batteryLevel; + AppData.Buffer[i++] = fhmos_info.state_fall; + AppData.Buffer[i++] = fhmos_info.state_human_movement; + AppData.Buffer[i++] = fhmos_info.occupancy; + AppData.Buffer[i++] = fhmos_info.state_sos_alarm; + AppData.Buffer[i++] = fhmos_info.lamp_bar_color; + AppData.Buffer[i++] = fhmos_info.batteryLevel; @@ -1262,7 +1387,7 @@ static void SendTxData(void) AppData.Buffer[i++] = (uint8_t)(sts_m1_sensor_data.on_off_event & 0xFF); #endif //STS_M1 - AppData.BufferSize = i; + AppData.BufferSize = (i&(~sts_service_mask))&0xff; #ifdef CLOCK_SYNC if( IsClockSynched == false ) @@ -1321,11 +1446,18 @@ static void OnTxTimerEvent(void *context) APP_LOG(TS_OFF, VLEVEL_M, "\nSET TASK P4\r\n"); UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_YunhornSTSEventP4), CFG_SEQ_Prio_0); #endif - - UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0); + UTIL_TIMER_Stop(&TxTimer); + if (sts_warm_up_message_counter < 5) + { + //UTIL_TIMER_Stop(&TxTimer); + sts_warm_up_message_counter ++; + APP_LOG(TS_OFF, VLEVEL_M, "\r\n warm counter=%d \r\n", sts_warm_up_message_counter); + UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0); + UTIL_TIMER_Start(&TxTimer); + } /*Wait for next tx slot*/ - UTIL_TIMER_Start(&TxTimer); + /* USER CODE BEGIN OnTxTimerEvent_2 */ /* USER CODE END OnTxTimerEvent_2 */ @@ -1399,12 +1531,12 @@ static void OnJoinRequest(LmHandlerJoinParams_t *joinParams) } AppData.Port = 1; AppData.BufferSize = 16; - // UTIL_MEM_cpy_8(AppData.Buffer, (uint8_t*)"YUNHORN168", 10); UTIL_MEM_cpy_8((uint8_t*)AppData.Buffer, (uint8_t *)YUNHORN_STS_PRD_STRING, sizeof(YUNHORN_STS_PRD_STRING)); - AppData.BufferSize = 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; + } else { @@ -1414,6 +1546,12 @@ static void OnJoinRequest(LmHandlerJoinParams_t *joinParams) APP_LOG(TS_OFF, VLEVEL_H, "###### U/L FRAME:JOIN | DR:%d | PWR:%d\r\n", joinParams->Datarate, joinParams->TxPower); } + + UTIL_TIMER_Start(&YunhornSTSHeartBeatTimer); + + UTIL_TIMER_Start(&YunhornSTSSelfFunctionTestTimer); + + // UTIL_TIMER_Start(&TxTimer); // UTIL_TIMER_Start(&YunhornSTSWakeUpScanTimer); /* USER CODE END OnJoinRequest_1 */ } @@ -1703,7 +1841,7 @@ static void OnYunhornSTSDurationCheckTimerEvent(void *context) * @brief Yunhorn STS Occupancy RSS WakeUP timer callback function * @param context ptr of STS RSS WakeUp context */ - +#if 0 static void OnYunhornSTSOORSSWakeUpTimerEvent(void *context) { #ifdef STS_O6 @@ -1711,17 +1849,29 @@ static void OnYunhornSTSOORSSWakeUpTimerEvent(void *context) #endif } - +#endif /** * @brief Yunhorn STS Heart beat timer callback function * @param context ptr of context */ +static void OnYunhornSTSSelfFunctionTestStartEvent(void *context) +{ + +#if 1 + if ((!sts_function_test_success)&&(sts_warm_up_message_counter==5)) + { + + UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_YunhornSTSEventSelfTestProcess), CFG_SEQ_Prio_0); + sts_function_test_success = true; + } +#endif + +} static void OnYunhornSTSHeartBeatTimerEvent(void *context) { // UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_YunhornSTSEventRFAC), CFG_SEQ_Prio_0); UTIL_TIMER_Stop(&YunhornSTSHeartBeatTimer); - uint8_t appHeartBeatDataPort=2, appHeartBeatBufferSize=2, appHeartBeatDataBuffer[32]={0x0}; if ((rfac_timer <(STS_BURN_IN_RFAC+3))&&(sts_cfg_nvm.ac[0]==0x0)&&(sts_cfg_nvm.ac[19]==0x0)) @@ -1799,6 +1949,7 @@ void OnYunhornSTSHeartBeatPeriodicityChanged(uint32_t periodicity) } /* USER CODE BEGIN PrFD_YunhornSTSWakeUpScanTimerEvents */ +#if 0 static void OnYunhornSTSWakeUpScanTimerEvent(void *context) { #if defined(STS_P2)||defined(STS_T6)||defined(L8) @@ -1810,12 +1961,46 @@ static void OnYunhornSTSWakeUpScanTimerEvent(void *context) #endif } +#endif void STSWakeupScanTimerStop(void) { UTIL_TIMER_Stop(&YunhornSTSWakeUpScanTimer); } +void STS_SENSOR_Warm_Up(void) +{ + AppData.Port = 1; + AppData.BufferSize = 16; + char warm_up[30]="Yunhorn Technology Limited"; + UTIL_MEM_cpy_8((uint8_t*)AppData.Buffer, (uint8_t*)warm_up, sizeof(warm_up)); + //UTIL_MEM_cpy_8((uint8_t*)AppData.Buffer, (uint8_t *)YUNHORN_STS_PRD_STRING, sizeof(YUNHORN_STS_PRD_STRING)); + AppData.BufferSize = sizeof(AppData.Buffer); + LmHandlerErrorStatus_t status = LmHandlerSend(&AppData, LmHandlerParams.IsTxConfirmed, false); + if (LORAMAC_HANDLER_SUCCESS ==status ) + { + HAL_Delay(3000); + status = LmHandlerSend(&AppData, LmHandlerParams.IsTxConfirmed, false); + } + if (LORAMAC_HANDLER_SUCCESS ==status ) + { + HAL_Delay(3000); + status = LmHandlerSend(&AppData, LmHandlerParams.IsTxConfirmed, false); + } +} + +void STS_ClockSync_process(void) +{ + LmHandlerErrorStatus_t status = LORAMAC_HANDLER_ERROR; + if( IsClockSynched == false ) + { + status = LmhpClockSyncAppTimeReq( ); + + if (LORAMAC_HANDLER_SUCCESS == status) { + OnSysTimeUpdate(); + } + } +} uint32_t STS_Get_Date_Time_Stamp(void) { struct tm localtime={0}; diff --git a/LoRaWAN/Target/lorawan_conf.h b/LoRaWAN/Target/lorawan_conf.h index 443d818..d55512f 100644 --- a/LoRaWAN/Target/lorawan_conf.h +++ b/LoRaWAN/Target/lorawan_conf.h @@ -58,7 +58,7 @@ extern "C" { * - 0x01000400: Link Layer TS001-1.0.4 + Regional Parameters RP002-1.0.1 * - 0x01010100: soon available ... */ -#define LORAMAC_SPECIFICATION_VERSION 0x01000400 +#define LORAMAC_SPECIFICATION_VERSION 0x01010100 /*! * @brief Enable the additional LoRaWAN packages diff --git a/STM32CubeIDE/.cproject b/STM32CubeIDE/.cproject index 6abc669..d7995d6 100644 --- a/STM32CubeIDE/.cproject +++ b/STM32CubeIDE/.cproject @@ -99,7 +99,7 @@ - + @@ -218,7 +218,7 @@ - + diff --git a/STM32CubeIDE/.project b/STM32CubeIDE/.project index 2b2e8c8..4bc40e3 100644 --- a/STM32CubeIDE/.project +++ b/STM32CubeIDE/.project @@ -147,6 +147,11 @@ 1 copy_PARENT1/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_i2c_ex.c + + Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_iwdg.c + 1 + PARENT-6-PROJECT_LOC/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_iwdg.c + Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr.c 1 @@ -422,6 +427,11 @@ 1 copy_PARENT/Core/Src/i2c.c + + Application/User/Core/iwdg.c + 1 + PARENT-1-PROJECT_LOC/Core/Src/iwdg.c + Application/User/Core/main.c 1 diff --git a/STM32CubeIDE/.settings/language.settings.xml b/STM32CubeIDE/.settings/language.settings.xml index 9e6a728..6f79038 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 f85e725..3e63765 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 @@ -10,7 +10,7 @@ D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_S D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/Core/Src/dma.c \ D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/Core/Src/flash_if.c \ D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/Core/Src/gpio.c \ -D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/Core/Src/i2c.c \ +D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/Core/Src/iwdg.c \ D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/Core/Src/main.c \ D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/Core/Src/rtc.c \ D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/Core/Src/stm32_lpm_if.c \ @@ -35,7 +35,7 @@ OBJS += \ ./Application/User/Core/dma.o \ ./Application/User/Core/flash_if.o \ ./Application/User/Core/gpio.o \ -./Application/User/Core/i2c.o \ +./Application/User/Core/iwdg.o \ ./Application/User/Core/main.o \ ./Application/User/Core/rtc.o \ ./Application/User/Core/stm32_lpm_if.o \ @@ -60,7 +60,7 @@ C_DEPS += \ ./Application/User/Core/dma.d \ ./Application/User/Core/flash_if.d \ ./Application/User/Core/gpio.d \ -./Application/User/Core/i2c.d \ +./Application/User/Core/iwdg.d \ ./Application/User/Core/main.d \ ./Application/User/Core/rtc.d \ ./Application/User/Core/stm32_lpm_if.d \ @@ -91,7 +91,7 @@ Application/User/Core/flash_if.o: D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/ arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DL8 -DSERCO_PWH -DPIR -DCLOCK_SYNC -DO1L -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/Core/gpio.o: D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/Core/Src/gpio.c Application/User/Core/subdir.mk arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DL8 -DSERCO_PWH -DPIR -DCLOCK_SYNC -DO1L -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/Core/i2c.o: D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/Core/Src/i2c.c Application/User/Core/subdir.mk +Application/User/Core/iwdg.o: D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/Core/Src/iwdg.c Application/User/Core/subdir.mk arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DL8 -DSERCO_PWH -DPIR -DCLOCK_SYNC -DO1L -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/Core/main.o: D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/Core/Src/main.c Application/User/Core/subdir.mk arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DL8 -DSERCO_PWH -DPIR -DCLOCK_SYNC -DO1L -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 "$@" @@ -129,7 +129,7 @@ Application/User/Core/usart_if.o: D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/ clean: clean-Application-2f-User-2f-Core clean-Application-2f-User-2f-Core: - -$(RM) ./Application/User/Core/adc.cyclo ./Application/User/Core/adc.d ./Application/User/Core/adc.o ./Application/User/Core/adc.su ./Application/User/Core/adc_if.cyclo ./Application/User/Core/adc_if.d ./Application/User/Core/adc_if.o ./Application/User/Core/adc_if.su ./Application/User/Core/dma.cyclo ./Application/User/Core/dma.d ./Application/User/Core/dma.o ./Application/User/Core/dma.su ./Application/User/Core/flash_if.cyclo ./Application/User/Core/flash_if.d ./Application/User/Core/flash_if.o ./Application/User/Core/flash_if.su ./Application/User/Core/gpio.cyclo ./Application/User/Core/gpio.d ./Application/User/Core/gpio.o ./Application/User/Core/gpio.su ./Application/User/Core/i2c.cyclo ./Application/User/Core/i2c.d ./Application/User/Core/i2c.o ./Application/User/Core/i2c.su ./Application/User/Core/main.cyclo ./Application/User/Core/main.d ./Application/User/Core/main.o ./Application/User/Core/main.su ./Application/User/Core/rtc.cyclo ./Application/User/Core/rtc.d ./Application/User/Core/rtc.o ./Application/User/Core/rtc.su ./Application/User/Core/stm32_lpm_if.cyclo ./Application/User/Core/stm32_lpm_if.d ./Application/User/Core/stm32_lpm_if.o ./Application/User/Core/stm32_lpm_if.su ./Application/User/Core/stm32wlxx_hal_msp.cyclo ./Application/User/Core/stm32wlxx_hal_msp.d ./Application/User/Core/stm32wlxx_hal_msp.o ./Application/User/Core/stm32wlxx_hal_msp.su ./Application/User/Core/stm32wlxx_it.cyclo ./Application/User/Core/stm32wlxx_it.d ./Application/User/Core/stm32wlxx_it.o ./Application/User/Core/stm32wlxx_it.su ./Application/User/Core/stm32wlxx_nucleo_bus.cyclo ./Application/User/Core/stm32wlxx_nucleo_bus.d ./Application/User/Core/stm32wlxx_nucleo_bus.o ./Application/User/Core/stm32wlxx_nucleo_bus.su ./Application/User/Core/sts_lamp_bar.cyclo ./Application/User/Core/sts_lamp_bar.d ./Application/User/Core/sts_lamp_bar.o ./Application/User/Core/sts_lamp_bar.su ./Application/User/Core/subghz.cyclo ./Application/User/Core/subghz.d ./Application/User/Core/subghz.o ./Application/User/Core/subghz.su ./Application/User/Core/sys_app.cyclo ./Application/User/Core/sys_app.d ./Application/User/Core/sys_app.o ./Application/User/Core/sys_app.su ./Application/User/Core/sys_debug.cyclo ./Application/User/Core/sys_debug.d ./Application/User/Core/sys_debug.o ./Application/User/Core/sys_debug.su ./Application/User/Core/sys_sensors.cyclo ./Application/User/Core/sys_sensors.d ./Application/User/Core/sys_sensors.o ./Application/User/Core/sys_sensors.su ./Application/User/Core/syscalls.cyclo ./Application/User/Core/syscalls.d ./Application/User/Core/syscalls.o ./Application/User/Core/syscalls.su ./Application/User/Core/sysmem.cyclo ./Application/User/Core/sysmem.d ./Application/User/Core/sysmem.o ./Application/User/Core/sysmem.su ./Application/User/Core/tim.cyclo ./Application/User/Core/tim.d ./Application/User/Core/tim.o ./Application/User/Core/tim.su ./Application/User/Core/timer_if.cyclo ./Application/User/Core/timer_if.d ./Application/User/Core/timer_if.o ./Application/User/Core/timer_if.su ./Application/User/Core/usart.cyclo ./Application/User/Core/usart.d ./Application/User/Core/usart.o ./Application/User/Core/usart.su ./Application/User/Core/usart_if.cyclo ./Application/User/Core/usart_if.d ./Application/User/Core/usart_if.o ./Application/User/Core/usart_if.su + -$(RM) ./Application/User/Core/adc.cyclo ./Application/User/Core/adc.d ./Application/User/Core/adc.o ./Application/User/Core/adc.su ./Application/User/Core/adc_if.cyclo ./Application/User/Core/adc_if.d ./Application/User/Core/adc_if.o ./Application/User/Core/adc_if.su ./Application/User/Core/dma.cyclo ./Application/User/Core/dma.d ./Application/User/Core/dma.o ./Application/User/Core/dma.su ./Application/User/Core/flash_if.cyclo ./Application/User/Core/flash_if.d ./Application/User/Core/flash_if.o ./Application/User/Core/flash_if.su ./Application/User/Core/gpio.cyclo ./Application/User/Core/gpio.d ./Application/User/Core/gpio.o ./Application/User/Core/gpio.su ./Application/User/Core/iwdg.cyclo ./Application/User/Core/iwdg.d ./Application/User/Core/iwdg.o ./Application/User/Core/iwdg.su ./Application/User/Core/main.cyclo ./Application/User/Core/main.d ./Application/User/Core/main.o ./Application/User/Core/main.su ./Application/User/Core/rtc.cyclo ./Application/User/Core/rtc.d ./Application/User/Core/rtc.o ./Application/User/Core/rtc.su ./Application/User/Core/stm32_lpm_if.cyclo ./Application/User/Core/stm32_lpm_if.d ./Application/User/Core/stm32_lpm_if.o ./Application/User/Core/stm32_lpm_if.su ./Application/User/Core/stm32wlxx_hal_msp.cyclo ./Application/User/Core/stm32wlxx_hal_msp.d ./Application/User/Core/stm32wlxx_hal_msp.o ./Application/User/Core/stm32wlxx_hal_msp.su ./Application/User/Core/stm32wlxx_it.cyclo ./Application/User/Core/stm32wlxx_it.d ./Application/User/Core/stm32wlxx_it.o ./Application/User/Core/stm32wlxx_it.su ./Application/User/Core/stm32wlxx_nucleo_bus.cyclo ./Application/User/Core/stm32wlxx_nucleo_bus.d ./Application/User/Core/stm32wlxx_nucleo_bus.o ./Application/User/Core/stm32wlxx_nucleo_bus.su ./Application/User/Core/sts_lamp_bar.cyclo ./Application/User/Core/sts_lamp_bar.d ./Application/User/Core/sts_lamp_bar.o ./Application/User/Core/sts_lamp_bar.su ./Application/User/Core/subghz.cyclo ./Application/User/Core/subghz.d ./Application/User/Core/subghz.o ./Application/User/Core/subghz.su ./Application/User/Core/sys_app.cyclo ./Application/User/Core/sys_app.d ./Application/User/Core/sys_app.o ./Application/User/Core/sys_app.su ./Application/User/Core/sys_debug.cyclo ./Application/User/Core/sys_debug.d ./Application/User/Core/sys_debug.o ./Application/User/Core/sys_debug.su ./Application/User/Core/sys_sensors.cyclo ./Application/User/Core/sys_sensors.d ./Application/User/Core/sys_sensors.o ./Application/User/Core/sys_sensors.su ./Application/User/Core/syscalls.cyclo ./Application/User/Core/syscalls.d ./Application/User/Core/syscalls.o ./Application/User/Core/syscalls.su ./Application/User/Core/sysmem.cyclo ./Application/User/Core/sysmem.d ./Application/User/Core/sysmem.o ./Application/User/Core/sysmem.su ./Application/User/Core/tim.cyclo ./Application/User/Core/tim.d ./Application/User/Core/tim.o ./Application/User/Core/tim.su ./Application/User/Core/timer_if.cyclo ./Application/User/Core/timer_if.d ./Application/User/Core/timer_if.o ./Application/User/Core/timer_if.su ./Application/User/Core/usart.cyclo ./Application/User/Core/usart.d ./Application/User/Core/usart.o ./Application/User/Core/usart.su ./Application/User/Core/usart_if.cyclo ./Application/User/Core/usart_if.d ./Application/User/Core/usart_if.o ./Application/User/Core/usart_if.su .PHONY: clean-Application-2f-User-2f-Core diff --git a/STM32CubeIDE/Release/Application/User/LoRaWAN/App/subdir.mk b/STM32CubeIDE/Release/Application/User/LoRaWAN/App/subdir.mk index f7cc4b2..65c8e93 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 d7ad605..a11353d 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 b2e6241..63c75f4 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 72b511e..55b12d7 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 e7a9bbd..e5922cd 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/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 e703e10..e71993d 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 74cc73a..f0fdf6b 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 f9a98ba..1cd765c 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 5e5aa98..663b295 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 @@ -17,6 +17,7 @@ D:/ONEDRIVE/STM32WLV13/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_flash_ex.c D:/ONEDRIVE/STM32WLV13/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_gpio.c \ D:/ONEDRIVE/STM32WLV13/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_i2c.c \ D:/ONEDRIVE/STM32WLV13/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_i2c_ex.c \ +D:/ONEDRIVE/STM32WLV13/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_iwdg.c \ D:/ONEDRIVE/STM32WLV13/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_pwr.c \ D:/ONEDRIVE/STM32WLV13/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_pwr_ex.c \ D:/ONEDRIVE/STM32WLV13/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_rcc.c \ @@ -43,6 +44,7 @@ OBJS += \ ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_gpio.o \ ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c.o \ ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c_ex.o \ +./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_iwdg.o \ ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr.o \ ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr_ex.o \ ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc.o \ @@ -69,6 +71,7 @@ C_DEPS += \ ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_gpio.d \ ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c.d \ ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c_ex.d \ +./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_iwdg.d \ ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr.d \ ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr_ex.d \ ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc.d \ @@ -108,6 +111,8 @@ Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c.o: D:/ONEDRIVE/STM32WLV13/Drivers arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DL8 -DSERCO_PWH -DPIR -DCLOCK_SYNC -DO1L -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 "$@" Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c_ex.o: D:/ONEDRIVE/STM32WLV13/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_i2c_ex.c Drivers/STM32WLxx_HAL_Driver/subdir.mk arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DL8 -DSERCO_PWH -DPIR -DCLOCK_SYNC -DO1L -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 "$@" +Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_iwdg.o: D:/ONEDRIVE/STM32WLV13/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_iwdg.c Drivers/STM32WLxx_HAL_Driver/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DL8 -DSERCO_PWH -DPIR -DCLOCK_SYNC -DO1L -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 "$@" Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr.o: D:/ONEDRIVE/STM32WLV13/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_pwr.c Drivers/STM32WLxx_HAL_Driver/subdir.mk arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DL8 -DSERCO_PWH -DPIR -DCLOCK_SYNC -DO1L -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 "$@" Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr_ex.o: D:/ONEDRIVE/STM32WLV13/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_pwr_ex.c Drivers/STM32WLxx_HAL_Driver/subdir.mk @@ -136,7 +141,7 @@ Drivers/STM32WLxx_HAL_Driver/stm32wlxx_ll_adc.o: D:/ONEDRIVE/STM32WLV13/Drivers/ clean: clean-Drivers-2f-STM32WLxx_HAL_Driver clean-Drivers-2f-STM32WLxx_HAL_Driver: - -$(RM) ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_cortex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_cortex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_cortex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_cortex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_exti.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_exti.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_exti.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_exti.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_gpio.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_gpio.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_gpio.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_gpio.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_subghz.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_subghz.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_subghz.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_subghz.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_ll_adc.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_ll_adc.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_ll_adc.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_ll_adc.su + -$(RM) ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_adc_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_cortex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_cortex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_cortex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_cortex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_dma_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_exti.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_exti.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_exti.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_exti.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_gpio.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_gpio.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_gpio.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_gpio.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_iwdg.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_iwdg.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_iwdg.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_iwdg.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rtc_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_subghz.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_subghz.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_subghz.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_subghz.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_tim_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart_ex.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart_ex.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart_ex.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_uart_ex.su ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_ll_adc.cyclo ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_ll_adc.d ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_ll_adc.o ./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_ll_adc.su .PHONY: clean-Drivers-2f-STM32WLxx_HAL_Driver diff --git a/STM32CubeIDE/Release/L8A_2025_0408_R1.elf b/STM32CubeIDE/Release/L8A_2025_0408_R1.elf new file mode 100644 index 0000000..b9bf4c3 Binary files /dev/null and b/STM32CubeIDE/Release/L8A_2025_0408_R1.elf differ diff --git a/STM32CubeIDE/Release/L8A_2025_04_08_R1.bin b/STM32CubeIDE/Release/L8A_2025_04_08_R1.bin new file mode 100644 index 0000000..55a96a0 Binary files /dev/null and b/STM32CubeIDE/Release/L8A_2025_04_08_R1.bin differ diff --git a/STM32CubeIDE/Release/Middlewares/LoRaWAN/subdir.mk b/STM32CubeIDE/Release/Middlewares/LoRaWAN/subdir.mk index ba0a44b..eae0ba4 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 b9ca60b..da9d856 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/STS_L8_20250418_debug.bin b/STM32CubeIDE/Release/STS_L8_20250418_debug.bin new file mode 100644 index 0000000..0c888b1 Binary files /dev/null and b/STM32CubeIDE/Release/STS_L8_20250418_debug.bin differ diff --git a/STM32CubeIDE/Release/STS_L8_GOOD_20250418.bin b/STM32CubeIDE/Release/STS_L8_GOOD_20250418.bin new file mode 100644 index 0000000..2a17682 Binary files /dev/null and b/STM32CubeIDE/Release/STS_L8_GOOD_20250418.bin differ diff --git a/STM32CubeIDE/Release/Utilities/subdir.mk b/STM32CubeIDE/Release/Utilities/subdir.mk index de816b4..826d8ef 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.bin b/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin index d828b0c..52154a4 100644 Binary files a/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin and b/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin differ diff --git a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf index 5f27c32..0d01ba8 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 36e5c5c..20dc099 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 4110fdd..3380d01 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/STM32CubeIDE/Release/sts_l8_debug_pwh_20250519r1.bin b/STM32CubeIDE/Release/sts_l8_debug_pwh_20250519r1.bin new file mode 100644 index 0000000..a02394c Binary files /dev/null and b/STM32CubeIDE/Release/sts_l8_debug_pwh_20250519r1.bin differ diff --git a/STM32CubeIDE/Release/sts_l8_rtm_pwh_f2_accessories_20250619r1.bin b/STM32CubeIDE/Release/sts_l8_rtm_pwh_f2_accessories_20250619r1.bin new file mode 100644 index 0000000..f295c3e Binary files /dev/null and b/STM32CubeIDE/Release/sts_l8_rtm_pwh_f2_accessories_20250619r1.bin differ diff --git a/STS/Core/Inc/yunhorn_sts_prd_conf.h b/STS/Core/Inc/yunhorn_sts_prd_conf.h index c119276..8c5ccc4 100644 --- a/STS/Core/Inc/yunhorn_sts_prd_conf.h +++ b/STS/Core/Inc/yunhorn_sts_prd_conf.h @@ -186,8 +186,8 @@ /* General Settings */ #define MajorVer 25U -#define MinorVer 1U -#define SubMinorVer 8U +#define MinorVer 5U +#define SubMinorVer 19U #define FirmwareVersion 3U #define YUNHORN_STS_MAX_NVM_CFG_SIZE 64U #define YUNHORN_STS_AC_CODE_SIZE 20U diff --git a/STS/Core/Inc/yunhorn_sts_sensors.h b/STS/Core/Inc/yunhorn_sts_sensors.h index cf068d6..126b14a 100644 --- a/STS/Core/Inc/yunhorn_sts_sensors.h +++ b/STS/Core/Inc/yunhorn_sts_sensors.h @@ -464,6 +464,9 @@ void OnRestoreSTSCFGContextRequest(uint8_t *cfg_in_nvm); void STS_REBOOT_CONFIG_Init(void); +void STS_Sensor_Init(void); +void STS_Sensor_Prepare(void); + /** * @brief Apply/Process config to board */ @@ -513,7 +516,7 @@ void OnSensorPIR1StateChanged(void); void STS_FHMOS_sensor_upload_map(uint8_t map_index); uint32_t STS_Get_Date_Time_Stamp(void);//uint32_t *time_stamp, uint8_t *datetimestamp); - +void STS_ClockSync_process(void); void STS_Reed_Hall_Presence_Detection(void); void STS_SENSOR_Upload_Config_Invalid_Message(void); @@ -531,6 +534,7 @@ void STS_SENSOR_Function_Test_Process(void); void STS_SENSOR_Distance_Test_Process(void); void STS_PRESENCE_SENSOR_Function_Test_Process(uint8_t *self_test_result, uint8_t count); void STS_PRESENCE_SENSOR_Distance_Measure_Process(void); +void STS_TOF_L8_Init(void); void STS_TOF_L8_Process(void); void STS_TOF_L8_Reconfig(void); void MX_53L8A1_ThresholdDetection_ConfigIT(uint32_t sts_low_threshold, uint32_t sts_high_threshold); @@ -541,7 +545,7 @@ void STS_FHMOS_sensor_config_update(void); void sts_generate_fall_gesture_map(void); void STSWakeupScanTimerStop(void); void STSWakeupScanTimerStart(void); - +void STS_SENSOR_Warm_Up(void); /* USER CODE BEGIN Private defines */ /* In this example TIM2 input clock (TIM2CLK) is set to APB1 clock (PCLK1), diff --git a/STS/Core/Src/yunhorn_sts_process.c b/STS/Core/Src/yunhorn_sts_process.c index 5005506..be8e0e4 100644 --- a/STS/Core/Src/yunhorn_sts_process.c +++ b/STS/Core/Src/yunhorn_sts_process.c @@ -79,14 +79,20 @@ volatile uint8_t sts_head_level_low =0, last_head_level_low_state=0; extern volatile uint8_t fhmos_gesture_bitmap[8]; extern volatile sts_fhmos_sensor_data_t fhmos_data; extern volatile uint8_t sts_mask_bitmap[8]; +extern uint32_t sts_warm_up_message_counter; #endif volatile sts_cfg_nvm_t sts_cfg_nvm = { sts_mtmcode1, sts_mtmcode2, sts_version, sts_hardware_ver, +#if defined(STS_L8) + 0x0A, //Regular TxPeriodicity interval + 'M', //Uplink data interval unit, for heart-beat uplink +#else 0x05, //Regular TxPeriodicity interval 'M', //Uplink data interval unit, for heart-beat uplink +#endif #if defined(STS_P2)||defined(L8)||defined(STS_O6T)||defined(STS_T6) 0x01, //Heart-beat interval or Sampling interval 'S', //Sampling sensor interval unit, for real-time sensing of MEMS @@ -226,7 +232,7 @@ volatile uint8_t sts_water_leakage_changed_flag=0; volatile uint8_t sts_reed_hall_1_result=STS_Status_Door_Open, sts_reed_hall_2_result=STS_Status_SOS_Release; volatile uint8_t sts_reed_hall_3_result, sts_reed_hall_4_result; volatile uint8_t sts_fhmos_result=STS_FHMOS_FALL_STATE_NO_OCCUPY; -volatile uint8_t sts_fhmos_bitmap_pending=0; +volatile uint8_t sts_fhmos_bitmap_pending=FHMOS_BITMAP_BLANK; #endif @@ -524,6 +530,7 @@ void STS_YunhornSTSEventP4_Process(void) */ void STS_YunhornSTSEventP5_Process(void) { + #ifdef STS_P2 STS_TOF_VL53LX_PeopleCounting_Process_Start(); #elif defined(STS_T6) @@ -537,6 +544,7 @@ void STS_YunhornSTSEventP5_Process(void) #elif defined(L8) //STS_TOF_VL53L8X_Process(); //printf("\r\n P5 process \r\n"); + STSWakeupScanTimerStop(); STS_TOF_L8_Process(); @@ -552,14 +560,15 @@ void STS_YunhornSTSEventP5_Process(void) } #if 1 - if (sts_fhmos_bitmap_pending == 1) + if (sts_fhmos_bitmap_pending == FHMOS_BITMAP_GENERATED) { - APP_LOG(TS_OFF, VLEVEL_M, "\r\n Upload Fall Gesture Type 2 \r\n"); + APP_LOG(TS_OFF, VLEVEL_M, "\r\n Upload Fall Gesture Type 2 , status=%d \r\n", sts_fhmos_bitmap_pending); STS_FHMOS_sensor_upload_map(0x02); } #endif + STSWakeupScanTimerStart(); #endif } @@ -1253,6 +1262,32 @@ void USER_APP_AUTO_RESPONDER_Parse(uint8_t *parse_buffer, uint8_t parse_buffer_s #endif STS_SENSOR_Upload_Message(YUNHORN_STS_USER_APP_CTRL_REPLY_PORT, i, (uint8_t *)outbuf); + break; + case 'G': /* "YZG": Ambient Height scan process */ + STS_LMZ_Ambient_Height_Scan_Process(); + i = 0; + outbuf[i++] = (uint8_t)'G'; + outbuf[i++] = (uint8_t)sts_mtmcode1; + outbuf[i++] = (uint8_t)sts_mtmcode2; + outbuf[i++] = (uint8_t)sts_version; + outbuf[i++] = (uint8_t)sts_hardware_ver; + outbuf[i++] = (uint8_t)(99*((GetBatteryLevel()/254)&0xff)); + outbuf[i++] = (uint8_t) (12)&0xff; //length of following data + outbuf[i++] = (uint8_t) (sensor_id >>8)&0xFF; + outbuf[i++] = (uint8_t) (sensor_id) & 0xFF; + outbuf[i++] = (uint8_t) (sts_sensor_install_height>>8)&0xff; // MSB of sensor height + outbuf[i++] = (uint8_t) (sts_sensor_install_height)&0xff; // LSB of sensor height + // MASK OFF BITMAP + outbuf[i++] = (uint8_t) (sts_mask_bitmap[0]); + outbuf[i++] = (uint8_t) (sts_mask_bitmap[1]); + outbuf[i++] = (uint8_t) (sts_mask_bitmap[2]); + outbuf[i++] = (uint8_t) (sts_mask_bitmap[3]); + outbuf[i++] = (uint8_t) (sts_mask_bitmap[4]); + outbuf[i++] = (uint8_t) (sts_mask_bitmap[5]); + outbuf[i++] = (uint8_t) (sts_mask_bitmap[6]); + outbuf[i++] = (uint8_t) (sts_mask_bitmap[7]); + STS_SENSOR_Upload_Message(YUNHORN_STS_USER_APP_CTRL_REPLY_PORT, i, (uint8_t *)outbuf); + break; case 'M': /* "YZM": Mask level */ i = 0; @@ -1664,7 +1699,7 @@ void OnStoreSTSCFGContextRequest(void) { /* USER CODE BEGIN OnStoreContextRequest_1 */ uint8_t i=0,j=0; - uint8_t to_store__value[YUNHORN_STS_MAX_NVM_CFG_SIZE]={0x0}; /* KEEP THIS LOCAL */ + uint8_t to_store__value[2*YUNHORN_STS_MAX_NVM_CFG_SIZE]={0x0}; /* KEEP THIS LOCAL */ sts_cfg_nvm.length = STS_NVM_CFG_SIZE; to_store__value[i++] = sts_cfg_nvm.mtmcode1; to_store__value[i++] = sts_cfg_nvm.mtmcode2; @@ -1725,7 +1760,7 @@ void OnStoreSTSCFGContextRequest(void) if (FLASH_IF_Erase(STS_CONFIG_NVM_BASE_ADDRESS, FLASH_PAGE_SIZE) == FLASH_IF_OK) { - FLASH_IF_Write(STS_CONFIG_NVM_BASE_ADDRESS, (const void *)to_store__value, YUNHORN_STS_MAX_NVM_CFG_SIZE); + FLASH_IF_Write(STS_CONFIG_NVM_BASE_ADDRESS, (const void *)to_store__value, 2*YUNHORN_STS_MAX_NVM_CFG_SIZE); } /* USER CODE BEGIN OnStoreContextRequest_Last */ @@ -1828,11 +1863,9 @@ void OnRestoreSTSCFGContextProcess(void) } else if ((char) sts_cfg_nvm.unit =='S') { periodicity *= 1; } - periodicity = (periodicity > 10)? periodicity : 10; // in seconds unit - - APP_LOG(TS_OFF, VLEVEL_M, "\n\n Tx periodicity in NVM =%u sec\n",periodicity); - - TxPeriodicity= periodicity*1000; // to ms + //periodicity = (periodicity > 10)? periodicity : 10; // in seconds unit + //APP_LOG(TS_OFF, VLEVEL_M, "\n\n Tx periodicity in NVM =%u sec\n",periodicity); + //TxPeriodicity= periodicity*1000; // to ms uint32_t sampling_heartbeat_periodicity = (sts_cfg_nvm.sampling); //Heart-beat or Sampling interval if ((char)sts_cfg_nvm.s_unit =='M') { @@ -1842,24 +1875,27 @@ void OnRestoreSTSCFGContextProcess(void) } else if ((char) sts_cfg_nvm.s_unit =='S') { sampling_heartbeat_periodicity *= 1; } - +#if defined(STS_L8) + STS_HeartBeatTimerPeriod_sec = periodicity; + APP_LOG(TS_OFF, VLEVEL_M, "\n\n Heartbeat periodicity in NVM =%u sec\n",STS_HeartBeatTimerPeriod_sec); +#else STS_HeartBeatTimerPeriod_sec = sampling_heartbeat_periodicity; - APP_LOG(TS_OFF, VLEVEL_H, "\n\n sampling or heartbeat periodicity in NVM =%u sec\n",sampling_heartbeat_periodicity); - - + APP_LOG(TS_OFF, VLEVEL_M, "\n\n sampling or heartbeat periodicity in NVM =%u sec\n",sampling_heartbeat_periodicity); +#endif + OnYunhornSTSHeartBeatPeriodicityChanged(STS_HeartBeatTimerPeriod_sec*1000); //TODO XXXX if ((sts_cfg_nvm.ac[0] ==0x0 )&& (sts_cfg_nvm.ac[19]==0x0)) { // ensure it's not in production yet OnYunhornSTSTxPeriodicityChanged(APP_TX_DUTYCYCLE); // in msec unit - OnYunhornSTSHeartBeatPeriodicityChanged(APP_TX_DUTYCYCLE*5); //TODO XXXX + //OnYunhornSTSHeartBeatPeriodicityChanged(STS_HeartBeatTimerPeriod_sec*1000); //TODO XXXX //OnTxPeriodicityChanged(10000); // APP_TX_DUTYCYCLE in msec unit TxPeriodicity = APP_TX_DUTYCYCLE; } else { - OnYunhornSTSTxPeriodicityChanged(TxPeriodicity); // in msec unit + //OnYunhornSTSTxPeriodicityChanged(TxPeriodicity); // in msec unit //OnTxPeriodicityChanged(TxPeriodicity); //Heart-beat or Sampling interval //sampling_heartbeat_periodicity = (sampling_heartbeat_periodicity > 0)? sampling_heartbeat_periodicity : 1; // in seconds unit @@ -1928,6 +1964,7 @@ void STS_FHMOS_sensor_config_init(void) sts_high_threshold = sts_cfg_nvm.sensor_install_height_in_10cm*100; sts_low_threshold = sts_high_threshold - 1400; + APP_LOG(TS_OFF, VLEVEL_M, "\r\n FHMOS cfg high= %4d low= %4d \r\n", sts_high_threshold, sts_low_threshold); } void STS_FHMOS_sensor_config_update() @@ -2005,8 +2042,8 @@ void STS_FHMOS_sensor_upload_map(uint8_t map_index) APP_LOG(TS_OFF, VLEVEL_M, "\r\n Bitmap uploading, size=%02x\r\n", i); STS_SENSOR_Upload_Message(YUNHORN_STS_L8_LORA_APP_DATA_PORT, i, (uint8_t *)tstbuf); - sts_fhmos_bitmap_pending = 2; - APP_LOG(TS_OFF, VLEVEL_M, "\r\n +++++++++++++++++++++++ \r\nBitmap Pending uploaded\r\n"); + sts_fhmos_bitmap_pending = FHMOS_BITMAP_FINISHED; // 2; + APP_LOG(TS_OFF, VLEVEL_M, "\r\n +++++++++++++++++++++++ \r\nBitmap Pending uploaded, fhmos_bitmap_statue=%d\r\n", sts_fhmos_bitmap_pending); } #endif @@ -2031,6 +2068,9 @@ static void STS_Show_STS_CFG_NVM(uint8_t * store_value) } void STS_SENSOR_Distance_Test_Process(void) { + uint8_t prev_sts_lamp_bar_color = sts_lamp_bar_color; + sts_lamp_bar_color = STS_PINK; + #ifdef YUNHORN_STS_O6_ENABLED sts_distance_rss_distance =0; do { @@ -2050,20 +2090,24 @@ void STS_SENSOR_Distance_Test_Process(void) do { range_once = (uint16_t)MX_TOF_Ranging_Process(); + APP_LOG(TS_OFF, VLEVEL_M, "\r\n Repeat=%d Distance=%d \r\n", rpt, range_once); if (range_once > 0) { rpt++; range_sum += range_once ; } - HAL_Delay(150); + HAL_Delay(10); }while (rpt<3); sts_sensor_install_height = range_sum/rpt; APP_LOG(TS_OFF, VLEVEL_L, "\n STS SENSOR INSTALLATION HEIGHT =%d mm\n\r", (uint16_t)sts_sensor_install_height); + sts_lamp_bar_color = STS_CYAN; STS_LMZ_Ambient_Height_Scan_Process(); + sts_lamp_bar_color = prev_sts_lamp_bar_color; + STSWakeupScanTimerStart(); #endif #if defined(VL53L0) @@ -2076,15 +2120,15 @@ void STS_SENSOR_Distance_Test_Process(void) void STS_SENSOR_MEMS_Get_ID(uint16_t *devID) { -#ifdef VL53LX +//#ifdef VL53LX *devID = sensor_id; -#endif +//#endif } void STS_SENSOR_Function_Test_Process(void) { char tstbuf[128] =""; uint8_t i=0; - + uint16_t my_id=0; tstbuf[i++] = (uint8_t) 'S'; tstbuf[i++] = (uint8_t) sts_mtmcode1; tstbuf[i++] = (uint8_t) sts_mtmcode2; @@ -2093,10 +2137,10 @@ void STS_SENSOR_Function_Test_Process(void) tstbuf[i++] = (uint8_t) (99*GetBatteryLevel()/254)&0xff; #if (defined(STS_P2)||defined(STS_T6))||defined(L8) - STS_SENSOR_MEMS_Get_ID(&sensor_id); - APP_LOG(TS_OFF, VLEVEL_M, "\r\n Sensor id =%04x \r\n", sensor_id); + STS_SENSOR_MEMS_Get_ID(&my_id); + APP_LOG(TS_OFF, VLEVEL_M, "\r\n Sensor id =%04x \r\n", my_id); #if defined(L8) - if (((sensor_id & 0xff)!= 0x0C) && (((sensor_id >>8) & 0xFF)!=0xF0)) // no VL53L8X found + if (((my_id & 0xff)!= 0x0C) && (((my_id >>8) & 0xFF)!=0xF0)) // no VL53L8X found { tstbuf[i++] = (uint8_t) 'X'; // Slave MEMS Not Avaliable } @@ -2108,6 +2152,7 @@ void STS_SENSOR_Function_Test_Process(void) #endif else { + STS_SENSOR_Distance_Test_Process(); APP_LOG(TS_OFF, VLEVEL_M, "\nSensor Install Height =%4d mm\n", sts_sensor_install_height); tstbuf[i++] = (uint8_t) (12)&0xff; //length of following data @@ -2501,9 +2546,9 @@ void YunhornSTSDurationCheckTimer(void) over_threshold |= 1<<6; // upload state confirm message - if (sts_fhmos_bitmap_pending == 0) + if (sts_fhmos_bitmap_pending == FHMOS_BITMAP_BLANK) { - //APP_LOG(TS_OFF, VLEVEL_M, "\r\nGenerate Fall Gesture Map\r\n"); + APP_LOG(TS_OFF, VLEVEL_M, "\r\nGenerate Fall Gesture Map, bitmap stateu=%d \r\n", sts_fhmos_bitmap_pending); UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0); //APP_LOG(TS_OFF, VLEVEL_M, "\r\nGenerate Fall Gesture Map\r\n"); @@ -2550,9 +2595,10 @@ void YunhornSTSDurationCheckTimer(void) //fhmos_data.head_low_level_start_time = 0; fhmos_data.head_low_level_duration = 0; - fhmos_data.state_fall = STS_FHMOS_FALL_STATE_NORMAL; + if (STS_Status_Door_Close == sts_hall1_read) + fhmos_data.state_fall = STS_FHMOS_FALL_STATE_NORMAL; // 2025 04 18 fhmos_data.state_fall_released = 1; - sts_fhmos_bitmap_pending = 0; + sts_fhmos_bitmap_pending = FHMOS_BITMAP_BLANK; over_threshold &= ~0x40; over_threshold &= ~0x80; @@ -3037,13 +3083,15 @@ void OnSensorL8AStateChanged(void) sts_fhmos_state_changed = 1; - } else if ((sts_head_level_low == 0) && (last_head_level_low_state ==1)&&(STS_Status_Door_Close==sts_hall1_read)) + } else if ((sts_head_level_low == 0) && (last_head_level_low_state ==1)) { fhmos_data.head_low_level_stop_time = sensor_event_time.Seconds; fhmos_data.state_fall = STS_FHMOS_FALL_STATE_NORMAL; APP_LOG(TS_OFF, VLEVEL_L, "\r\n Head Level Rise up or Out of Focus Area ++++++++++ \r\n"); sts_fhmos_state_changed = 1; fhmos_data.state_fall_released = 1; + } else { + sts_fhmos_state_changed = 0; } } diff --git a/STS/TOF/App/app_tof.c b/STS/TOF/App/app_tof.c index 1162737..1bd0b06 100644 --- a/STS/TOF/App/app_tof.c +++ b/STS/TOF/App/app_tof.c @@ -57,6 +57,10 @@ extern volatile uint8_t sts_fhmos_bitmap_pending; #include "stm32wlxx_nucleo.h" static int to_confirm = 0; static uint32_t STS_Get_Center_Range_Distance(RANGING_SENSOR_Result_t *Result); +#if defined(NARROW_CUBICLE) +static uint8_t rio_edge[36]={0,1,2,3,4,5,6,7,8,15,16,23,24,31,32,39,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; +#endif +//uint8_t rio_edge[34]={0,1,2,3,4,5,6,7,8,15,16,23,24,31,32,39,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; /* Private typedef -----------------------------------------------------------*/ /* * The application is to showcase the threshold detection @@ -153,7 +157,7 @@ void MX_TOF_Init(void) /* USER CODE END TOF_Init_PreTreatment */ /* Initialize the peripherals and the TOF components */ - //APP_LOG(TS_OFF,VLEVEL_L,"\r\n###################### MX TOF Init... \r\n"); + APP_LOG(TS_OFF,VLEVEL_M,"\r\n###################### MX TOF Init... \r\n"); //MX_53L1A2_SimpleRanging_Init(); //STS_TOF_VL53LX_PeopleCounting_Process(); @@ -164,7 +168,7 @@ void MX_TOF_Init(void) //sts_high_threshold = sts_cfg_nvm.sensor_install_height_in_10cm ; //sts_low_threshold = sts_cfg_nvm.sensor_install_height_in_10cm -1400; STS_TOF_L8_Reconfig(); - + //int range=MX_TOF_Ranging_Process(); #elif defined(STS_R1D) XWL55_WLE5_53L0X_Init(); #endif @@ -184,6 +188,13 @@ void STS_LMZ_Ambient_Height_Scan_Process(void) #if 1 uint8_t i=0; uint32_t range_distance =0; + uint8_t j=0; + uint16_t bg_distance[64]={0}; + uint8_t idx[64]={0}; + uint8_t IDX_LEN=10; + + uint8_t prev_sts_lamp_bar_color = sts_lamp_bar_color; + sts_lamp_bar_color = STS_BLUE; for (i=0; i<64; i++) { @@ -192,9 +203,10 @@ void STS_LMZ_Ambient_Height_Scan_Process(void) } for (i=0;i<8;i++) sts_mask_bitmap[i] =0x0; - - uint8_t rio_edge[34]={0,1,2,3,4,5,6,7,8,15,16,23,24,31,32,39,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; - +//#if defined(NARROW_CUBICLE) +// uint8_t rio_edge[34]={0,1,2,3,4,5,6,7,8,15,16,23,24,31,32,39,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; +//#endif + // uint8_t rio_edge[34]={0,1,2,3,4,5,6,7,8,15,16,23,24,31,32,39,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; // printf("sts sensor install height = %4d \r\n", (int)sts_sensor_install_height); @@ -203,41 +215,85 @@ void STS_LMZ_Ambient_Height_Scan_Process(void) //APP_LOG(TS_OFF, VLEVEL_M, "\r\nReconfig ----> Threshold High=%d mm, Low=%d mm \r\n", sts_high_threshold, sts_low_threshold); STS_TOF_L8_Reconfig(); - +#if 1 status = VL53L8A1_RANGING_SENSOR_Start(VL53L8A1_DEV_CENTER, RS_MODE_ASYNC_CONTINUOUS); if (status != BSP_ERROR_NONE) { - printf("VL53L8A1_RANGING_SENSOR_Start failed\n"); + APP_LOG(TS_OFF, VLEVEL_M, "\r\nVL53L8A1_RANGING_SENSOR_Start failed\n"); while (1); } +#endif - if (ToF_EventDetected != 0) + for (j=0; j < IDX_LEN; j++) { - ToF_EventDetected = 0; - status = VL53L8A1_RANGING_SENSOR_GetDistance(VL53L8A1_DEV_CENTER, &Result); - if (status != BSP_ERROR_NONE) - { - APP_LOG(TS_OFF, VLEVEL_M, "\r\n x \r\n"); - } + + //APP_LOG(TS_OFF, VLEVEL_M, "\r\n Cycle:%d \r\n", j); + MX_53L8A1_ThresholdDetection_Process(); + + //if (ToF_EventDetected != 0) + { + // ToF_EventDetected = 0; + // status = VL53L8A1_RANGING_SENSOR_GetDistance(VL53L8A1_DEV_CENTER, &Result); + //if (status != BSP_ERROR_NONE) + //{ + //APP_LOG(TS_OFF, VLEVEL_M, "\r\n x \r\n"); + //} else { + for (i = 0; i < 64; i++) + { + if (i % 8 ==0) { + APP_LOG(TS_OFF, VLEVEL_H, "\r\n[cm] "); + } + //if ((Result.ZoneResult[i].NumberOfTargets > 0)) + //{ + bg_distance[i] += (uint16_t) Result.ZoneResult[i].Distance[0]; + idx[i] ++; + APP_LOG(TS_OFF, VLEVEL_H, "|%3d ", Result.ZoneResult[i].Distance[0]/10); + //} + //else APP_LOG(TS_OFF, VLEVEL_H, "|%3d ", 0); + + } + + //} + } + HAL_Delay(10); + } + + APP_LOG(TS_OFF, VLEVEL_H, "\r\n\n\nAverage Distance==\r\n"); + for (i=0; i< 64; i++) + { + if (i%8==0) APP_LOG(TS_OFF, VLEVEL_H, "\r\n %2d ", i); + bg_distance[i] /= idx[i]; + APP_LOG(TS_OFF, VLEVEL_H, "|%3d ", bg_distance[i]/10); } //STS_TOF_L8_Process(); - APP_LOG(TS_OFF, VLEVEL_L, "\r\n ----------------------" - "\r\n------Gesture Mask off above Threshold %d cm--\r\n", fhmos_cfg.th_gesture_mask_off_height_cm); + APP_LOG(TS_OFF, VLEVEL_L, "\r\n------Gesture Mask off above Threshold %d cm--\r\n", fhmos_cfg.th_gesture_mask_off_height_cm); for (uint8_t i = 0; i < 64; i++) { /* Print distance and status */ if (i%8==0) APP_LOG(TS_OFF, VLEVEL_L, "\r\n[cm]|"); - if ((Result.ZoneResult[i].NumberOfTargets > 0)) + // if ((Result.ZoneResult[i].NumberOfTargets > 0)) + if (1) { - range_distance = (uint32_t)Result.ZoneResult[i].Distance[0]; + // range_distance = (uint32_t)Result.ZoneResult[i].Distance[0]; + range_distance = (uint16_t)bg_distance[i]; // mm + if (sts_sensor_install_height > range_distance) + { + fhmos_bg.h2cm[i] = (sts_sensor_install_height - range_distance)/10; + } else { - fhmos_bg.h2cm[i] = abs(sts_sensor_install_height - range_distance)/20; // in 2 cm + fhmos_bg.h2cm[i] = 0; + } - if (2*fhmos_bg.h2cm[i] < fhmos_cfg.th_gesture_mask_off_height_cm) + + //fhmos_bg.h2cm[i] = (uint16_t)(0, (sts_sensor_install_height/10 - range_distance)); // in cm + + APP_LOG(TS_OFF, VLEVEL_L, "|%3d ", (uint16_t)fhmos_bg.h2cm[i]); + + if ((uint16_t)fhmos_bg.h2cm[i] < (uint16_t)(fhmos_cfg.th_gesture_mask_off_height_cm)) { fhmos_bg.maskoff[i] = 0; } else @@ -248,7 +304,7 @@ void STS_LMZ_Ambient_Height_Scan_Process(void) //sts_mask_bitmap[(uint8_t)(i/8)] |= (fhmos_bg.maskoff[i])<<(7-i%8); // sts_mask_bitmap[(uint8_t)(i/8)] |= (fhmos_bg.maskoff[i])<<(7-i%8); // 2025-JAN-03 update // if (i%8==0) APP_LOG(TS_OFF, VLEVEL_M, "\r\n"); - APP_LOG(TS_OFF, VLEVEL_L, "|%3d ", fhmos_bg.h2cm[i]*2); + //APP_LOG(TS_OFF, VLEVEL_L, "|%3d ", fhmos_bg.h2cm[i]*2); } else { @@ -269,11 +325,12 @@ void STS_LMZ_Ambient_Height_Scan_Process(void) APP_LOG(TS_OFF, VLEVEL_L, "|%d ", (uint8_t)fhmos_bg.maskoff[i]); } +#if defined(NARROW_CUBICLE) for (i=0; i<34; i++) { fhmos_bg.maskoff[rio_edge[i]] = 1; } - +#endif APP_LOG(TS_OFF, VLEVEL_L, "\r\n\n ------- After Remove Edge \r\n"); for (i=0; i<64; i++) @@ -291,6 +348,9 @@ void STS_LMZ_Ambient_Height_Scan_Process(void) #endif + +sts_lamp_bar_color = prev_sts_lamp_bar_color; + } void sts_generate_fall_gesture_map(void) @@ -366,15 +426,15 @@ void sts_generate_fall_gesture_map(void) #if 0 for (i=0; i<64; i++) { - if (i%8==0) printf("\r\n"); - printf("|%d ", (uint8_t)fhmos_gesture.maskoff[i]); + if (i%8==0) APP_LOG(TS_OFF, VLEVEL_M, "\r\n"); + APP_LOG(TS_OFF, VLEVEL_M, "\r\n|%d ", (uint8_t)fhmos_gesture.maskoff[i]); } for (i=0; i<8; i++) - printf("%02X\r\n",fhmos_gesture_bitmap[i]); + APP_LOG(TS_OFF, VLEVEL_M, "\r\n%02X\r\n",fhmos_gesture_bitmap[i]); #endif - sts_fhmos_bitmap_pending = 1; - APP_LOG(TS_OFF, VLEVEL_L, "\r\n Fall Gesture bitmap Generated\r\n"); + sts_fhmos_bitmap_pending = FHMOS_BITMAP_GENERATED; + APP_LOG(TS_OFF, VLEVEL_L, "\r\n Fall Gesture bitmap Generated, status=%d \r\n", sts_fhmos_bitmap_pending); } uint16_t MX_TOF_Ranging_Process(void) { @@ -387,10 +447,13 @@ uint16_t MX_TOF_Ranging_Process(void) return (uint16_t) range_distance; #elif defined(L8) + //RANGING_SENSOR_Result_t *Result; uint32_t range_distance=0; //uint8_t center_roi[4] = {27,28,35,36}; - if (ToF_EventDetected != 0) + APP_LOG(TS_OFF, VLEVEL_M, "\r\n RANGING...\r\n"); + while(ToF_EventDetected==0){}; + //if (ToF_EventDetected != 0) { ToF_EventDetected = 0; status = VL53L8A1_RANGING_SENSOR_GetDistance(VL53L8A1_DEV_CENTER, &Result); @@ -443,6 +506,9 @@ void STS_TOF_L8_Init(void) void STS_TOF_L8_Process(void) { + + + //while (1) { /* interrupt mode */ @@ -450,7 +516,7 @@ void STS_TOF_L8_Process(void) { ToF_EventDetected = 0; #if 1 - if (STS_Status_Door_Close == sts_hall1_read) + // if (STS_Status_Door_Close == sts_hall1_read) { status = VL53L8A1_RANGING_SENSOR_GetDistance(VL53L8A1_DEV_CENTER, &Result); if (status == BSP_ERROR_NONE) @@ -494,9 +560,10 @@ static void MX_53L8A1_ThresholdDetection_Init(void) if (status != BSP_ERROR_NONE) { - printf("VL53L8A1_RANGING_SENSOR_Init failed\n"); + APP_LOG(TS_OFF, VLEVEL_L, "\r\nVL53L8A1_RANGING_SENSOR_Init failed\n"); //while (1); } + APP_LOG(TS_OFF, VLEVEL_M, "\r\n ----------- SERNSOR ID =%4x \r\n", sensor_id); } void MX_53L8A1_ThresholdDetection_ConfigIT(uint32_t low_threshold, uint32_t high_threshold) @@ -517,7 +584,7 @@ void MX_53L8A1_ThresholdDetection_ConfigIT(uint32_t low_threshold, uint32_t high if (status != BSP_ERROR_NONE) { - printf("VL53L8A1_RANGING_SENSOR_Start failed\n"); + APP_LOG(TS_OFF, VLEVEL_M, "\r\nVL53L8A1_RANGING_SENSOR_Start failed\n"); while (1); } } @@ -545,9 +612,9 @@ static void MX_53L8A1_ThresholdDetection_Process(void) //ITConfig.LowThreshold = LOW_THRESHOLD; /* mm */ //ITConfig.HighThreshold = HIGH_THRESHOLD; /* mm */ - sts_high_threshold = sts_sensor_install_height; + sts_high_threshold = sts_sensor_install_height+ 400; sts_low_threshold = sts_high_threshold - 1400; - APP_LOG(TS_OFF, VLEVEL_M, "\r\n Threshold High=%4d, Low=%4d \r\n", sts_high_threshold, sts_low_threshold); + APP_LOG(TS_OFF, VLEVEL_H, "\r\n Threshold High=%4d, Low=%4d \r\n", sts_high_threshold, sts_low_threshold); ITConfig.LowThreshold = sts_low_threshold; ITConfig.HighThreshold = sts_high_threshold; @@ -560,7 +627,7 @@ static void MX_53L8A1_ThresholdDetection_Process(void) if (status != BSP_ERROR_NONE) { - printf("VL53L8A1_RANGING_SENSOR_Start failed\n"); + APP_LOG(TS_OFF, VLEVEL_L, "\r\nVL53L8A1_RANGING_SENSOR_Start failed\n"); while (1); } #if 0 @@ -625,13 +692,14 @@ static void print_result(RANGING_SENSOR_Result_t *Result) sts_head_level_low = 0; - /* + //* //APP_LOG(TS_OFF, VLEVEL_M, "\r\n Eliminate edge \r\n"); - uint8_t rio_edge[36]={0,1,2,3,4,5,6,7,8,15,16,23,24,31,32,39,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; - + //uint8_t rio_edge[36]={0,1,2,3,4,5,6,7,8,15,16,23,24,31,32,39,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; +#if defined(NARROW_CUBICLE) for (i=0; i<36; i++) fhmos_bg.maskoff[rio_edge[i]] = 1; - */ +#endif + //*/ for (i=0; i<64; i++) { if (0 == fhmos_bg.maskoff[i]) // only within the non-mask-off blocks @@ -661,8 +729,9 @@ static void print_result(RANGING_SENSOR_Result_t *Result) } else if ((head_distance_from_ceiling < (factor2_head_level_from_floor - 150))) // TODO XXX 50mm gap to avoid flapping back and forth { sts_head_level_low = 0; - sts_fhmos_bitmap_pending = 0; + sts_fhmos_bitmap_pending = FHMOS_BITMAP_BLANK; to_confirm = 0; + APP_LOG(TS_OFF, VLEVEL_M, "\r\n return zero statues, bitmap status=%d \r\n", sts_fhmos_bitmap_pending); } diff --git a/STS/TOF/App/app_tof.h b/STS/TOF/App/app_tof.h index fd86d1e..3da9110 100644 --- a/STS/TOF/App/app_tof.h +++ b/STS/TOF/App/app_tof.h @@ -55,6 +55,11 @@ typedef enum { STS_TOF_VL53L7X } vl53lx_model; +typedef enum { + FHMOS_BITMAP_BLANK=0, + FHMOS_BITMAP_GENERATED, + FHMOS_BITMAP_FINISHED +} fhmos_bitmap_state; #ifdef __cplusplus } diff --git a/hk_as923_decoder.js b/hk_as923_decoder.js index 27fd380..e72dc78 100644 --- a/hk_as923_decoder.js +++ b/hk_as923_decoder.js @@ -4,12 +4,21 @@ // - variables contains the device variables e.g. {"calibration": "3.5"} (both the key / value are of type string) // The function must return an object, e.g. {"temperature": 22.5} // -// Yunhorn SmarToilets Sensor R20241126A01 +// Yunhorn SmarToilets Sensor R20250519R01 // function Decode(fPort, data, variables) { var data = {}; data.length = bytes.length; + var code2color = { "0": "Dark", "1": "Green", "2": "Red", "3": "Blue", "4": "Yellow", "5": "Pink", "6": "Cyan", "7": "White" }; + var code2workmode = { "0": "Network_mode", "1": "Wired_mode", "2": "Hall_element_mode", "3": "Motion_detect_mode", "4": "Dual_mode", "5": "Uni_mode" }; + var code2state = { "0": "Not Occupied", "1": "Normal:Green", "2": "Warning:Yellow", "3": "Emegency:Red" }; + var code2fallstate = { "0": "Presence_Normal", "1": " Presence_Fall_Down", "2": " Presence_Rising_Up", "3": " Presence_LayDown", "4": " Presence_Unconcious", "5": " Presence_Stay_Still" }; + var movecode2state = { "0": " :Not Occupied", "1": " :Normal:Green", "2": " :Warning:Yellow", "3": " :Emegency:Red" }; + var fallcode2state = { "0": " Not Occupied", "1": " Normal:Green", "2": " Warning:Yellow", "3": " :Emegency:Red" }; + var occupancycode2state = { "0": " :Not Occupied", "1": " :Normal Occupancy:Green", "2": " :Over Time Warning:Yellow", "3": " :Over Time Emegency:Red" }; + var soscode2state = { "0": " :Normal: Released ", "1": " :Emegency:SOS Pushdown" }; + switch (fPort) { // RESPOND PORT --- bottom of swith fport // case 1: @@ -105,79 +114,20 @@ function Decode(fPort, data, variables) { // STS_O2_O6 V3 version 2023,pixel-network version case 10: - switch (bytes[0]) { - case 0x00: - data.LEDcolor = "Dark"; - break; - case 0x01: - data.LEDcolor = "Green"; - data.cubicleOccupyStatus = "Vacant"; - break; - case 0x02: - data.LEDcolor = "Red"; - data.cubicleOccupyStatus = "Occupied"; - break; - case 0x03: - data.LEDcolor = "Blue"; - data.cubicleOccupyStatus = "Maintenance"; - break; - case 0x04: - data.LEDcolor = "Yellow"; - data.cubicleOccupyStatus = "TBD"; - break; - case 0x05: - data.LEDcolor = "Pink"; - data.cubicleOccupyStatus = "TBD"; - break; - case 0x06: - data.LEDcolor = "Cyan"; - data.cubicleOccupyStatus = "TBD"; - break; - case 0x07: - data.LEDcolor = "White"; - data.cubicleOccupyStatus = "TBD"; - break; - case 0x08: - data.LEDcolor = "Red_Blue"; - data.cubicleOccupyStatus = "EMERGENCY"; - break; - case 0x23: - data.LEDcolor = "Red_Blue"; - data.cubicleOccupyStatus = "EMERGENCY"; - break; - case 0x20: - data.LEDcolor = "Red_Flash"; - data.cubicleOccupyStatus = "EMERGENCY"; - break; - default: - data.LEDcolor = "TBD_COLOR"; - data.cubicleOccupyStatus = "TBD_status"; - break; + data.LEDcolor = code2color[bytes[0]]; + data.workmode = code2workmode[bytes[1]]; + data.Sensor1_Door_Contact_Open = bytes[2] === 0 ? "Door Closed" : "Door Open"; + if (bytes[1] == 0x03) { + data.Sensor3_RSS_Motion = (bytes[3] === 1) ? "1:Motion Detected" : "0: Motion less"; } - switch (bytes[1]) { - case 0x0: - data.workmode = "Network_mode"; - break; - case 0x01: - data.workmode = "Wired_Mode"; - break; - case 0x02: - data.workmode = "Hall_element_mode"; - break; - case 0x03: - data.workmode = "MotionDetect_mode"; - break; - case 0x04: - data.workmode = "Dual_mode"; - break; - case 0x05: - data.workmode = "Uni_Mode"; - break; - default: - data.workmode = "Unknown Mode"; - break; - } + return { "Yunhorn_SmarToilets_data": data }; + + break; + case 17: + data.LEDcolor = code2color[bytes[0]]; + data.cubicleOccupyStatus = code2state[bytes[3]]; + data.workmode = code2workmode[bytes[1]]; // select only one below // For NC (Normal Closed states) @@ -187,9 +137,13 @@ function Decode(fPort, data, variables) { // data.Sensor1_Door_Contact_Open = bytes[3]===1?"Door Closed":"Door Open"; if (bytes[1] == 0x02) //Hall_element_mode { - data.Sensor2_SOS_Pushed = bytes[3] === 0 ? "PushDown" : "RelaseUP"; + data.Sensor2_SOS_Pushed = bytes[2] === 0 ? "PushDown" : "RelaseUP"; } else if (bytes[1] > 0x02) { - data.Sensor2_Motion_Detected = bytes[3] === 0 ? "No Motion" : "Motion Detected"; + data.Sensor1_Door_Contact = (bytes[2] === 1) ? "1:Door Open" : "0:Door Closed"; + data.Sensor2_SOS_Button = (bytes[3] === 1) ? "1:SOS Released" : "0: SOS Push Down"; + data.Sensor3_RSS_Motion = (bytes[4] === 1) ? "1:Motion Detected" : "0: Motion less"; + data.OverStay_state = bytes[5]; + data.OverStay_duration = (bytes[6] << 8 | bytes[7]) / 60 + " Min"; } return { "Yunhorn_SmarToilets_data": data }; @@ -238,6 +192,9 @@ function Decode(fPort, data, variables) { data.Battery_Level = bytes[4] + " %"; data.Payload_Size = bytes[5]; data.Presence_State = (bytes[6] == 1) ? "Occupied" : "Vacant"; + data.Motion_state_PIR = (bytes[7] == 1) ? "Motion" : "Motionless"; v + data.Lamp_bar_color_code = bytes[8]; + data.Presence_Distance_cm = bytes[9] * 10 + " cm"; return { "Yunhorn_SmarToilets_data": data }; break; @@ -275,86 +232,72 @@ function Decode(fPort, data, variables) { break; - // Heart-beat for STS-O6 occupancy sensor - case 17: - // STS-O7 Fall detection sensor case 19: + data.header_board_led = bytes[0] & 0x7f; + data.header_mtm1 = bytes[1]; + data.header_mtm2 = bytes[2]; + data.header_fw = bytes[3]; + data.header_battery_level = bytes[4] + " %"; + data.payload_size = bytes[5]; + data.payload_type = bytes[6]; + switch (bytes[6]) // fall/movement/occupancy/sos status + { + case 0x01: + data.fhmos_state_fall = bytes[7] + fallcode2state[bytes[7]]; + data.fhmos_state_human_movement = bytes[8] + movecode2state[bytes[8]]; + data.fhmos_state_occupancy = bytes[9] + occupancycode2state[bytes[9]]; + data.fhmos_state_sosbutton = bytes[10] + soscode2state[bytes[10]]; + + data.lamp_bar_color = bytes[11] + " - LampBar Color: " + code2color[bytes[11]]; + data.sensor1_state = bytes[12] + " - Door: " + ((bytes[12] == 1) ? "Open" : "Closed"); + data.sensor2_state = bytes[13] + " - TOF: " + code2state[bytes[13]];; + data.sensor3_PIR_state = bytes[14] + " - PIR: " + ((bytes[14] == 1) ? "Motion" : "No Motion"); + break; + case 0x02: // fall gesture map + data.fhmos_gesture_head_height_cm = bytes[7]; + data.fhmos_gesture_head_x_y = bytes[8]; + data.fhmos_gesture_map1 = String.fromCharCode(bytes[9]); + data.fhmos_gesture_map2 = String.fromCharCode(bytes[10]); + data.fhmos_gesture_map3 = String.fromCharCode(bytes[11]); + data.fhmos_gesture_map4 = String.fromCharCode(bytes[12]); + data.fhmos_gesture_map5 = String.fromCharCode(bytes[13]); + data.fhmos_gesture_map6 = String.fromCharCode(bytes[14]); + data.fhmos_gesture_map7 = String.fromCharCode(bytes[15]); + data.fhmos_gesture_map8 = String.fromCharCode(bytes[16]); + var my_time_zone = 8 * 60 * 60; // (8*60*60) + data.fhmos_fall_event_utc_time = bytes[17] << 24 | bytes[18] << 16 | bytes[19] << 8 | bytes[20]; + data.fhmos_fall_event_time = data.fhmos_fall_event_utc_time + my_time_zone; + var dev_date = new Date(data.fhmos_fall_event_time * 1000); + data.fhmos_fall_event_time_stamp = dev_date.getHours() + ":" + dev_date.getMinutes(); + data.fhmos_fall_event_date_stamp = dev_date.getDate() + "." + (dev_date.getMonth() + 1) + "." + dev_date.getFullYear(); + + break; + case 0x03: // Background mask off map + data.fhmos_gesture_map1 = String.fromCharCode(bytes[7]); + data.fhmos_gesture_map2 = String.fromCharCode(bytes[8]); + data.fhmos_gesture_map3 = String.fromCharCode(bytes[9]); + data.fhmos_gesture_map4 = String.fromCharCode(bytes[10]); + data.fhmos_gesture_map5 = String.fromCharCode(bytes[11]); + data.fhmos_gesture_map6 = String.fromCharCode(bytes[12]); + data.fhmos_gesture_map7 = String.fromCharCode(bytes[13]); + data.fhmos_gesture_map8 = String.fromCharCode(bytes[14]); + break; + } + return { "Yunhorn_SmarToilets_data": data }; + + break; + + // Heart-beat for STS-O6 occupancy sensor + // case 17: + // STS-O7 Fall detection sensor + case 21: { data.BoardLED = ((bytes[0] & 0x7F) === 0x01) ? "ON" : "OFF"; - switch (bytes[1]) { - case 0x00: - data.LEDcolor = "Dark"; - break; - case 0x01: - data.LEDcolor = "Green"; - data.cubicleOccupyStatus = "Vacant"; - break; - case 0x02: - data.LEDcolor = "Red"; - data.cubicleOccupyStatus = "Occupied"; - break; - case 0x03: - data.LEDcolor = "Blue"; - data.cubicleOccupyStatus = "Maintenance"; - break; - case 0x04: - data.LEDcolor = "Yellow"; - data.cubicleOccupyStatus = "TBD"; - break; - case 0x05: - data.LEDcolor = "Pink"; - data.cubicleOccupyStatus = "TBD"; - break; - case 0x06: - data.LEDcolor = "Cyan"; - data.cubicleOccupyStatus = "TBD"; - break; - case 0x07: - data.LEDcolor = "White"; - data.cubicleOccupyStatus = "TBD"; - break; - case 0x08: - data.LEDcolor = "Red_Blue"; - data.cubicleOccupyStatus = "EMERGENCY"; - break; - case 0x23: - data.LEDcolor = "Red_Blue"; - data.cubicleOccupyStatus = "EMERGENCY"; - break; - case 0x20: - data.LEDcolor = "Red_Flash"; - data.cubicleOccupyStatus = "EMERGENCY"; - break; - default: - data.LEDcolor = "TBD_COLOR"; - data.cubicleOccupyStatus = "TBD_status"; - break; - } + data.LEDcolor = code2color[bytes[1]]; + data.cubicleOccupyStatus = code2state[bytes[1]]; + data.workmode = code2state[bytes[2]]; - switch (bytes[2]) { - case 0x0: - data.workmode = "Network_mode"; - break; - case 0x01: - data.workmode = "Wired_Mode"; - break; - case 0x02: - data.workmode = "Hall_element_mode"; - break; - case 0x03: - data.workmode = "MotionDetect_mode"; - break; - case 0x04: - data.workmode = "Dual_mode"; - break; - case 0x05: - data.workmode = "Uni_Mode"; - break; - default: - data.workmode = "Unknown Mode"; - break; - } // select only one below // For NC(Normal Closed states data.Sensor1_Door_Contact_Open = bytes[3] === 0 ? "Door Closed" : "Door Open"; @@ -376,32 +319,8 @@ function Decode(fPort, data, variables) { data.Sensor5_ALARM_RESET = (bytes[7] === 0) ? "Down RESET" : "NO Reset"; data.Distance_in_mm = (bytes[8] << 8 | bytes[9]); data.MotionLevel = (bytes[10] << 8 | bytes[11]); - data.Unconcious_State = (bytes[12] == 0) ? "False" : "True"; - - switch (bytes[13]) { - case 0x0: - data.Fall_Down_Detected_State = "Presence_Normal"; - break; - case 0x01: - data.Fall_Down_Detected_State = "Presence_Fall_Down"; - break; - case 0x02: - data.Fall_Down_Detected_State = "Presence_Rising_Up"; - break; - case 0x03: - data.Fall_Down_Detected_State = "Presence_LayDown"; - break; - case 0x04: - data.Fall_Down_Detected_State = "Presence_Unconcious"; - break; - case 0x05: - data.Fall_Down_Detected_State = "Presence_Stay_Still"; - break; - default: - data.Fall_Down_Detected_State = "Presence_Normal"; - break; - } + data.Fall_Down_Detected_State = code2fallstate[bytes[13]]; data.OverStay_Detected_State = (bytes[14] == 0x0) ? "False" : "True"; data.OverStay_Duration_in_Seconds = (bytes[15] << 8 | bytes[16]); data.No_Movement_Duration_in_Seconds = (bytes[17] << 8 | bytes[18]); @@ -466,8 +385,8 @@ function Decode(fPort, data, variables) { data.HW_Code = bytes[3]; data.Battery_Level = bytes[4] + " %"; data.Payload_Size = bytes[5]; - data.Weight_g = (bytes[6] << 8 | bytes[7]); - data.Tare_g = (bytes[8] << 8 | bytes[9]); + data.Weight_g = (bytes[6] << 24 | bytes[7]) << 16 | bytes[8] << 8 + bytes[9] + bytes[10]; + data.Weight_g = (bytes[6] << 24 | bytes[7]) << bytes[8] + bytes[9]; return { "Yunhorn_SmarToilets_data": data }; break; @@ -567,8 +486,19 @@ function Decode(fPort, data, variables) { break; - // STS-E2 PTAQ, ODOR LEVEL Sensor + // STS-E2 PTAQ, ODOR LEVEL Sensor 9-in-1 case 101: + data.Temperature = ((bytes[0] & 0x01) ? "+" : "-") + (bytes[1] + (bytes[2] / 100)) + " C"; + data.Humidity = (bytes[3] + (bytes[4] / 100)) + " %RH"; + data.NH3 = (bytes[5] + (bytes[6] / 100)) + " ppm"; + data.H2S = (bytes[7] + bytes[8] / 100) + " ppm"; + data.CH2O = (bytes[9] + (bytes[10] / 100)) + " ug/m3"; + data.CO2 = (bytes[11] << 8 | bytes[12]) + " ppm"; + data.TVOC = (bytes[13] << 8 | bytes[14]) + " ppm"; + data.PM2_5 = ((bytes[15] << 8) | bytes[16]) + " ug/m3"; + data.PM10 = ((bytes[17] << 8) | bytes[18]) + " ug/m3"; + data.O3 = ((bytes[19] << 8) | bytes[20]) + " ppb"; + return { "Yunhorn_SmarToilets_data": data }; break; @@ -630,10 +560,30 @@ function Decode(fPort, data, variables) { return { "Yunhorn_SmarToilets_data": data }; break; + // TIME SYNC PORT + case 202: + data.TimeSyncReq = "True"; + return { "Yunhorn_SmarToilets_data": data }; + break; // respond port case 1: switch (bytes[0]) { + //AC CODE RESPONSE + case 0x41: + if ((bytes[1] == 0x43) && (data.length == 22)) + data.RFAC_RESULT = "SUCCESS"; + break; + + // RSS background center distance and motion noise 'B' + case 0x42: + if ((bytes[6] == 0x04)) { + data.background_result = "Motion Noise Measured"; + data.background_distance_center = (bytes[7] << 8 | bytes[8]) + " mm"; + data.background_motion_noise = (bytes[9] << 8 | bytes[10]) + " score"; + + } + break; // NVM config 'C' case 0x43: // report current nvm config @@ -666,8 +616,8 @@ function Decode(fPort, data, variables) { data.rss_output_time_const = bytes[27] * 0.1; data.rss_downsampling_factor = bytes[28]; data.rss_power_saving_mode_active = bytes[29]; - data.rss_reserve02 = bytes[30]; - data.rss_reserve03 = bytes[31]; + data.rss_cfg_update_flag = bytes[30]; + data.rss_bg_noise_score = bytes[31] * 10; data.rss_reserve04 = bytes[32]; data.reserve2 = bytes[33]; data.reserve3 = bytes[34]; @@ -702,7 +652,21 @@ function Decode(fPort, data, variables) { data.Distance_unit = "mm"; break; + // G Fall down Gesture bitmap REPORT + case 0x47: + data.head_level_cm = bytes[7]; + data.head_coordination = "X: " + bytes[8] / 8 + " Y:" + bytes[8] % 8; + data.matrix0 = bytes2matrix(11, bytes); + data.matrix1 = bytes2matrix(12, bytes); + data.matrix2 = bytes2matrix(13, bytes); + data.matrix3 = bytes2matrix(14, bytes); + data.matrix4 = bytes2matrix(15, bytes); + data.matrix5 = bytes2matrix(16, bytes); + data.matrix6 = bytes2matrix(17, bytes); + data.matrix7 = bytes2matrix(18, bytes); + return + break; // LoRa Class 'L' case 0x4c: // LoRaWAN Class A/B/C @@ -742,31 +706,15 @@ function Decode(fPort, data, variables) { case 4: if ((data.length === 4) && (bytes[1] === 0x31) && (bytes[2] === 0x31)) { data.Work_Mode_Switch = "OK"; - switch (bytes[3] - 0x30) { - case 0x0: - data.workmode = "Network_mode"; - break; - case 0x01: - data.workmode = "Wired_Mode"; - break; - case 0x02: - data.workmode = "Hall_element_mode"; - break; - case 0x03: - data.workmode = "MotionDetect_mode"; - break; - case 0x04: - data.workmode = "Dual_mode"; - break; - case 0x05: - data.workmode = "Uni_Mode"; - break; - default: - data.workmode = "Unknown Mode"; - break; - } + data.workmode = code2workmode[bytes[3] - 0x30]; } + break; + case 6: + data.P_cmd = "Change Lamp Bar color config"; + data.workmode = code2workmode[bytes[3] - 0x30]; + data.color_occupy = code2color[bytes[4] - 0x30]; + data.color_vacant = code2color[bytes[5] - 0x30]; break; case 7: if (bytes[3] === 0x46) { @@ -842,125 +790,69 @@ function Decode(fPort, data, variables) { // Self-Test function 'S' case 0x53: - // SELF TEST FUNCTION - data.mtm_code1 = bytes[1]; - data.mtm_code2 = bytes[2]; - data.sts_verion = bytes[3]; - data.sts_hw_ver = bytes[4]; - data.battery_level = bytes[5]; - if ((bytes[6] === 0x0C)) { // report sensor install height and bitmap - data.sts_sensor_chip_model_type_ID = (bytes[7] << 8 | bytes[8]); - if ((bytes[7] === 0xF0) && (bytes[8] === 0x0C)) { - data.sts_sensor_chip_model_type = "VL53L8X"; - } - else if ((bytes[7] === 0xEA) & (bytes[8] === 0xCC)) { - data.sts_sensor_chip_model_type = "VL53L1X"; - } - else if ((bytes[7] === 0xEE) & (bytes[8] === 0xAA)) { - data.sts_sensor_chip_model_type = "VL53L0X"; + if ((bytes[1] == 0x54) && (bytes[2] == 0x53)) { + data.Yunhorn_PRD = "True"; + data.PRD_String = String.fromCharCode(bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6]); + } else { + + // SELF TEST FUNCTION + data.mtm_code1 = bytes[1]; + data.mtm_code2 = bytes[2]; + data.sts_verion = bytes[3]; + data.sts_hw_ver = bytes[4]; + data.battery_level = bytes[5]; + if ((bytes[6] === 0x0C) || (bytes[6] === 0x04)) { // report sensor install height and bitmap + data.sts_sensor_chip_model_type_ID = (bytes[7] << 8 | bytes[8]); + if ((bytes[7] === 0xF0) && (bytes[8] === 0x0C)) { + data.sts_sensor_chip_model_type = "VL53L8X"; + } + else if ((bytes[7] === 0xEA) & (bytes[8] === 0xCC)) { + data.sts_sensor_chip_model_type = "VL53L1X"; + } + else if ((bytes[7] === 0xEE) & (bytes[8] === 0xAA)) { + data.sts_sensor_chip_model_type = "VL53L0X"; + } + + data.sts_sensor_install_height = (bytes[9] << 8 | bytes[10]); + data.sts_sensor_install_height_unit = "mm"; + //data.maskoff_bitmap= String.fromCharCode(bytes[11])+String.fromCharCode(bytes[12])+String.fromCharCode(bytes[13])+String.fromCharCode(bytes[14])+String.fromCharCode(bytes[15])+String.fromCharCode(bytes[16])+String.fromCharCode(bytes[17])+String.fromCharCode(bytes[18]); + if (bytes[6] === 0x0c) { + data.matrix0 = bytes2matrix(11, bytes); + data.matrix1 = bytes2matrix(12, bytes); + data.matrix2 = bytes2matrix(13, bytes); + data.matrix3 = bytes2matrix(14, bytes); + data.matrix4 = bytes2matrix(15, bytes); + data.matrix5 = bytes2matrix(16, bytes); + data.matrix6 = bytes2matrix(17, bytes); + data.matrix7 = bytes2matrix(18, bytes); + } + } - data.sts_sensor_install_height = (bytes[9] << 8 | bytes[10]); - data.sts_sensor_install_height_unit = "mm"; - //data.maskoff_bitmap= String.fromCharCode(bytes[11])+String.fromCharCode(bytes[12])+String.fromCharCode(bytes[13])+String.fromCharCode(bytes[14])+String.fromCharCode(bytes[15])+String.fromCharCode(bytes[16])+String.fromCharCode(bytes[17])+String.fromCharCode(bytes[18]); - - var mmm = bytes[11]; - var con = 0x30; - var matrix0 = " [ "; - for (i = 0; i < 8; i++) { - con += ((mmm >> i) & 0x01); - matrix0 += (String.fromCharCode(con) + "__"); - con = 0x30; + else if ((bytes[6] === 0x58)) { + data.sts_Test_Result = "### Motion Sensor Not Detected ###"; + } else if ((bytes[6] === 0x78)) { + data.sts_Test_Result = "### Motion Sensor Detected, Yet Not Stable ###"; + } else if ((bytes[6] === 0x12)) //result length=18, 12 rss bytes, 2 distance bytes, 2 range bytes, 2 motion noise + { + data.sts_Test_Result = "Motion Sensor Test Result:"; + data.sts_test_result_length = bytes[6]; + data.sts_rss_sub_code1 = bytes[7]; + data.sts_rss_sub_code2 = bytes[8]; + data.sts_rss_sub_code3 = bytes[9]; + data.sts_rss_sub_code4 = bytes[10]; + data.sts_rss_sub_code5 = bytes[11]; + data.sts_rss_sub_code6 = bytes[12]; + data.sts_rss_sub_code7 = bytes[13]; + data.sts_rss_sub_code8 = bytes[14]; + data.sts_rss_sub_code9 = bytes[15]; + data.sts_rss_sub_code10 = bytes[16]; + data.sts_rss_sub_code11 = bytes[17]; + data.sts_rss_sub_code12 = bytes[18]; + data.sts_sensor_install_height = (bytes[19] << 8 | bytes[20]) + " mm"; + data.sts_rss_background_range_center = (bytes[21] << 8 | bytes[22]) + " mm"; + data.sts_rss_background_motion_noise = (bytes[23] << 8 | bytes[24]) + " score"; } - data.matrix01 = matrix0; - mmm = bytes[12]; - var con = 0x30; - var matrix0 = " [ "; - for (i = 0; i < 8; i++) { - con += ((mmm >> i) & 0x01); - matrix0 += (String.fromCharCode(con) + "__"); - con = 0x30; - } - data.matrix02 = matrix0; - - mmm = bytes[13]; - var con = 0x30; - var matrix0 = " [ "; - for (i = 0; i < 8; i++) { - con += ((mmm >> i) & 0x01); - matrix0 += (String.fromCharCode(con) + "__"); - con = 0x30; - } - data.matrix03 = matrix0; - mmm = bytes[14]; - var con = 0x30; - var matrix0 = " [ "; - for (i = 0; i < 8; i++) { - con += ((mmm >> i) & 0x01); - matrix0 += (String.fromCharCode(con) + "__"); - con = 0x30; - } - data.matrix04 = matrix0; - - mmm = bytes[15]; - var con = 0x30; - var matrix0 = " [ "; - for (i = 0; i < 8; i++) { - con += ((mmm >> i) & 0x01); - matrix0 += (String.fromCharCode(con) + "__"); - con = 0x30; - } - data.matrix05 = matrix0; - - mmm = bytes[16]; - var con = 0x30; - var matrix0 = " [ "; - for (i = 0; i < 8; i++) { - con += ((mmm >> i) & 0x01); - matrix0 += (String.fromCharCode(con) + "__"); - con = 0x30; - } - data.matrix06 = matrix0; - - mmm = bytes[17]; - var con = 0x30; - var matrix0 = " [ "; - for (i = 0; i < 8; i++) { - con += ((mmm >> i) & 0x01); - matrix0 += (String.fromCharCode(con) + "__"); - con = 0x30; - } - data.matrix07 = matrix0; - - mmm = bytes[18]; - var con = 0x30; - var matrix0 = " [ "; - for (i = 0; i < 8; i++) { - con += ((mmm >> i) & 0x01); - matrix0 += (String.fromCharCode(con) + "__"); - con = 0x30; - } - data.matrix08 = matrix0; - - } - - else if ((bytes[6] === 0x58)) { - data.sts_Test_Result = "### Motion Sensor Not Detected ###"; - } else if ((bytes[6] === 0x0E)) //result length, 10 rss bytes, 4 distance bytes - { - data.sts_Test_Result = "Motion Sensor Test Result:"; - data.sts_test_result_length = bytes[6]; - data.sts_rss_sub_code1 = bytes[7]; - data.sts_rss_sub_code2 = bytes[8]; - data.sts_rss_sub_code3 = bytes[9]; - data.sts_rss_sub_code4 = bytes[10]; - data.sts_rss_sub_code5 = bytes[11]; - data.sts_rss_sub_code6 = bytes[12]; - data.sts_rss_sub_code7 = bytes[13]; - data.sts_rss_sub_code8 = bytes[14]; - data.sts_rss_sub_code9 = bytes[15]; - data.sts_rss_sub_code10 = bytes[16]; - data.sts_sensor_install_height = String.fromCharCode(bytes[17]) + String.fromCharCode(bytes[18]) + String.fromCharCode(bytes[19]) + String.fromCharCode(bytes[20]) + " mm"; } break; @@ -1018,8 +910,17 @@ function Decode(fPort, data, variables) { data.Heart_Beat_interval = (bytes[2] - 0x30) * 10 + (bytes[3] - 0x30); data.Heart_Beat_interval_unit = String.fromCharCode(bytes[4]); // if sts_mtm1 == O6/O7 ....TODO XXXX - // data.Wakeup_sampling_interval = (bytes[2]-0x30)*10 + (bytes[3]-0x30); - // data.Unit = String.fromCharCode(bytes[4]); + if (bytes[4] == 0x4C) { + data.Wakeup_sampling_interval = 100 * ((bytes[2] - 0x30) * 10 + (bytes[3] - 0x30)); + data.Unit = "ms"; + } + break; + // YWABB + case 0x57: // W + data.RSS_Sliding_Win_CFG = "true"; + data.RSS_Slid_Win_Threshold = (bytes[2] - 0x30); + data.RSS_Slid_Win_Length = (bytes[3] - 0x30) * 10 + (bytes[4] - 0x30); + break; } @@ -1045,29 +946,8 @@ function Decode(fPort, data, variables) { } else { if ((bytes[0] === 0x50) && (bytes[1] === 0x31) && (bytes[2] === 0x31)) { data.Work_Mode_Switch = "OK"; - switch (bytes[3] - 0x30) { - case 0x0: - data.workmode = "Network_mode"; - break; - case 0x01: - data.workmode = "Wired_Mode"; - break; - case 0x02: - data.workmode = "Hall_element_mode"; - break; - case 0x03: - data.workmode = "MotionDetect_mode"; - break; - case 0x04: - data.workmode = "Dual_mode"; - break; - case 0x05: - data.workmode = "Uni_Mode"; - break; - default: - data.workmode = "Unknown Mode"; - break; - } + data.workmode = code2workmode[bytes[3] - 0x30]; + } else if ((bytes[0] === 0x59) && (bytes[1] === 0x44)) //Duration interval { data.Uplink_interval = (bytes[2] - 0x30) * 10 + (bytes[3] - 0x30); @@ -1123,8 +1003,8 @@ function Decode(fPort, data, variables) { data.rss_output_time_const = bytes[27] * 0.1; data.rss_downsampling_factor = bytes[28]; data.rss_power_saving_mode_active = bytes[29]; - data.rss_reserve02 = bytes[30]; - data.rss_reserve03 = bytes[31]; + data.rss_cfg_update_flag = bytes[30]; + data.rss_bg_motion_noise = bytes[31] * 10; data.rss_reserve04 = bytes[32]; data.reserve2 = bytes[33]; data.reserve3 = bytes[34]; @@ -1154,6 +1034,19 @@ function Decode(fPort, data, variables) { } +function bytes2matrix(i, bytes) { + var mmm = bytes[i]; + var con = 0x30; + var matrix0 = " [ "; + for (cc = 0; cc < 8; cc++) { + con += ((mmm >> cc) & 0x01); + matrix0 += (String.fromCharCode(con) + "__"); + con = 0x30; + } + return matrix0; +} + + // // Yunhorn SmarToilets Sensor Decoder //