diff --git a/Core/Inc/main.h b/Core/Inc/main.h index d870785..38ae308 100644 --- a/Core/Inc/main.h +++ b/Core/Inc/main.h @@ -101,15 +101,15 @@ void Error_Handler(void); #define LED1_OFF HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin, GPIO_PIN_RESET) #define LED1_STATE HAL_GPIO_ReadPin(LED1_GPIO_Port, LED1_Pin) #define LED1_TOGGLE HAL_GPIO_TogglePin(LED1_GPIO_Port, LED1_Pin) -//#define MEMS_POWER_Pin GPIO_PIN_4 // PMU_ENABLE -//#define MEMS_POWER_GPIO_Port GPIOB // PMU_ENABLE +#define MEMS_POWER_Pin GPIO_PIN_4 // PMU_ENABLE +#define MEMS_POWER_GPIO_Port GPIOB // PMU_ENABLE -//#define MEMS_RESET_Pin GPIO_PIN_4 -//#define MEMS_RESET_GPIO_Port GPIOB +#define MEMS_RESET_Pin GPIO_PIN_4 +#define MEMS_RESET_GPIO_Port GPIOB -#define PME_ON //HAL_GPIO_WritePin(MEMS_POWER_GPIO_Port, MEMS_POWER_Pin, GPIO_PIN_SET ) -#define PME_OFF //HAL_GPIO_WritePin(MEMS_POWER_GPIO_Port, MEMS_POWER_Pin, GPIO_PIN_RESET ) -#define PME_TOGGLE //HAL_GPIO_TogglePin(MEMS_POWER_GPIO_Port, MEMS_POWER_Pin) +#define PME_ON HAL_GPIO_WritePin(MEMS_POWER_GPIO_Port, MEMS_POWER_Pin, GPIO_PIN_SET ) +#define PME_OFF HAL_GPIO_WritePin(MEMS_POWER_GPIO_Port, MEMS_POWER_Pin, GPIO_PIN_RESET ) +#define PME_TOGGLE HAL_GPIO_TogglePin(MEMS_POWER_GPIO_Port, MEMS_POWER_Pin) #if (defined(TOF_1)||defined(TOF_2)||defined(STS_R1)||defined(STS_R5)||defined(STS_R1D)) #define VL53L0 @@ -224,24 +224,25 @@ void Error_Handler(void); #define I2C2_STANDARD_100K 0x00000E14 #define I2C2_FAST_400K 0x00000004 #define I2C2_FAST_PLUS_1M 0x00000000 -#endif - +#else /* * FOR STM32WLE5CCU6 UFQFPN48 PA12 PA11 - * + */ #define I2C2_STANDARD_100K 0x00000E14 #define I2C2_FAST_400K 0x00000004 #define I2C2_FAST_PLUS_1M 0x00000000 -*/ + +#endif + /* * FOR STM32WL55JCIX UFBGA73 PA12 PA11 */ - +#ifdef STM32WL55xx #define I2C2_STANDARD_100K 0x10805D88 #define I2C2_FAST_400K 0x0090194B #define I2C2_FAST_PLUS_1M 0x00700814 - +#endif #if defined(STS_R4) /* IF_SOAP_IN, MEMS_IF_3, PA10 */ #define SOAP_STATUS_Pin GPIO_PIN_10 diff --git a/Core/Inc/sys_conf.h b/Core/Inc/sys_conf.h index 4941614..f10502a 100644 --- a/Core/Inc/sys_conf.h +++ b/Core/Inc/sys_conf.h @@ -47,12 +47,12 @@ extern "C" { /** * @brief Verbose level for all trace logs */ -#define VERBOSE_LEVEL VLEVEL_OFF +#define VERBOSE_LEVEL VLEVEL_M /** * @brief Enable trace logs */ -#define APP_LOG_ENABLED 0 +#define APP_LOG_ENABLED 1 /** * @brief Activate monitoring (probes) of some internal RF signals for debug purpose @@ -75,13 +75,13 @@ extern "C" { * @brief Enable/Disable MCU Debugger pins (dbg serial wires) * @note by HW serial wires are ON by default, need to put them OFF to save power */ -#define DEBUGGER_ENABLED 0 +#define DEBUGGER_ENABLED 1 /** * @brief Disable Low Power mode * @note 0: LowPowerMode enabled. MCU enters stop2 mode, 1: LowPowerMode disabled. MCU enters sleep mode only */ -#define LOW_POWER_DISABLE 0 +#define LOW_POWER_DISABLE 1 /* USER CODE BEGIN EC */ diff --git a/Core/Src/dma.c b/Core/Src/dma.c index 45f5b1a..a72ac4c 100644 --- a/Core/Src/dma.c +++ b/Core/Src/dma.c @@ -59,6 +59,11 @@ void MX_DMA_Init(void) #endif #endif + /* DMA1_Channel5_IRQn interrupt configuration */ + + // HAL_NVIC_SetPriority(DMA1_Channel5_IRQn, 2, 0); + // HAL_NVIC_EnableIRQ(DMA1_Channel5_IRQn); + // I2C2 /* DMA1_Channel4_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA1_Channel4_IRQn, 0, 0); @@ -72,13 +77,13 @@ void MX_DMA_Init(void) HAL_NVIC_SetPriority(DMA1_Channel6_IRQn, 0, 0); HAL_NVIC_EnableIRQ(DMA1_Channel6_IRQn); /* DMA1_Channel7_IRQn interrupt configuration */ - HAL_NVIC_SetPriority(DMA1_Channel7_IRQn, 0, 0); - HAL_NVIC_EnableIRQ(DMA1_Channel7_IRQn); -#if 0 - /* DMA1_Channel5_IRQn interrupt configuration */ + //HAL_NVIC_SetPriority(DMA1_Channel7_IRQn, 0, 0); + //HAL_NVIC_EnableIRQ(DMA1_Channel7_IRQn); + HAL_NVIC_SetPriority(DMA1_Channel5_IRQn, 2, 0); HAL_NVIC_EnableIRQ(DMA1_Channel5_IRQn); -#endif + + } /* USER CODE BEGIN 2 */ diff --git a/Core/Src/gpio.c b/Core/Src/gpio.c index 172fbd9..85140f6 100644 --- a/Core/Src/gpio.c +++ b/Core/Src/gpio.c @@ -81,7 +81,7 @@ void MX_GPIO_Init(void) GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING; GPIO_InitStruct.Pull = GPIO_PULLUP; HAL_GPIO_Init(BUT3_GPIO_Port, &GPIO_InitStruct); -#if 0 +#ifndef L8 /* STS-PME PB-4 */ /*Configure GPIO pins : PBPin PBPin PBPin */ GPIO_InitStruct.Pin = MEMS_POWER_Pin; diff --git a/Core/Src/i2c.c b/Core/Src/i2c.c index 6d4c951..2713947 100644 --- a/Core/Src/i2c.c +++ b/Core/Src/i2c.c @@ -43,7 +43,11 @@ void MX_I2C2_Init(void) /* USER CODE END I2C2_Init 1 */ hi2c2.Instance = I2C2; +#ifdef L8 hi2c2.Init.Timing = I2C2_FAST_PLUS_1M; +#else + hi2c2.Init.Timing = I2C2_STANDARD_100K; +#endif hi2c2.Init.OwnAddress1 = 0; hi2c2.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; hi2c2.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; diff --git a/Core/Src/main.c b/Core/Src/main.c index 66c56f9..16ed38d 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -102,19 +102,12 @@ int main(void) /* Initialize all configured peripherals */ MX_GPIO_Init(); - if(__HAL_PWR_GET_FLAG(PWR_FLAG_SB) != RESET) - { - __HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB); - } - else - { - MX_I2C2_Init(); - MX_DMA_Init(); - MX_LoRaWAN_Init(); - } + MX_I2C2_Init(); + MX_DMA_Init(); + MX_LoRaWAN_Init(); /* USER CODE BEGIN 2 */ - MX_USART2_UART_Init(); + //MX_USART2_UART_Init(); /* USER CODE END 2 */ /* Infinite loop */ @@ -172,7 +165,7 @@ void SystemClock_Config(void) RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; - //RCC_ClkInitStruct.AHBCLK3Divider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.AHBCLK3Divider = RCC_SYSCLK_DIV1; if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) { diff --git a/Core/Src/stm32wlxx_it.c b/Core/Src/stm32wlxx_it.c index d3e538e..6f36a09 100644 --- a/Core/Src/stm32wlxx_it.c +++ b/Core/Src/stm32wlxx_it.c @@ -58,6 +58,7 @@ extern RTC_HandleTypeDef hrtc; extern SUBGHZ_HandleTypeDef hsubghz; extern DMA_HandleTypeDef hdma_usart2_tx; +extern DMA_HandleTypeDef hdma_usart2_rx; extern UART_HandleTypeDef huart2; /* USER CODE BEGIN EV */ extern DMA_HandleTypeDef hdma_i2c2_rx; @@ -259,6 +260,7 @@ void EXTI3_IRQHandler(void) /* USER CODE END EXTI3_IRQn 1 */ } + /** * @brief This function handles EXTI Line 1 Interrupt. */ @@ -272,6 +274,36 @@ void EXTI4_IRQHandler(void) /* USER CODE END EXTI1_IRQn 1 */ } + +/* SPI1 */ +/** + * @brief This function handles DMA1 Channel 2 Interrupt. + */ +void DMA1_Channel2_IRQHandler(void) +{ + /* USER CODE BEGIN DMA1_Channel2_IRQn 0 */ + + /* USER CODE END DMA1_Channel2_IRQn 0 */ + //HAL_DMA_IRQHandler(&hdma_spi1_rx); + /* USER CODE BEGIN DMA1_Channel2_IRQn 1 */ + + /* USER CODE END DMA1_Channel2_IRQn 1 */ +} + +/** + * @brief This function handles DMA1 Channel 3 Interrupt. + */ +void DMA1_Channel3_IRQHandler(void) +{ + /* USER CODE BEGIN DMA1_Channel3_IRQn 0 */ + + /* USER CODE END DMA1_Channel3_IRQn 0 */ + //HAL_DMA_IRQHandler(&hdma_spi1_tx); + /* USER CODE BEGIN DMA1_Channel3_IRQn 1 */ + + /* USER CODE END DMA1_Channel3_IRQn 1 */ +} + /* I2C2 */ /** @@ -296,12 +328,15 @@ void DMA1_Channel5_IRQHandler(void) /* USER CODE BEGIN DMA1_Channel5_IRQn 0 */ /* 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 */ } +// USART2 /** * @brief This function handles DMA1 Channel 6 Interrupt. */ @@ -324,7 +359,7 @@ void DMA1_Channel7_IRQHandler(void) /* USER CODE BEGIN DMA1_Channel7_IRQn 0 */ /* USER CODE END DMA1_Channel7_IRQn 0 */ - HAL_DMA_IRQHandler(&hdma_usart2_rx); + //HAL_DMA_IRQHandler(&hdma_usart2_rx); /* USER CODE BEGIN DMA1_Channel7_IRQn 1 */ /* USER CODE END DMA1_Channel7_IRQn 1 */ @@ -357,13 +392,16 @@ void EXTI15_10_IRQHandler(void) /* USER CODE BEGIN EXTI15_10_IRQn 0 */ /* USER CODE END EXTI15_10_IRQn 0 */ + #if defined(L8)||defined(STS_P2)||defined(STS_R1D)||defined(STS_R5) HAL_GPIO_EXTI_IRQHandler(TOF_INT_EXTI_PIN); #endif + /* USER CODE BEGIN EXTI15_10_IRQn 1 */ /* USER CODE END EXTI15_10_IRQn 1 */ } + /** * @brief This function handles USART2 Interrupt. */ diff --git a/Core/Src/usart.c b/Core/Src/usart.c index b51ec0b..64cf905 100644 --- a/Core/Src/usart.c +++ b/Core/Src/usart.c @@ -27,6 +27,7 @@ UART_HandleTypeDef huart2; DMA_HandleTypeDef hdma_usart2_tx; DMA_HandleTypeDef hdma_usart2_rx; + /* USART2 init function */ void MX_USART2_UART_Init(void) @@ -133,7 +134,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) } #endif __HAL_LINKDMA(uartHandle,hdmatx,hdma_usart2_tx); - +#if 0 /* USART2_RX Init */ hdma_usart2_rx.Instance = DMA1_Channel7; hdma_usart2_rx.Init.Request = DMA_REQUEST_USART2_RX; @@ -154,7 +155,9 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) Error_Handler(); } #endif - __HAL_LINKDMA(uartHandle,hdmatx,hdma_usart2_tx); + __HAL_LINKDMA(uartHandle,hdmarx,hdma_usart2_rx); +#endif + /* USART2 interrupt Init */ HAL_NVIC_SetPriority(USART2_IRQn, 2, 0); @@ -184,7 +187,8 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle) /* USART2 DMA DeInit */ HAL_DMA_DeInit(uartHandle->hdmatx); - HAL_DMA_DeInit(uartHandle->hdmarx); + + //HAL_DMA_DeInit(uartHandle->hdmarx); /* USART2 interrupt Deinit */ HAL_NVIC_DisableIRQ(USART2_IRQn); diff --git a/Core/Src/usart_if.c b/Core/Src/usart_if.c index 9f0331e..8ac0e4a 100644 --- a/Core/Src/usart_if.c +++ b/Core/Src/usart_if.c @@ -127,7 +127,7 @@ UTIL_ADV_TRACE_Status_t vcom_DeInit(void) /* ##-3- Disable the NVIC for DMA ########################################### */ /* USER CODE BEGIN 1 */ - HAL_NVIC_DisableIRQ(DMA1_Channel5_IRQn); + HAL_NVIC_DisableIRQ(DMA1_Channel6_IRQn); return UTIL_ADV_TRACE_OK; /* USER CODE END 1 */ diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 141d956..53ed709 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -491,6 +491,9 @@ void LoRaWAN_Init(void) LmHandlerJoin(ActivationType, ForceRejoin); + UTIL_TIMER_Create(&YunhornSTSHeartBeatTimer, 1000*STS_HeartBeatTimerPeriod_sec, UTIL_TIMER_ONESHOT, OnYunhornSTSHeartBeatTimerEvent, NULL); + UTIL_TIMER_Start(&YunhornSTSHeartBeatTimer); + if (EventType == TX_ON_TIMER) { @@ -538,8 +541,8 @@ void LoRaWAN_Init(void) #endif //UTIL_TIMER_Create(&YunhornSTSHeartBeatTimer, 1000*STS_HeartBeatTimerPeriod_sec, UTIL_TIMER_PERIODIC, OnYunhornSTSHeartBeatTimerEvent, NULL); - UTIL_TIMER_Create(&YunhornSTSHeartBeatTimer, 1000*STS_HeartBeatTimerPeriod_sec, UTIL_TIMER_ONESHOT, OnYunhornSTSHeartBeatTimerEvent, NULL); - UTIL_TIMER_Start(&YunhornSTSHeartBeatTimer); +// UTIL_TIMER_Create(&YunhornSTSHeartBeatTimer, 1000*STS_HeartBeatTimerPeriod_sec, UTIL_TIMER_ONESHOT, OnYunhornSTSHeartBeatTimerEvent, NULL); +// UTIL_TIMER_Start(&YunhornSTSHeartBeatTimer); /* USER CODE END LoRaWAN_Init_Last */ } @@ -1107,7 +1110,6 @@ static void OnJoinRequest(LmHandlerJoinParams_t *joinParams) LmHandlerParams.IsTxConfirmed = true; LmHandlerErrorStatus_t status = LmHandlerSend(&AppData, LmHandlerParams.IsTxConfirmed, false); if (status ==LORAMAC_HANDLER_SUCCESS ) LmHandlerParams.IsTxConfirmed = false; - } else { @@ -1457,26 +1459,28 @@ static void OnYunhornSTSHeartBeatTimerEvent(void *context) * @brief Yunhorn STS Heart Beat Periodicity Chagne function * @param duration of periodicty in ms (1/1000 sec) */ -void OnYunhornSTSHeartBeatPeriodicityChanged(uint32_t newperiodicity) +void OnYunhornSTSHeartBeatPeriodicityChanged(uint32_t periodicity) { /* USER CODE BEGIN OnYunhornSTSHeartBeatPeriodicityChanged_1 */ /* USER CODE END OnYunhornSTSHeartBeatPeriodicityChanged_1 */ - if (newperiodicity == 0) + if (periodicity == 0) { /* Revert to application default Heat-beat periodicity */ - newperiodicity = 10*APP_TX_DUTYCYCLE; //10*10 000 ms + periodicity = 10*APP_TX_DUTYCYCLE; //10*10 000 ms } /* Update timer YunhornSTSHeartBeatTimer */ UTIL_TIMER_Stop(&YunhornSTSHeartBeatTimer); - UTIL_TIMER_SetPeriod(&YunhornSTSHeartBeatTimer, newperiodicity); + UTIL_TIMER_SetPeriod(&YunhornSTSHeartBeatTimer, periodicity); UTIL_TIMER_Start(&YunhornSTSHeartBeatTimer); /* USER CODE BEGIN OnYunhornSTSHeartBeatPeriodicityChanged_2 */ - APP_LOG(TS_OFF, VLEVEL_H,"* STS HeartBeatPeriodicity = %u (sec)\r\n", newperiodicity/1000 ); + + APP_LOG(TS_OFF, VLEVEL_M,"* STS HeartBeatPeriodicity = %u (sec)\r\n", periodicity/1000 ); + /* USER CODE END OnYunhornSTSHeartBeatPeriodicityChanged_2 */ } @@ -1502,13 +1506,17 @@ void OnYunhornSTSTxPeriodicityChanged(uint32_t periodicity) /* USER CODE END OnYunhornSTSTxPeriodicityChanged */ /* Update timer OnYunhornSTSTxPeriodicityChanged */ - + OnTxPeriodicityChanged(periodicity); + /* UTIL_TIMER_Stop(&TxTimer); TxPeriodicity = periodicity; UTIL_TIMER_SetPeriod(&TxTimer, TxPeriodicity); UTIL_TIMER_Start(&TxTimer); + */ /* USER CODE BEGIN OnYunhornSTSTxPeriodicityChanged */ - APP_LOG(TS_OFF, VLEVEL_H,"* STS TxPeriodicity = %u (sec)\r\n", TxPeriodicity/1000 ); + + APP_LOG(TS_OFF, VLEVEL_H,"\n* STS TxPeriodicity = %u (sec)\r\n", TxPeriodicity/1000 ); + /* USER CODE END OnYunhornSTSTxPeriodicityChanged */ } diff --git a/LoRaWAN/App/lora_app.h b/LoRaWAN/App/lora_app.h index ae4a403..52f4d16 100644 --- a/LoRaWAN/App/lora_app.h +++ b/LoRaWAN/App/lora_app.h @@ -68,7 +68,7 @@ extern "C" { /*! * LoRaWAN default class */ -#define LORAWAN_DEFAULT_CLASS CLASS_A +#define LORAWAN_DEFAULT_CLASS CLASS_C /*! * LoRaWAN default confirm state diff --git a/LoRaWAN/Target/lorawan_conf.h b/LoRaWAN/Target/lorawan_conf.h index 9ddccb0..1706743 100644 --- a/LoRaWAN/Target/lorawan_conf.h +++ b/LoRaWAN/Target/lorawan_conf.h @@ -109,7 +109,7 @@ extern "C" { * - CHANNEL_PLAN_GROUP_AS923_4 (Freq offset = -5.90 MHz / Freq range = 917-920MHz) * - CHANNEL_PLAN_GROUP_AS923_1_JP (Freq offset = 0.0 MHz / Freq range = 920.6-923.4MHz) */ -#define REGION_AS923_DEFAULT_CHANNEL_PLAN CHANNEL_PLAN_GROUP_AS923_1_JP +#define REGION_AS923_DEFAULT_CHANNEL_PLAN CHANNEL_PLAN_GROUP_AS923_1 /*! * @brief Limits the number usable channels by default for AU915, CN470 and US915 regions diff --git a/STM32CubeIDE/.project b/STM32CubeIDE/.project index be2acd3..4196939 100644 --- a/STM32CubeIDE/.project +++ b/STM32CubeIDE/.project @@ -562,6 +562,11 @@ 1 copy_PARENT/STS/Core/Src/yunhorn_sts_process.c + + Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.c + 1 + copy_PARENT/STS/TOF/App/X-WL55_WLE5_53L0X.c + Application/User/STS/TOF/App/app_tof.c 1 @@ -572,6 +577,11 @@ 1 copy_PARENT/STS/TOF/App/app_tof.h + + Application/User/STS/TOF/App/app_tof_vl53l0x_range.c + 1 + copy_PARENT/STS/TOF/App/app_tof_vl53l0x_range.c + Application/User/STS/TOF/Target/app_tof_pin_conf.c 1 diff --git a/STM32CubeIDE/Release/Application/User/STS/TOF/App/subdir.mk b/STM32CubeIDE/Release/Application/User/STS/TOF/App/subdir.mk index aaafc6d..a1b3687 100644 --- a/STM32CubeIDE/Release/Application/User/STS/TOF/App/subdir.mk +++ b/STM32CubeIDE/Release/Application/User/STS/TOF/App/subdir.mk @@ -5,23 +5,33 @@ # Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ -D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/app_tof.c +D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/X-WL55_WLE5_53L0X.c \ +D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/app_tof.c \ +D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/app_tof_vl53l0x_range.c OBJS += \ -./Application/User/STS/TOF/App/app_tof.o +./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.o \ +./Application/User/STS/TOF/App/app_tof.o \ +./Application/User/STS/TOF/App/app_tof_vl53l0x_range.o C_DEPS += \ -./Application/User/STS/TOF/App/app_tof.d +./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.d \ +./Application/User/STS/TOF/App/app_tof.d \ +./Application/User/STS/TOF/App/app_tof_vl53l0x_range.d # Each subdirectory must supply rules for building sources it contributes +Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.o: D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/X-WL55_WLE5_53L0X.c Application/User/STS/TOF/App/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_R4 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WLE5xx -c -I../../Core/Inc -I../../STS/Core/Inc -I../../STS/TOF/App -I../../STS/TOF/Target -I../../STS/TOF/vl53l1x_uld -I../../STS/TOF/vl53l0x -I../../LoRaWAN/App -I../../LoRaWAN/Target -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../../../../Utilities/trace/adv_trace -I../../../../../../../Utilities/misc -I../../../../../../../Utilities/sequencer -I../../../../../../../Utilities/timer -I../../../../../../../Utilities/lpm/tiny_lpm -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler/Packages -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Crypto -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac/Region -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Utilities -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver -I../../../../../../../Middlewares/ST/STM32_Cryptographic/include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../../../../Drivers/BSP/Components/vl53l8cx/porting -I../../../../../../../Drivers/BSP/Components/Common -I../../../../../../../Drivers/BSP/53L8A1 -I../../../../../../../Drivers/BSP/Components/vl53l8cx/modules -I../../../../../../../Drivers/BSP/Components/vl53l8cx -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" Application/User/STS/TOF/App/app_tof.o: D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/app_tof.c Application/User/STS/TOF/App/subdir.mk arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_R4 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WLE5xx -c -I../../Core/Inc -I../../STS/Core/Inc -I../../STS/TOF/App -I../../STS/TOF/Target -I../../STS/TOF/vl53l1x_uld -I../../STS/TOF/vl53l0x -I../../LoRaWAN/App -I../../LoRaWAN/Target -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../../../../Utilities/trace/adv_trace -I../../../../../../../Utilities/misc -I../../../../../../../Utilities/sequencer -I../../../../../../../Utilities/timer -I../../../../../../../Utilities/lpm/tiny_lpm -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler/Packages -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Crypto -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac/Region -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Utilities -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver -I../../../../../../../Middlewares/ST/STM32_Cryptographic/include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../../../../Drivers/BSP/Components/vl53l8cx/porting -I../../../../../../../Drivers/BSP/Components/Common -I../../../../../../../Drivers/BSP/53L8A1 -I../../../../../../../Drivers/BSP/Components/vl53l8cx/modules -I../../../../../../../Drivers/BSP/Components/vl53l8cx -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" +Application/User/STS/TOF/App/app_tof_vl53l0x_range.o: D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/WLE5CC_NODE_STS/STS/TOF/App/app_tof_vl53l0x_range.c Application/User/STS/TOF/App/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_R4 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WLE5xx -c -I../../Core/Inc -I../../STS/Core/Inc -I../../STS/TOF/App -I../../STS/TOF/Target -I../../STS/TOF/vl53l1x_uld -I../../STS/TOF/vl53l0x -I../../LoRaWAN/App -I../../LoRaWAN/Target -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../../../../Utilities/trace/adv_trace -I../../../../../../../Utilities/misc -I../../../../../../../Utilities/sequencer -I../../../../../../../Utilities/timer -I../../../../../../../Utilities/lpm/tiny_lpm -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler/Packages -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Crypto -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac/Region -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Utilities -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver -I../../../../../../../Middlewares/ST/STM32_Cryptographic/include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../../../../Drivers/BSP/Components/vl53l8cx/porting -I../../../../../../../Drivers/BSP/Components/Common -I../../../../../../../Drivers/BSP/53L8A1 -I../../../../../../../Drivers/BSP/Components/vl53l8cx/modules -I../../../../../../../Drivers/BSP/Components/vl53l8cx -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" clean: clean-Application-2f-User-2f-STS-2f-TOF-2f-App clean-Application-2f-User-2f-STS-2f-TOF-2f-App: - -$(RM) ./Application/User/STS/TOF/App/app_tof.cyclo ./Application/User/STS/TOF/App/app_tof.d ./Application/User/STS/TOF/App/app_tof.o ./Application/User/STS/TOF/App/app_tof.su + -$(RM) ./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.cyclo ./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.d ./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.o ./Application/User/STS/TOF/App/X-WL55_WLE5_53L0X.su ./Application/User/STS/TOF/App/app_tof.cyclo ./Application/User/STS/TOF/App/app_tof.d ./Application/User/STS/TOF/App/app_tof.o ./Application/User/STS/TOF/App/app_tof.su ./Application/User/STS/TOF/App/app_tof_vl53l0x_range.cyclo ./Application/User/STS/TOF/App/app_tof_vl53l0x_range.d ./Application/User/STS/TOF/App/app_tof_vl53l0x_range.o ./Application/User/STS/TOF/App/app_tof_vl53l0x_range.su .PHONY: clean-Application-2f-User-2f-STS-2f-TOF-2f-App diff --git a/STM32CubeIDE/Release/Application/User/STS/TOF/App_l1cb/Src/subdir.mk b/STM32CubeIDE/Release/Application/User/STS/TOF/App_l1cb/Src/subdir.mk new file mode 100644 index 0000000..acbe69a --- /dev/null +++ b/STM32CubeIDE/Release/Application/User/STS/TOF/App_l1cb/Src/subdir.mk @@ -0,0 +1,9 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (12.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables + +# Each subdirectory must supply rules for building sources it contributes + diff --git a/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l0x/subdir.mk b/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l0x/subdir.mk index 7effbaf..acbe69a 100644 --- a/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l0x/subdir.mk +++ b/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l0x/subdir.mk @@ -1,9 +1,9 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (12.3.rel1) -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables - -# Each subdirectory must supply rules for building sources it contributes - +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (12.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables + +# Each subdirectory must supply rules for building sources it contributes + diff --git a/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l1cb/modules/subdir.mk b/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l1cb/modules/subdir.mk new file mode 100644 index 0000000..acbe69a --- /dev/null +++ b/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l1cb/modules/subdir.mk @@ -0,0 +1,9 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (12.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables + +# Each subdirectory must supply rules for building sources it contributes + diff --git a/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l1cb/porting/subdir.mk b/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l1cb/porting/subdir.mk new file mode 100644 index 0000000..acbe69a --- /dev/null +++ b/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l1cb/porting/subdir.mk @@ -0,0 +1,9 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (12.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables + +# Each subdirectory must supply rules for building sources it contributes + diff --git a/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l1cb/subdir.mk b/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l1cb/subdir.mk new file mode 100644 index 0000000..acbe69a --- /dev/null +++ b/STM32CubeIDE/Release/Application/User/STS/TOF/vl53l1cb/subdir.mk @@ -0,0 +1,9 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (12.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables + +# Each subdirectory must supply rules for building sources it contributes + diff --git a/STM32CubeIDE/Release/Drivers/BSP/53L8A1/subdir.mk b/STM32CubeIDE/Release/Drivers/BSP/53L8A1/subdir.mk new file mode 100644 index 0000000..6e429c3 --- /dev/null +++ b/STM32CubeIDE/Release/Drivers/BSP/53L8A1/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (12.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +/53l8a1_ranging_sensor.c + +OBJS += \ +./Drivers/BSP/53L8A1/53l8a1_ranging_sensor.o + +C_DEPS += \ +./Drivers/BSP/53L8A1/53l8a1_ranging_sensor.d + + +# Each subdirectory must supply rules for building sources it contributes +Drivers/BSP/53L8A1/53l8a1_ranging_sensor.o: /53l8a1_ranging_sensor.c Drivers/BSP/53L8A1/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_R4 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WLE5xx -c -I../../Core/Inc -I../../STS/Core/Inc -I../../STS/TOF/App -I../../STS/TOF/Target -I../../STS/TOF/vl53l1x_uld -I../../STS/TOF/vl53l0x -I../../LoRaWAN/App -I../../LoRaWAN/Target -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../../../../Utilities/trace/adv_trace -I../../../../../../../Utilities/misc -I../../../../../../../Utilities/sequencer -I../../../../../../../Utilities/timer -I../../../../../../../Utilities/lpm/tiny_lpm -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler/Packages -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Crypto -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac/Region -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Utilities -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver -I../../../../../../../Middlewares/ST/STM32_Cryptographic/include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../../../../Drivers/BSP/Components/vl53l8cx/porting -I../../../../../../../Drivers/BSP/Components/Common -I../../../../../../../Drivers/BSP/53L8A1 -I../../../../../../../Drivers/BSP/Components/vl53l8cx/modules -I../../../../../../../Drivers/BSP/Components/vl53l8cx -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" + +clean: clean-Drivers-2f-BSP-2f-53L8A1 + +clean-Drivers-2f-BSP-2f-53L8A1: + -$(RM) ./Drivers/BSP/53L8A1/53l8a1_ranging_sensor.cyclo ./Drivers/BSP/53L8A1/53l8a1_ranging_sensor.d ./Drivers/BSP/53L8A1/53l8a1_ranging_sensor.o ./Drivers/BSP/53L8A1/53l8a1_ranging_sensor.su + +.PHONY: clean-Drivers-2f-BSP-2f-53L8A1 + diff --git a/STM32CubeIDE/Release/Drivers/BSP/Components/subdir.mk b/STM32CubeIDE/Release/Drivers/BSP/Components/subdir.mk new file mode 100644 index 0000000..781778a --- /dev/null +++ b/STM32CubeIDE/Release/Drivers/BSP/Components/subdir.mk @@ -0,0 +1,52 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (12.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +D:/ONEDRIVE/STM32WLV13/Drivers/BSP/Components/vl53l8cx/vl53l8cx.c \ +D:/ONEDRIVE/STM32WLV13/Drivers/BSP/Components/vl53l8cx/modules/vl53l8cx_api.c \ +D:/ONEDRIVE/STM32WLV13/Drivers/BSP/Components/vl53l8cx/modules/vl53l8cx_plugin_detection_thresholds.c \ +D:/ONEDRIVE/STM32WLV13/Drivers/BSP/Components/vl53l8cx/modules/vl53l8cx_plugin_motion_indicator.c \ +D:/ONEDRIVE/STM32WLV13/Drivers/BSP/Components/vl53l8cx/modules/vl53l8cx_plugin_xtalk.c \ +D:/ONEDRIVE/STM32WLV13/Drivers/BSP/Components/vl53l8cx/porting/wle5cc_platform.c + +OBJS += \ +./Drivers/BSP/Components/vl53l8cx.o \ +./Drivers/BSP/Components/vl53l8cx_api.o \ +./Drivers/BSP/Components/vl53l8cx_plugin_detection_thresholds.o \ +./Drivers/BSP/Components/vl53l8cx_plugin_motion_indicator.o \ +./Drivers/BSP/Components/vl53l8cx_plugin_xtalk.o \ +./Drivers/BSP/Components/wle5cc_platform.o + +C_DEPS += \ +./Drivers/BSP/Components/vl53l8cx.d \ +./Drivers/BSP/Components/vl53l8cx_api.d \ +./Drivers/BSP/Components/vl53l8cx_plugin_detection_thresholds.d \ +./Drivers/BSP/Components/vl53l8cx_plugin_motion_indicator.d \ +./Drivers/BSP/Components/vl53l8cx_plugin_xtalk.d \ +./Drivers/BSP/Components/wle5cc_platform.d + + +# Each subdirectory must supply rules for building sources it contributes +Drivers/BSP/Components/vl53l8cx.o: D:/ONEDRIVE/STM32WLV13/Drivers/BSP/Components/vl53l8cx/vl53l8cx.c Drivers/BSP/Components/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_R4 -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/BSP/Components/vl53l8cx_api.o: D:/ONEDRIVE/STM32WLV13/Drivers/BSP/Components/vl53l8cx/modules/vl53l8cx_api.c Drivers/BSP/Components/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_R4 -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/BSP/Components/vl53l8cx_plugin_detection_thresholds.o: D:/ONEDRIVE/STM32WLV13/Drivers/BSP/Components/vl53l8cx/modules/vl53l8cx_plugin_detection_thresholds.c Drivers/BSP/Components/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_R4 -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/BSP/Components/vl53l8cx_plugin_motion_indicator.o: D:/ONEDRIVE/STM32WLV13/Drivers/BSP/Components/vl53l8cx/modules/vl53l8cx_plugin_motion_indicator.c Drivers/BSP/Components/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_R4 -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/BSP/Components/vl53l8cx_plugin_xtalk.o: D:/ONEDRIVE/STM32WLV13/Drivers/BSP/Components/vl53l8cx/modules/vl53l8cx_plugin_xtalk.c Drivers/BSP/Components/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_R4 -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/BSP/Components/wle5cc_platform.o: D:/ONEDRIVE/STM32WLV13/Drivers/BSP/Components/vl53l8cx/porting/wle5cc_platform.c Drivers/BSP/Components/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_R4 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WLE5xx -c -I../../Core/Inc -I../../STS/Core/Inc -I../../STS/TOF/App -I../../STS/TOF/Target -I../../STS/TOF/vl53l1x_uld -I../../STS/TOF/vl53l0x -I../../LoRaWAN/App -I../../LoRaWAN/Target -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../../../../Utilities/trace/adv_trace -I../../../../../../../Utilities/misc -I../../../../../../../Utilities/sequencer -I../../../../../../../Utilities/timer -I../../../../../../../Utilities/lpm/tiny_lpm -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler/Packages -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Crypto -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac/Region -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Utilities -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver -I../../../../../../../Middlewares/ST/STM32_Cryptographic/include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../../../../Drivers/BSP/Components/vl53l8cx/porting -I../../../../../../../Drivers/BSP/Components/Common -I../../../../../../../Drivers/BSP/53L8A1 -I../../../../../../../Drivers/BSP/Components/vl53l8cx/modules -I../../../../../../../Drivers/BSP/Components/vl53l8cx -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" + +clean: clean-Drivers-2f-BSP-2f-Components + +clean-Drivers-2f-BSP-2f-Components: + -$(RM) ./Drivers/BSP/Components/vl53l8cx.cyclo ./Drivers/BSP/Components/vl53l8cx.d ./Drivers/BSP/Components/vl53l8cx.o ./Drivers/BSP/Components/vl53l8cx.su ./Drivers/BSP/Components/vl53l8cx_api.cyclo ./Drivers/BSP/Components/vl53l8cx_api.d ./Drivers/BSP/Components/vl53l8cx_api.o ./Drivers/BSP/Components/vl53l8cx_api.su ./Drivers/BSP/Components/vl53l8cx_plugin_detection_thresholds.cyclo ./Drivers/BSP/Components/vl53l8cx_plugin_detection_thresholds.d ./Drivers/BSP/Components/vl53l8cx_plugin_detection_thresholds.o ./Drivers/BSP/Components/vl53l8cx_plugin_detection_thresholds.su ./Drivers/BSP/Components/vl53l8cx_plugin_motion_indicator.cyclo ./Drivers/BSP/Components/vl53l8cx_plugin_motion_indicator.d ./Drivers/BSP/Components/vl53l8cx_plugin_motion_indicator.o ./Drivers/BSP/Components/vl53l8cx_plugin_motion_indicator.su ./Drivers/BSP/Components/vl53l8cx_plugin_xtalk.cyclo ./Drivers/BSP/Components/vl53l8cx_plugin_xtalk.d ./Drivers/BSP/Components/vl53l8cx_plugin_xtalk.o ./Drivers/BSP/Components/vl53l8cx_plugin_xtalk.su ./Drivers/BSP/Components/wle5cc_platform.cyclo ./Drivers/BSP/Components/wle5cc_platform.d ./Drivers/BSP/Components/wle5cc_platform.o ./Drivers/BSP/Components/wle5cc_platform.su + +.PHONY: clean-Drivers-2f-BSP-2f-Components + diff --git a/STM32CubeIDE/Release/Drivers/BSP/STM32WLxx_Nucleo/subdir.mk b/STM32CubeIDE/Release/Drivers/BSP/STM32WLxx_Nucleo/subdir.mk index 016fab4..7effbaf 100644 --- a/STM32CubeIDE/Release/Drivers/BSP/STM32WLxx_Nucleo/subdir.mk +++ b/STM32CubeIDE/Release/Drivers/BSP/STM32WLxx_Nucleo/subdir.mk @@ -4,29 +4,6 @@ ################################################################################ # Add inputs and outputs from these tool invocations to the build variables -C_SRCS += \ -D:/ONEDRIVE/STM32WLV13/Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo.c \ -D:/ONEDRIVE/STM32WLV13/Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo_radio.c - -OBJS += \ -./Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo.o \ -./Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo_radio.o - -C_DEPS += \ -./Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo.d \ -./Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo_radio.d - # Each subdirectory must supply rules for building sources it contributes -Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo.o: D:/ONEDRIVE/STM32WLV13/Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo.c Drivers/BSP/STM32WLxx_Nucleo/subdir.mk - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_R4 -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/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo_radio.o: D:/ONEDRIVE/STM32WLV13/Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo_radio.c Drivers/BSP/STM32WLxx_Nucleo/subdir.mk - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DSTS_R4 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WLE5xx -c -I../../Core/Inc -I../../STS/Core/Inc -I../../STS/TOF/App -I../../STS/TOF/Target -I../../STS/TOF/vl53l1x_uld -I../../STS/TOF/vl53l0x -I../../LoRaWAN/App -I../../LoRaWAN/Target -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../../../../Utilities/trace/adv_trace -I../../../../../../../Utilities/misc -I../../../../../../../Utilities/sequencer -I../../../../../../../Utilities/timer -I../../../../../../../Utilities/lpm/tiny_lpm -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler/Packages -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Crypto -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac/Region -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac -I../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler -I../../../../../../../Middlewares/Third_Party/LoRaWAN/Utilities -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy -I../../../../../../../Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver -I../../../../../../../Middlewares/ST/STM32_Cryptographic/include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../../../../Drivers/BSP/Components/vl53l8cx/porting -I../../../../../../../Drivers/BSP/Components/Common -I../../../../../../../Drivers/BSP/53L8A1 -I../../../../../../../Drivers/BSP/Components/vl53l8cx/modules -I../../../../../../../Drivers/BSP/Components/vl53l8cx -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" - -clean: clean-Drivers-2f-BSP-2f-STM32WLxx_Nucleo - -clean-Drivers-2f-BSP-2f-STM32WLxx_Nucleo: - -$(RM) ./Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo.cyclo ./Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo.d ./Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo.o ./Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo.su ./Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo_radio.cyclo ./Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo_radio.d ./Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo_radio.o ./Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo_radio.su - -.PHONY: clean-Drivers-2f-BSP-2f-STM32WLxx_Nucleo diff --git a/STM32CubeIDE/Release/makefile b/STM32CubeIDE/Release/makefile index d69689a..2173897 100644 --- a/STM32CubeIDE/Release/makefile +++ b/STM32CubeIDE/Release/makefile @@ -14,7 +14,9 @@ RM := rm -rf -include Middlewares/LoRaWAN/subdir.mk -include Drivers/STM32WLxx_HAL_Driver/subdir.mk -include Drivers/CMSIS/subdir.mk +-include Drivers/BSP/STM32WLxx_Nucleo/subdir.mk -include Application/User/Startup/subdir.mk +-include Application/User/STS/TOF/vl53l0x/subdir.mk -include Application/User/STS/TOF/Target/subdir.mk -include Application/User/STS/TOF/App/subdir.mk -include Application/User/STS/Core/Src/subdir.mk diff --git a/STM32CubeIDE/Release/sources.mk b/STM32CubeIDE/Release/sources.mk index 5a59fc8..a6f330f 100644 --- a/STM32CubeIDE/Release/sources.mk +++ b/STM32CubeIDE/Release/sources.mk @@ -28,7 +28,9 @@ Application/User/LoRaWAN/Target \ Application/User/STS/Core/Src \ Application/User/STS/TOF/App \ Application/User/STS/TOF/Target \ +Application/User/STS/TOF/vl53l0x \ Application/User/Startup \ +Drivers/BSP/STM32WLxx_Nucleo \ Drivers/CMSIS \ Drivers/STM32WLxx_HAL_Driver \ Middlewares/LoRaWAN \ diff --git a/STS/Core/Src/yunhorn_sts_process.c b/STS/Core/Src/yunhorn_sts_process.c index b66dea1..9326b67 100644 --- a/STS/Core/Src/yunhorn_sts_process.c +++ b/STS/Core/Src/yunhorn_sts_process.c @@ -58,9 +58,14 @@ volatile sts_cfg_nvm_t sts_cfg_nvm = { sts_version, sts_hardware_ver, 0x05, //Regular TxPeriodicity interval - 'M', //Uplink data interval unit, for heart-beat uplink + 'M', //TxPeriodicity Uplink data interval unit +#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 +#else + 0x3C, //Heart-beat interval , for heart-beat uplink + 'M', //Heart-beat interval unit +#endif 0x04, // dual mode=4, uni_mode =5 0x00, // sts service mask 0x00, //sts_ioc_mask @@ -105,7 +110,7 @@ volatile sts_cfg_nvm_t sts_cfg_nvm = { // below 20 bytes for RFAC code {0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0} }; -//volatile uint8_t nvm_store_value[YUNHORN_STS_MAX_NVM_CFG_SIZE]={0x0}; +volatile uint8_t nvm_store_value[YUNHORN_STS_MAX_NVM_CFG_SIZE]={0x0}; volatile uint8_t sts_ac_code[20]={0x0}; volatile uint8_t sts_service_mask=STS_SERVICE_MASK_L0; volatile uint8_t sts_work_mode=4; @@ -114,11 +119,9 @@ volatile uint16_t sts_sensor_install_height=3000; volatile uint8_t sensor_data_ready=0; #if defined(STS_R1)||defined(STS_R5)||defined(STS_R4)||defined(STS_R1D) -volatile uint32_t STS_TOFScanPeriod_msec=50, STS_TxPeriod_sec=300, STS_HeartBeatTimerPeriod_sec=3600; -#endif - -#if defined(STS_L8)||defined(STS_P2)||defined(STS_O6T)||defined(STS_T6) -volatile uint32_t STS_TOFScanPeriod_msec=5000, STS_TxPeriod_sec=10, STS_HeartBeatTimerPeriod_sec=60; +volatile uint32_t STS_TOFScanPeriod_msec=50, STS_TxPeriod_sec=30, STS_HeartBeatTimerPeriod_sec=300; +#elif defined(STS_L8)||defined(STS_P2)||defined(STS_O6T)||defined(STS_T6) +volatile uint32_t STS_TOFScanPeriod_msec=5000, STS_TxPeriod_sec=10, STS_HeartBeatTimerPeriod_sec=300; #endif static uint8_t outbuf[128]={0x0}; @@ -477,7 +480,7 @@ void STS_YunhornSTSEventP6_Process(void) //sts_soap_level_state = 0; sts_soap_level_state = HAL_GPIO_ReadPin(SOAP_STATUS_GPIO_Port,SOAP_STATUS_Pin); //APP_LOG(TS_OFF, VLEVEL_M, "\r\n Soap State = 0x%02X \r\n", sts_soap_level_state); - APP_LOG(TS_OFF, VLEVEL_L, "\r\n Soap State = %s \r\n", (sts_soap_level_state==0x0)?" +++ Liquid Detected":" --- No Liquid"); + APP_LOG(TS_OFF, VLEVEL_M, "\r\n Soap State read=%02x State: %s \r\n", sts_soap_level_state, (sts_soap_level_state==0x0)?" +++ Liquid Detected":" --- No Liquid"); HAL_GPIO_WritePin(SOAP_SWITCH_GPIO_Port, SOAP_SWITCH_Pin, GPIO_PIN_RESET); @@ -1226,7 +1229,7 @@ void USER_APP_AUTO_RESPONDER_Parse(uint8_t *parse_buffer, uint8_t parse_buffer_s STS_TxPeriod_sec = periodicity_length; TxPeriodicity = periodicity_length*1000; - APP_LOG(TS_OFF,VLEVEL_M, "\nTx Periodicty changed to %u", TxPeriodicity); + APP_LOG(TS_OFF,VLEVEL_M, "\nSTS Tx Periodicty changed to %u sec\n\r", STS_TxPeriod_sec); #ifdef STS_R4 OnYunhornSTSTxPeriodicityChanged(STS_TxPeriod_sec*1000); #endif @@ -1358,11 +1361,7 @@ void USER_APP_AUTO_RESPONDER_Parse(uint8_t *parse_buffer, uint8_t parse_buffer_s sts_cfg_nvm.sts_service_mask = sts_service_mask; OnStoreSTSCFGContextRequest(); - i=0; - UTIL_MEM_set_8((void*)outbuf, 0x0, sizeof(outbuf)); - UTIL_MEM_cpy_8((void*)outbuf,(void*)tlv_buf, parse_buffer_size); - i = parse_buffer_size; - STS_SENSOR_Upload_Message(YUNHORN_STS_USER_APP_CTRL_REPLY_PORT, i, (uint8_t *)outbuf); + } else { sts_service_mask = STS_SERVICE_MASK_L2; @@ -1370,6 +1369,12 @@ void USER_APP_AUTO_RESPONDER_Parse(uint8_t *parse_buffer, uint8_t parse_buffer_s sts_ac_code[19] =0x0; } + i=0; + UTIL_MEM_set_8((void*)outbuf, 0x0, sizeof(outbuf)); + UTIL_MEM_cpy_8((void*)outbuf,(void*)tlv_buf, parse_buffer_size); + i = parse_buffer_size; + STS_SENSOR_Upload_Message(YUNHORN_STS_USER_APP_CTRL_REPLY_PORT, i, (uint8_t *)outbuf); + } break; default: @@ -1466,50 +1471,56 @@ void OnStoreSTSCFGContextRequest(void) { /* USER CODE BEGIN OnStoreContextRequest_1 */ uint8_t i=0,j=0; - uint8_t nvm_store_value[YUNHORN_STS_MAX_NVM_CFG_SIZE]={0x0}; /* KEEP THIS LOCAL */ + uint8_t to_store__value[YUNHORN_STS_MAX_NVM_CFG_SIZE]={0x0}; /* KEEP THIS LOCAL */ sts_cfg_nvm.length = STS_NVM_CFG_SIZE; - nvm_store_value[i++] = sts_cfg_nvm.mtmcode1; - nvm_store_value[i++] = sts_cfg_nvm.mtmcode2; - nvm_store_value[i++] = sts_cfg_nvm.version; - nvm_store_value[i++] = sts_cfg_nvm.hardware_ver; - nvm_store_value[i++] = sts_cfg_nvm.periodicity; - nvm_store_value[i++] = sts_cfg_nvm.unit; - nvm_store_value[i++] = sts_cfg_nvm.sampling; - nvm_store_value[i++] = sts_cfg_nvm.s_unit; - nvm_store_value[i++] = sts_cfg_nvm.work_mode; - nvm_store_value[i++] = sts_cfg_nvm.sts_service_mask; - nvm_store_value[i++] = sts_cfg_nvm.sts_ioc_mask; - nvm_store_value[i++] = (uint8_t) STS_CFG_PCFG_SIZE; //sts_cfg_nvm.length; + to_store__value[i++] = sts_cfg_nvm.mtmcode1; + to_store__value[i++] = sts_cfg_nvm.mtmcode2; + to_store__value[i++] = sts_cfg_nvm.version; + to_store__value[i++] = sts_cfg_nvm.hardware_ver; + to_store__value[i++] = sts_cfg_nvm.periodicity; + to_store__value[i++] = sts_cfg_nvm.unit; + to_store__value[i++] = sts_cfg_nvm.sampling; + to_store__value[i++] = sts_cfg_nvm.s_unit; + to_store__value[i++] = sts_cfg_nvm.work_mode; + to_store__value[i++] = sts_cfg_nvm.sts_service_mask; + to_store__value[i++] = sts_cfg_nvm.sts_ioc_mask; + to_store__value[i++] = (uint8_t) STS_CFG_PCFG_SIZE; //sts_cfg_nvm.length; for (j = 0; j < STS_CFG_PCFG_SIZE; j++) { - nvm_store_value[i++] = (sts_cfg_nvm.p[j]); + to_store__value[i++] = (sts_cfg_nvm.p[j]); } - nvm_store_value[i++] = sts_cfg_nvm.reserve02; - nvm_store_value[i++] = sts_cfg_nvm.reserve03; - nvm_store_value[i++] = sts_cfg_nvm.sensor_install_height_in_10cm; - nvm_store_value[i++] = sts_cfg_nvm.alarm_parameter05; - nvm_store_value[i++] = sts_cfg_nvm.alarm_mute_reset_timer_in_10sec; - nvm_store_value[i++] = sts_cfg_nvm.alarm_lamp_bar_flashing_color; - nvm_store_value[i++] = sts_cfg_nvm.occupancy_overtime_threshold_in_10min; + to_store__value[i++] = sts_cfg_nvm.reserve02; + to_store__value[i++] = sts_cfg_nvm.reserve03; + to_store__value[i++] = sts_cfg_nvm.sensor_install_height_in_10cm; + to_store__value[i++] = sts_cfg_nvm.alarm_parameter05; + to_store__value[i++] = sts_cfg_nvm.alarm_mute_reset_timer_in_10sec; + to_store__value[i++] = sts_cfg_nvm.alarm_lamp_bar_flashing_color; + to_store__value[i++] = sts_cfg_nvm.occupancy_overtime_threshold_in_10min; - nvm_store_value[i++] = sts_cfg_nvm.motionless_duration_threshold_in_min; - nvm_store_value[i++] = sts_cfg_nvm.unconscious_or_motionless_level_threshold; - nvm_store_value[i++] = sts_cfg_nvm.fall_detection_acc_threshold; - nvm_store_value[i++] = sts_cfg_nvm.fall_detection_depth_threshold; - nvm_store_value[i++] = sts_cfg_nvm.fall_confirm_threshold_in_10sec; + to_store__value[i++] = sts_cfg_nvm.motionless_duration_threshold_in_min; + to_store__value[i++] = sts_cfg_nvm.unconscious_or_motionless_level_threshold; + to_store__value[i++] = sts_cfg_nvm.fall_detection_acc_threshold; + to_store__value[i++] = sts_cfg_nvm.fall_detection_depth_threshold; + to_store__value[i++] = sts_cfg_nvm.fall_confirm_threshold_in_10sec; - if ((sts_cfg_nvm.ac[0]!=0x0) && (sts_cfg_nvm.ac[19]!=0x0)) { - for (j = 0; j < YUNHORN_STS_AC_CODE_SIZE; j++) { - nvm_store_value[i++] = (sts_cfg_nvm.ac[j]); - } + if ((nvm_store_value[NVM_AC_CODE_START]!= 0x0) && (nvm_store_value[NVM_AC_CODE_START+19]!=0x0)) + { + //APP_LOG(TS_OFF, VLEVEL_M, "\n\r Transfer good NVM Stored ac_code to NVM_STORE_VALUE\r\n"); + UTIL_MEM_cpy_8((void*)&to_store__value[NVM_AC_CODE_START], (void*)&nvm_store_value[NVM_AC_CODE_START],YUNHORN_STS_AC_CODE_SIZE); + } else if ((sts_ac_code[0]!=0x0) && (sts_ac_code[YUNHORN_STS_AC_CODE_SIZE-1]!=0x0)) + { + //APP_LOG(TS_OFF, VLEVEL_M, "\n\r Transfer new generated ac_code to NVM_STORE_VALUE\r\n"); + UTIL_MEM_cpy_8((void*)&to_store__value[NVM_AC_CODE_START], (void*)sts_ac_code,YUNHORN_STS_AC_CODE_SIZE); + UTIL_MEM_cpy_8((void*)&nvm_store_value[NVM_AC_CODE_START], (void*)sts_ac_code,YUNHORN_STS_AC_CODE_SIZE); } + /* USER CODE END OnStoreContextRequest_1 */ /* store nvm in flash */ 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 *)nvm_store_value, YUNHORN_STS_MAX_NVM_CFG_SIZE); + FLASH_IF_Write(STS_CONFIG_NVM_BASE_ADDRESS, (const void *)to_store__value, YUNHORN_STS_MAX_NVM_CFG_SIZE); } /* USER CODE BEGIN OnStoreContextRequest_Last */ @@ -1533,14 +1544,15 @@ void OnRestoreSTSCFGContextRequest(uint8_t *cfg_in_nvm) void STS_REBOOT_CONFIG_Init(void) { /* USER CODE BEGIN OnRestoreContextRequest_1 */ - uint8_t nvm_store_value[YUNHORN_STS_MAX_NVM_CFG_SIZE]={0x0}; + //uint8_t nvm_store_value[YUNHORN_STS_MAX_NVM_CFG_SIZE]={0x0}; /* USER CODE END OnRestoreContextRequest_1 */ - FLASH_IF_Read(nvm_store_value, STS_CONFIG_NVM_BASE_ADDRESS, YUNHORN_STS_MAX_NVM_CFG_SIZE); + FLASH_IF_Read((void*)nvm_store_value, (void*)STS_CONFIG_NVM_BASE_ADDRESS, YUNHORN_STS_MAX_NVM_CFG_SIZE); + //STS_Show_STS_CFG_NVM((uint8_t*)nvm_store_value); /* USER CODE BEGIN OnRestoreContextRequest_Last */ if ((nvm_store_value[NVM_MTM1] != sts_mtmcode1) || (nvm_store_value[NVM_MTM2] != sts_mtmcode2) || (nvm_store_value[NVM_VER] != sts_version)) { - APP_LOG(TS_OFF, VLEVEL_M, "\r\nInitial Boot with Empty Config, Flash with default config....\r\n"); + APP_LOG(TS_OFF, VLEVEL_L, "\r\nInitial Boot with Empty Config, Flash with default config....\r\n"); OnStoreSTSCFGContextRequest(); //UTIL_MEM_set_8((void *)sts_ac_code, 0x00, YUNHORN_STS_AC_CODE_SIZE); HAL_Delay(1000); @@ -1583,7 +1595,7 @@ void STS_REBOOT_CONFIG_Init(void) } } - //STS_Show_STS_CFG_NVM((uint8_t*)nvm_store_value); + STS_Show_STS_CFG_NVM((uint8_t*)nvm_store_value); OnRestoreSTSCFGContextProcess(); /* USER CODE END OnRestoreContextRequest_Last */ @@ -1601,11 +1613,10 @@ void OnRestoreSTSCFGContextProcess(void) } periodicity = (periodicity > 10)? periodicity : 10; // in seconds unit - APP_LOG(TS_OFF, VLEVEL_H, "\n\n Tx periodicity in NVM =%u sec\n",periodicity); + APP_LOG(TS_OFF, VLEVEL_M, "\n\n Tx periodicity in NVM =%u sec\n",periodicity); TxPeriodicity= periodicity*1000; // to ms - STS_TxPeriod_sec = periodicity; - //STS_TxPeriod_sec=10, STS_HeartBeatTimerPeriod_sec=60; + uint32_t sampling_heartbeat_periodicity = (sts_cfg_nvm.sampling); //Heart-beat or Sampling interval if ((char)sts_cfg_nvm.s_unit =='M') { sampling_heartbeat_periodicity *= 60; @@ -1614,20 +1625,25 @@ void OnRestoreSTSCFGContextProcess(void) } else if ((char) sts_cfg_nvm.s_unit =='S') { sampling_heartbeat_periodicity *= 1; } + 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); + if ((sts_cfg_nvm.ac[0] ==0x0 )&& (sts_cfg_nvm.ac[19]==0x0)) { // ensure it's not in production yet - //OnTxPeriodicityChanged(APP_TX_DUTYCYCLE); // in msec unit - //OnYunhornSTSHeartBeatPeriodicityChanged(HeartBeatPeriodicity); TODO XXXX + + OnYunhornSTSTxPeriodicityChanged(APP_TX_DUTYCYCLE); // in msec unit + OnYunhornSTSHeartBeatPeriodicityChanged(APP_TX_DUTYCYCLE*5); //TODO XXXX + //OnTxPeriodicityChanged(10000); // APP_TX_DUTYCYCLE in msec unit - //TxPeriodicity = APP_TX_DUTYCYCLE; + TxPeriodicity = APP_TX_DUTYCYCLE; } else { OnYunhornSTSTxPeriodicityChanged(TxPeriodicity); // in msec unit - //OnTxPeriodicityChanged(periodicity*1000); + //OnTxPeriodicityChanged(TxPeriodicity); //Heart-beat or Sampling interval //sampling_heartbeat_periodicity = (sampling_heartbeat_periodicity > 0)? sampling_heartbeat_periodicity : 1; // in seconds unit //sampling_heartbeat_periodicity = sampling_heartbeat_periodicity*1000; @@ -1639,7 +1655,8 @@ void OnRestoreSTSCFGContextProcess(void) #endif #if defined(YUNHORN_STS_R0_ENABLED)||defined(YUNHORN_STS_R5_ENABLED)||defined(YUNHORN_STS_R4_ENABLED) - OnYunhornSTSHeartBeatPeriodicityChanged(sampling_heartbeat_periodicity*1000); + + OnYunhornSTSHeartBeatPeriodicityChanged(STS_HeartBeatTimerPeriod_sec*1000); #endif } @@ -1671,16 +1688,18 @@ void OnRestoreSTSCFGContextProcess(void) } -static void STS_Show_STS_CFG_NVM(uint8_t * nvm_store_value) +static void STS_Show_STS_CFG_NVM(uint8_t * store_value) { - APP_LOG(TS_OFF, VLEVEL_M, "\n *** STS_CFG_NVM ***\n"); + APP_LOG(TS_OFF, VLEVEL_M, "\n-----------------------------------------------\n"); APP_LOG(TS_OFF, VLEVEL_M, "\n00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15\n"); for (uint8_t i=0; i