initial platform setup

This commit is contained in:
Yunhorn 2023-10-08 17:13:27 +08:00
parent f152990dd3
commit ff58fc639c
10 changed files with 280 additions and 155 deletions

View File

@ -41,7 +41,7 @@
/*#define HAL_DAC_MODULE_ENABLED */
/*#define HAL_GTZC_MODULE_ENABLED */
/*#define HAL_HSEM_MODULE_ENABLED */
/*#define HAL_I2C_MODULE_ENABLED */
#define HAL_I2C_MODULE_ENABLED
/*#define HAL_I2S_MODULE_ENABLED */
/*#define HAL_IPCC_MODULE_ENABLED */
/*#define HAL_IRDA_MODULE_ENABLED */
@ -54,7 +54,7 @@
/*#define HAL_SMBUS_MODULE_ENABLED */
/*#define HAL_SPI_MODULE_ENABLED */
#define HAL_SUBGHZ_MODULE_ENABLED
/*#define HAL_TIM_MODULE_ENABLED */
#define HAL_TIM_MODULE_ENABLED
#define HAL_UART_MODULE_ENABLED
/*#define HAL_USART_MODULE_ENABLED */
/*#define HAL_WWDG_MODULE_ENABLED */

View File

@ -20,10 +20,11 @@
#include "main.h"
#include "app_lorawan.h"
#include "gpio.h"
#include "i2c.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "yunhorn_sts_sensors.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
@ -43,13 +44,16 @@
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
volatile uint16_t TIM2_Counter=0;
TIM_HandleTypeDef htim2;
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
/* USER CODE BEGIN PFP */
void MX_TIM2_Init(void);
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
@ -85,6 +89,9 @@ int main(void)
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_I2C1_Init();
MX_TIM2_Init();
MX_LoRaWAN_Init();
/* USER CODE BEGIN 2 */
@ -152,6 +159,100 @@ void SystemClock_Config(void)
/* USER CODE BEGIN 4 */
/**
* @brief TIM2 Initialization Function
* @param None
* @retval None
*/
void MX_TIM2_Init(void)
{
/* USER CODE BEGIN TIM2_Init 0 */
/* USER CODE END TIM2_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};
/* USER CODE BEGIN TIM2_Init 1 */
/* USER CODE END TIM2_Init 1 */
htim2.Instance = TIM2;
htim2.Init.Prescaler = PRESCALER_VALUE;
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
htim2.Init.Period = PERIOD_VALUE;
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim2) != HAL_OK)
{
Error_Handler();
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
if (HAL_TIM_ConfigClockSource(&htim2, &sClockSourceConfig) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM2_Init 2 */
/* USER CODE END TIM2_Init 2 */
}
/**
* @brief TIM_Base MSP Initialization
* This function configures the hardware resources used in this example
* @param htim_base: TIM_Base handle pointer
* @retval None
*/
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
{
if(htim_base->Instance==TIM2)
{
/* USER CODE BEGIN TIM2_MspInit 0 */
/* USER CODE END TIM2_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM2_CLK_ENABLE();
/* TIM2 interrupt Init */
HAL_NVIC_SetPriority(TIM2_IRQn, 3, 0);
HAL_NVIC_EnableIRQ(TIM2_IRQn);
/* USER CODE BEGIN TIM2_MspInit 1 */
/* USER CODE END TIM2_MspInit 1 */
}
}
/**
* @brief TIM_Base MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param htim_base: TIM_Base handle pointer
* @retval None
*/
void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
{
if(htim_base->Instance==TIM2)
{
/* USER CODE BEGIN TIM2_MspDeInit 0 */
/* USER CODE END TIM2_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_TIM2_CLK_DISABLE();
/* TIM2 interrupt DeInit */
HAL_NVIC_DisableIRQ(TIM2_IRQn);
/* USER CODE BEGIN TIM2_MspDeInit 1 */
/* USER CODE END TIM2_MspDeInit 1 */
}
}
/* USER CODE END 4 */
/**

View File

@ -137,6 +137,16 @@
<type>1</type>
<locationURI>copy_PARENT1/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_gpio.c</locationURI>
</link>
<link>
<name>Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c.c</name>
<type>1</type>
<locationURI>copy_PARENT1/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_i2c.c</locationURI>
</link>
<link>
<name>Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_i2c_ex.c</name>
<type>1</type>
<locationURI>copy_PARENT1/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_i2c_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr.c</name>
<type>1</type>
@ -402,6 +412,11 @@
<type>1</type>
<locationURI>copy_PARENT/Core/Src/gpio.c</locationURI>
</link>
<link>
<name>Application/User/Core/i2c.c</name>
<type>1</type>
<locationURI>copy_PARENT/Core/Src/i2c.c</locationURI>
</link>
<link>
<name>Application/User/Core/main.c</name>
<type>1</type>
@ -501,7 +516,7 @@
<variableList>
<variable>
<name>copy_PARENT</name>
<value>$%7BPARENT-3-PROJECT_LOC%7D/Projects/STS_AS923_M7</value>
<value>$%7BPARENT-1-PROJECT_LOC%7D</value>
</variable>
<variable>
<name>copy_PARENT1</name>

View File

@ -10,6 +10,7 @@ D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/adc_if.c \
D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/dma.c \
D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/flash_if.c \
D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/gpio.c \
D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/i2c.c \
D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/main.c \
D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/rtc.c \
D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/stm32_lpm_if.c \
@ -31,6 +32,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/main.o \
./Application/User/Core/rtc.o \
./Application/User/Core/stm32_lpm_if.o \
@ -52,6 +54,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/main.d \
./Application/User/Core/rtc.d \
./Application/User/Core/stm32_lpm_if.d \
@ -79,6 +82,8 @@ Application/User/Core/flash_if.o: D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/C
arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WL55xx -c -I../../Core/Inc -I../../LoRaWAN/App -I../../LoRaWAN/Target -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../../../../Drivers/CMSIS/Include -I../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../Utilities/trace/adv_trace -I../../../../Utilities/misc -I../../../../Utilities/sequencer -Og -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/STS_AS923_M7/Core/Src/gpio.c Application/User/Core/subdir.mk
arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WL55xx -c -I../../Core/Inc -I../../LoRaWAN/App -I../../LoRaWAN/Target -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../../../../Drivers/CMSIS/Include -I../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../Utilities/trace/adv_trace -I../../../../Utilities/misc -I../../../../Utilities/sequencer -Og -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/STS_AS923_M7/Core/Src/i2c.c Application/User/Core/subdir.mk
arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WL55xx -c -I../../Core/Inc -I../../LoRaWAN/App -I../../LoRaWAN/Target -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../../../../Drivers/CMSIS/Include -I../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../Utilities/trace/adv_trace -I../../../../Utilities/misc -I../../../../Utilities/sequencer -Og -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/STS_AS923_M7/Core/Src/main.c Application/User/Core/subdir.mk
arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WL55xx -c -I../../Core/Inc -I../../LoRaWAN/App -I../../LoRaWAN/Target -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../../../../Drivers/CMSIS/Include -I../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../Utilities/trace/adv_trace -I../../../../Utilities/misc -I../../../../Utilities/sequencer -Og -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/rtc.o: D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/rtc.c Application/User/Core/subdir.mk
@ -109,7 +114,7 @@ Application/User/Core/usart_if.o: D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/C
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/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/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/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/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/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/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

File diff suppressed because one or more lines are too long

View File

@ -3,6 +3,7 @@
"./Application/User/Core/dma.o"
"./Application/User/Core/flash_if.o"
"./Application/User/Core/gpio.o"
"./Application/User/Core/i2c.o"
"./Application/User/Core/main.o"
"./Application/User/Core/rtc.o"
"./Application/User/Core/stm32_lpm_if.o"
@ -36,6 +37,8 @@
"./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash.o"
"./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash_ex.o"
"./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_pwr.o"
"./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr_ex.o"
"./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc.o"

View File

@ -10,6 +10,7 @@ D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/adc_if.c \
D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/dma.c \
D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/flash_if.c \
D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/gpio.c \
D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/i2c.c \
D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/main.c \
D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/rtc.c \
D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/stm32_lpm_if.c \
@ -31,6 +32,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/main.o \
./Application/User/Core/rtc.o \
./Application/User/Core/stm32_lpm_if.o \
@ -52,6 +54,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/main.d \
./Application/User/Core/rtc.d \
./Application/User/Core/stm32_lpm_if.d \
@ -79,6 +82,8 @@ Application/User/Core/flash_if.o: D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/C
arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WL55xx -c -I../../Core/Inc -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../../../../Drivers/CMSIS/Include -I../../../../Drivers/BSP/STM32WLxx_Nucleo -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/STS_AS923_M7/Core/Src/gpio.c Application/User/Core/subdir.mk
arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WL55xx -c -I../../Core/Inc -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../../../../Drivers/CMSIS/Include -I../../../../Drivers/BSP/STM32WLxx_Nucleo -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/STS_AS923_M7/Core/Src/i2c.c Application/User/Core/subdir.mk
arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WL55xx -c -I../../Core/Inc -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../../../../Drivers/CMSIS/Include -I../../../../Drivers/BSP/STM32WLxx_Nucleo -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/STS_AS923_M7/Core/Src/main.c Application/User/Core/subdir.mk
arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32WL55xx -c -I../../Core/Inc -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../../../../Drivers/CMSIS/Include -I../../../../Drivers/BSP/STM32WLxx_Nucleo -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/rtc.o: D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/Core/Src/rtc.c Application/User/Core/subdir.mk
@ -109,7 +114,7 @@ Application/User/Core/usart_if.o: D:/ONEDRIVE/STM32WLV13/Projects/STS_AS923_M7/C
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/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/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/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/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/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/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

File diff suppressed because one or more lines are too long

View File

@ -3,6 +3,7 @@
"./Application/User/Core/dma.o"
"./Application/User/Core/flash_if.o"
"./Application/User/Core/gpio.o"
"./Application/User/Core/i2c.o"
"./Application/User/Core/main.o"
"./Application/User/Core/rtc.o"
"./Application/User/Core/stm32_lpm_if.o"
@ -36,6 +37,8 @@
"./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash.o"
"./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_flash_ex.o"
"./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_pwr.o"
"./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_pwr_ex.o"
"./Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_rcc.o"

View File

@ -1,16 +1,14 @@
/**
@page LoRaWAN_End_Node Readme file
@verbatim
******************************************************************************
* @file Applications/LoRaWAN/LoRaWAN_End_Node/readme.txt
* @author MCD Application Team
* @brief This application is a simple demo application software of a LoRa
* modem connecting to Network server. Data sent can be checked on
* Network server for eg Loriot. Traces are displayed over UART
******************************************************************************
*******************************************************************************
* @file Vibration Sensor for Consumer Product Detection and *
* Industry Level Machine Fault Analysis *
* @author Yunhorn (r) Technology Limited Application Team *
* @brief Yunhorn (r) SmarToilets (r) Product configuration file. *
*******************************************************************************
* @attention
*
* Copyright (c) 2020-2021 STMicroelectronics.
* Copyright (c) 2023 Yunhorn Technology Limited.
* Copyright (c) 2023 Shenzhen Yunhorn Technology Co., Ltd.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
@ -18,159 +16,134 @@
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
@endverbatim
*/
@par Description
============ STM32WL E5CCUX =======================================
BUT1_PIN PA.0 MEMS-INT1
BUT2_PIN PA.1 MEMS-INT2
This directory contains a set of source files that implements a LoRa application
device sending sensors data to LoRa Network server.
Data are sent periodically on timer event or on "user button 1" depending on the configuration.
#define BUT1_Pin GPIO_PIN_0 //MEMS-INT1-ACTIVITY-NO-ACTIVITY INT
#define BUT1_GPIO_Port GPIOA
#define BUT1_EXTI_IRQn EXTI0_IRQn
This application is targeting the STM32WLxx Nucleo board embedding the STM32WLxx.
******************************************************************************
#define BUT2_Pin GPIO_PIN_1 //MEMS-INT2- NOT USED
#define BUT2_GPIO_Port GPIOA
#define BUT2_EXTI_IRQn EXTI1_IRQn
@par Keywords
----- I2C1 --------------------------------------
SCL PB.06
SDA PB.07
Applications, SubGHz_Phy, LoRaWAN, End_Node, SingleCore
@par Directory contents
----- I2C2 --------------------------------------
SCL PA.12
SDA PA.11
- LoRaWAN_End_Node/Core/Inc/adc.h This file contains all the function prototypes for
the adc.c file
- LoRaWAN_End_Node/Core/Inc/adc_if.h Header for ADC interface configuration
- LoRaWAN_End_Node/Core/Inc/dma.h This file contains all the function prototypes for
the dma.c file
- LoRaWAN_End_Node/Core/Inc/flash_if.h This file contains definitions for FLASH Interface functionalities.
- LoRaWAN_End_Node/Core/Inc/gpio.h This file contains all the function prototypes for
the gpio.c file
- LoRaWAN_End_Node/Core/Inc/main.h : Header for main.c file.
This file contains the common defines of the application.
- LoRaWAN_End_Node/Core/Inc/platform.h Header for General HW instances configuration
- LoRaWAN_End_Node/Core/Inc/rtc.h This file contains all the function prototypes for
the rtc.c file
- LoRaWAN_End_Node/Core/Inc/stm32wlxx_hal_conf.h HAL configuration file.
- LoRaWAN_End_Node/Core/Inc/stm32wlxx_it.h This file contains the headers of the interrupt handlers.
- LoRaWAN_End_Node/Core/Inc/stm32wlxx_nucleo_conf.h STM32WLxx_Nucleo board configuration file.
- LoRaWAN_End_Node/Core/Inc/stm32_lpm_if.h Header for Low Power Manager interface configuration
- LoRaWAN_End_Node/Core/Inc/subghz.h This file contains all the function prototypes for
the subghz.c file
- LoRaWAN_End_Node/Core/Inc/sys_app.h Function prototypes for sys_app.c file
- LoRaWAN_End_Node/Core/Inc/sys_conf.h Applicative configuration, e.g. : debug, trace, low power, sensors
- LoRaWAN_End_Node/Core/Inc/sys_debug.h Configuration of the debug.c instances
- LoRaWAN_End_Node/Core/Inc/sys_sensors.h Header for sensors application
- LoRaWAN_End_Node/Core/Inc/timer_if.h configuration of the timer_if.c instances
- LoRaWAN_End_Node/Core/Inc/usart.h This file contains all the function prototypes for
the usart.c file
- LoRaWAN_End_Node/Core/Inc/usart_if.h Header for USART interface configuration
- LoRaWAN_End_Node/Core/Inc/utilities_conf.h Header for configuration file to utilities
- LoRaWAN_End_Node/Core/Inc/utilities_def.h Definitions for modules requiring utilities
- LoRaWAN_End_Node/LoRaWAN/App/app_lorawan.h Header of application of the LRWAN Middleware
- LoRaWAN_End_Node/LoRaWAN/App/app_version.h Definition the version of the application
- LoRaWAN_End_Node/LoRaWAN/App/CayenneLpp.h Implements the Cayenne Low Power Protocol
- LoRaWAN_End_Node/LoRaWAN/App/Commissioning.h End-device commissioning parameters
- LoRaWAN_End_Node/LoRaWAN/App/lora_app.h Header of application of the LRWAN Middleware
- LoRaWAN_End_Node/LoRaWAN/App/lora_info.h To give info to the application about LoRaWAN configuration
- LoRaWAN_End_Node/LoRaWAN/App/se-identity.h Secure Element identity and keys
- LoRaWAN_End_Node/LoRaWAN/Target/lorawan_conf.h Header for LoRaWAN middleware instances
- LoRaWAN_End_Node/LoRaWAN/Target/mw_log_conf.h Configure (enable/disable) traces
- LoRaWAN_End_Node/LoRaWAN/Target/radio_board_if.h Header for Radio interface configuration
- LoRaWAN_End_Node/LoRaWAN/Target/radio_conf.h Header of Radio configuration
- LoRaWAN_End_Node/LoRaWAN/Target/systime.h Map middleware systime
- LoRaWAN_End_Node/LoRaWAN/Target/timer.h Wrapper to timer server
EN-3V3 PB.04
- LoRaWAN_End_Node/Core/Src/adc.c This file provides code for the configuration
of the ADC instances.
- LoRaWAN_End_Node/Core/Src/adc_if.c Read status related to the chip (battery level, VREF, chip temperature)
- LoRaWAN_End_Node/Core/Src/dma.c This file provides code for the configuration
of all the requested memory to memory DMA transfers.
- LoRaWAN_End_Node/Core/Src/flash_if.c This file provides set of firmware functions to manage Flash
Interface functionalities.
- LoRaWAN_End_Node/Core/Src/gpio.c This file provides code for the configuration
of all used GPIO pins.
- LoRaWAN_End_Node/Core/Src/main.c : Main program body
- LoRaWAN_End_Node/Core/Src/rtc.c This file provides code for the configuration
of the RTC instances.
- LoRaWAN_End_Node/Core/Src/stm32wlxx_hal_msp.c This file provides code for the MSP Initialization
and de-Initialization codes.
- LoRaWAN_End_Node/Core/Src/stm32wlxx_it.c Interrupt Service Routines.
- LoRaWAN_End_Node/Core/Src/stm32_lpm_if.c Low layer function to enter/exit low power modes (stop, sleep)
- LoRaWAN_End_Node/Core/Src/subghz.c This file provides code for the configuration
of the SUBGHZ instances.
- LoRaWAN_End_Node/Core/Src/system_stm32wlxx.c CMSIS Cortex Device Peripheral Access Layer System Source File
- LoRaWAN_End_Node/Core/Src/sys_app.c Initializes HW and SW system entities (not related to the radio)
- LoRaWAN_End_Node/Core/Src/sys_debug.c Configure probes pins RealTime debugging and JTAG/SerialWires for LowPower
- LoRaWAN_End_Node/Core/Src/sys_sensors.c Manages the sensors on the application
- LoRaWAN_End_Node/Core/Src/timer_if.c Configure RTC Alarm, Tick and Calendar manager
- LoRaWAN_End_Node/Core/Src/usart.c This file provides code for the configuration
of the USART instances.
- LoRaWAN_End_Node/Core/Src/usart_if.c Configuration of UART driver interface for hyperterminal communication
- LoRaWAN_End_Node/LoRaWAN/App/app_lorawan.c Application of the LRWAN Middleware
- LoRaWAN_End_Node/LoRaWAN/App/CayenneLpp.c Implements the Cayenne Low Power Protocol
- LoRaWAN_End_Node/LoRaWAN/App/lora_app.c Application of the LRWAN Middleware
- LoRaWAN_End_Node/LoRaWAN/App/lora_info.c To give info to the application about LoRaWAN configuration
- LoRaWAN_End_Node/LoRaWAN/Target/radio_board_if.c This file provides an interface layer between MW and Radio Board
- LoRaWAN_End_Node/STM32CubeIDE/Application/User/Core/syscalls.c STM32CubeIDE Minimal System calls file
- LoRaWAN_End_Node/STM32CubeIDE/Application/User/Core/sysmem.c STM32CubeIDE System Memory calls file
============ STM32WL E5CCUX =======================================
@par Hardware and Software environment
- This example runs on the STM32WLxx Nucleo boards. Both NUCLEO-WL55JC1 (HIGH-BAND) and NUCLEO-WL55JC2 (LOW-BAND) are suitable.
- STM32WLxx Nucleo board Set-up
- Connect the Nucleo board to your PC with a USB cable type A to micro-B
to ST-LINK connector.
- Please ensure that the ST-LINK connector jumpers are fitted.
- Configure the software via the configuration files:
- sys_conf.h, radio_conf.h, lorawan_conf.h, lora_app.c, lora_app.h, Commissioning.h, se-identity.h, mw_log_conf.h, main.h, etc
- Careful:
- the region and class chosen on LoRaWAN/App/lora_app.h shall be compatible with LoRaWAN/Target/lorawan_conf.h list
============ STM32WL 55 ========================================
BUT1_PIN PA.0 CN10 Pin nbr 1 [PC.13 CN7 Pin nbr 23]
BUT2_PIN PA.1 CN10 Pin nbr 36
BUT3_PIN PC.6 CN10 Pin nbr 12 //// ADXL345-INT2
-Set Up:
#define BUT1_Pin GPIO_PIN_0
#define BUT1_GPIO_Port GPIOA
#define BUT1_EXTI_IRQn EXTI0_IRQn
-------------------------- V V --------------------------
| LoRa Object | | | | LoRa Network |
| | | | | |
ComPort<--| |--| |--| |-->Web Server
| | | |
-------------------------- --------------------------
#define BUT3_Pin GPIO_PIN_6
#define BUT3_GPIO_Port GPIOC
#define BUT3_EXTI_IRQn EXTI9_5_IRQn
@par How to use it ?
In order to make the program work, you must do the following :
- Open your preferred toolchain
- Rebuild all files and load your image into target memory
- Run the example
- Open a Terminal, connected the LoRa Object
- UART Config = 115200, 8b, 1 stopbit, no parity, no flow control
#define BUT2_Pin GPIO_PIN_1
#define BUT2_GPIO_Port GPIOA
#define BUT2_EXTI_IRQn EXTI1_IRQn
============ STM32WL 55 ========================================
@par How to debug ?
- make sure the flag DEBUGGER_ENABLED to 1 in sys_conf.h
- simpler to define the flag LOW_POWER_DISABLE to 1 as well
- compile, download and attach
============ STM32WL55JC confirmed =============
@par How to use MX to modify some RF middleware and application settings
This example is compatible (with some problems/limitations) with STM32CubeMX
and the RF application and middleware configuration can be modified via GUI. Few warnings and guidelines:
- ioc file is provided in the project directory and can be opened with STM32CubeMX v6.7.0 or higher.
- warning: when regenerating with the provided ioc file,
the IDE projects are regenerated and paths to HAL and MWs files from STM32Cube/Repository location are erroneously added; to avoid that,
user shall uncheck the "Use Default Firmware Location" in the GUI "Project-Manager" panel
and shall replace "Firmware Relative Path" with the root directory of the STM32CubeWL firmware package (e.g. C:\myDir\STM32Cube_FW_WL_V1.3.0\);
problem will be fixed in next STM32CubeMX version.
- .extSettings file allows to add to the generated IDE projects additional files not generated natively by MX (e.g. BSP files).
- when regenerating on existing code and existing linker files:
- STM32CubeMX updates the existing project content and preserves linker files.
- STM32CubeMX does not update the USER CODE sections (lines between /* USER CODE BEGIN Xxx */ and /* USER CODE END Xxx */).
- when regenerating after copying only the ioc file in an empty directory:
- STM32CubeMX generates default project files and default linker files. (Please check original linker file from project directory)
- it is up to the user to to fill the USER CODE sections with his application code.
===================================
@par How to use it with Azure ThreadX RTOS?
This example can be combined with Azure ThreadX RTOS via STM32CubeMX. The video tutorial:
"STM32WL - How to port an existing RF application on Azure ThreadX RTOS"
is available on https://www.youtube.com/playlist?list=PLnMKNibPkDnE2eaR-ZGM3ZJXadyQLtTpX
GNG GND=== CN7 PIN 20
VCC 3.3 ====CN7 PIN 16
===================================
SSD 1306 STM32WL55JC
----- I2C1 --------------------------------------
SCL PB.08 === CN10 pin 27
SDA PB.07 === CN10 pin 37
* <h3><center>&copy; COPYRIGHT STMicroelectronics</center></h3>
*/
----- I2C2 --------------------------------------
SCL PA.12 === CN10 pin 3
SDA PA.15 === CN7 pin 17
----- I2C3 --------------------------------------
SCL PB.13 === CN7 pin 38
SDA PB.4 === CN7 pin 34
--------------------SPI STM32WL55JC
--------------------SPI1 -------------------------------
CLK PA.05 ==== CN10 pin 11
MISO PA.06 ====- CN10 pin 13
MOSI PA.07 ==== CN10 pin 15
=======================================
===================================
===================================
/*!
* LoRaWAN Adaptive Data Rate
* @note Please note that when ADR is enabled the end-device should be static
*/
#define LORAWAN_ADR_STATE LORAMAC_HANDLER_ADR_OFF //LORAMAC_HANDLER_ADR_ON
===========================================================================================================
sys_sensor.c
Application/User/LoRaWAN/App
===========================================================================================================
LORA_APP.H
===/* Region ------------------------------------*/
//#define ACTIVE_REGION LORAMAC_REGION_EU868
#define ACTIVE_REGION LORAMAC_REGION_AS923
//#define LORAWAN_USER_APP_PORT 2
#define LORAWAN_USER_APP_PORT 11
/*!
* Defines the application data transmission duty cycle. 10s, value in [ms].
*/
#define APP_TX_DUTYCYCLE 60000
===========================================================================================================
/LoRaWAN/App/lora_info.c
lorawan_conf.h
===========================================================================================================
/* Region ------------------------------------*/
/* the region listed here will be linked in the MW code */
/* the application (on sys_conf.h) shall just configure one region at the time */
/*#define REGION_AS923*/
/*#define REGION_AU915*/
/*#define REGION_CN470*/
/*#define REGION_CN779*/
/*#define REGION_EU433*/
#define REGION_EU868
/*#define REGION_KR920*/
/*#define REGION_IN865*/
#define REGION_US915
/*#define REGION_RU864*/
===========================================================================================================
/* SmarToilets Products */