remove useless code

This commit is contained in:
Yunhorn 2023-06-28 18:04:17 +08:00
parent 7809a00d33
commit 39a2eb6ab3
7 changed files with 35 additions and 184 deletions

View File

@ -213,8 +213,8 @@
#define MajorVer 23U
#define MinorVer 04U
#define SubMinorVer 10U
#define MinorVer 06U
#define SubMinorVer 28U
#define FirmwareVersion 3U
#define YUNHORN_STS_MAX_NVM_CFG_SIZE 64U
#define YUNHORN_STS_AC_CODE_SIZE 20U
@ -353,11 +353,11 @@
#define BAT_ER26500_8500AH ((uint32_t) 3600)
#define BAT_ER14505_2P_4800MAH ((uint32_t) 3600)
#define BAT_STS_BOARD_3V3 ((uint32_t) 3300)
/*
#ifndef VDD_BAT
#define VDD_BAT BAT_STS_BOARD_3V3
#endif
*/
#define STS_BURN_IN_RFAC ((uint32_t) 2)

View File

@ -147,6 +147,7 @@ uint16_t SYS_GetBatteryLevel(void)
measuredLevel = ADC_ReadChannels(ADC_CHANNEL_VREFINT);
if (measuredLevel == 0)
{
batteryLevelmV = 0;
@ -169,6 +170,7 @@ uint16_t SYS_GetBatteryLevel(void)
}
return batteryLevelmV;
/* USER CODE BEGIN SYS_GetBatteryLevel_2 */
/* USER CODE END SYS_GetBatteryLevel_2 */

View File

@ -180,6 +180,7 @@ uint8_t GetBatteryLevel(void)
/* USER CODE END GetBatteryLevel_2 */
return batteryLevel; /* 1 (very low) to 254 (fully charged) */
}
int16_t GetTemperatureLevel(void)

View File

@ -453,7 +453,7 @@ void LoRaWAN_Init(void)
/* USER CODE END LoRaWAN_Init_LV */
/* USER CODE BEGIN LoRaWAN_Init_1 */
APP_LOG(TS_OFF, VLEVEL_M, "\r\n\n\n##### YUNHORN_STS_FW:%d SWV%d HWV:%d MTM:%d.%d R:%d.%d.%d####\r\n\n\n",
APP_LOG(TS_OFF, VLEVEL_M, "\r\n\n\n##### YUNHORN_STS_FW:%d SWV%d HWV:%d MTM:%d.%d R:%d.%d.%d ####\r\n\n\n",
FirmwareVersion, sts_version, sts_hardware_ver, sts_mtmcode1,sts_mtmcode2, MajorVer, MinorVer, SubMinorVer);
/* Get LoRaWAN APP version*/
@ -728,6 +728,7 @@ static void SendTxData(void)
/* USER CODE BEGIN SendTxData_1 */
LmHandlerErrorStatus_t status = LORAMAC_HANDLER_ERROR;
uint8_t batteryLevel = GetBatteryLevel();
//uint16_t batteryLevel = SYS_GetBatteryLevel();
sensor_t sensor_data;
STS_R0_SensorDataTypeDef r0_data;
UTIL_TIMER_Time_t nextTxIn = 0;
@ -739,12 +740,15 @@ static void SendTxData(void)
//UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_YunhornSTSEventP4), CFG_SEQ_Prio_0);
STS_R0_SENSOR_Read(&r0_data);
r0_data.battery_Pct = (uint8_t)(99*batteryLevel/254);
//r0_data.battery_Pct = batteryLevel; //(uint8_t)(99*batteryLevel/254);
EnvSensors_Read(&sensor_data);
// APP_LOG(TS_ON, VLEVEL_M, "\r\nVDDA: %d\r\n", batteryLevel);
// APP_LOG(TS_ON, VLEVEL_M, "\r\ntemp: %d\r\n", (int16_t)(sensor_data.temperature));
APP_LOG(TS_ON, VLEVEL_H, "\r\nDistance = %d VBAT=%d%%\r\n", r0_data.distance_mm, r0_data.battery_Pct);
APP_LOG(TS_ON, VLEVEL_L, "\r\nDistance = %d mm, VBAT=%d%%\r\n", r0_data.distance_mm, r0_data.battery_Pct);
AppData.Port = LORAWAN_USER_APP_PORT;
@ -752,7 +756,7 @@ static void SendTxData(void)
AppData.Buffer[i++] = (uint8_t)(0xFF & sts_mtmcode1); //mtmcode1; //#02
AppData.Buffer[i++] = (uint8_t)(0xFF & sts_mtmcode2); //mtmcode2; //#03
AppData.Buffer[i++] = (uint8_t)(0xFF & sts_hardware_ver); //hardware_Ver; //#04
AppData.Buffer[i++] = (uint8_t)(99*batteryLevel/254); //#05
AppData.Buffer[i++] = (uint8_t)(r0_data.battery_Pct); //#05
if (heart_beat_timer)

View File

@ -1,19 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.st.stm32cube.ide.mcu.debug.launch.launchConfigurationType">
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.jlink.device" value="STM32WLxx"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.jlink.endian" value="little"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.jlink.init_speed" value="4000"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.jlink.jlink_check_serial_number" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.jlink.jlink_script_path" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.jlink.jlink_script_used" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.jlink.jlink_txt_serial_number" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.jlink.reset_strategy" value="no_reset"/>
<intAttribute key="com.st.stm32cube.ide.mcu.debug.jlink.rtos_implementation" value="1"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.jlink.scan_chain_auto" value="true"/>
<intAttribute key="com.st.stm32cube.ide.mcu.debug.jlink.scan_chain_irpre" value="0"/>
<intAttribute key="com.st.stm32cube.ide.mcu.debug.jlink.scan_chain_pos" value="0"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.jlink.selected_rtos" value="RTOSPlugin_Azure"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.jlinkenable_rtos" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.access_port_id" value="0"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.cubeprog_external_loaders" value="[]"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_live_expr" value="true"/>
@ -22,16 +8,16 @@
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.ip_address_local" value="localhost"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.limit_swo_clock.enabled" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.limit_swo_clock.value" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.loadList" value="{&quot;fItems&quot;:[{&quot;fIsFromMainTab&quot;:true,&quot;fPath&quot;:&quot;Release/STS_R1R2R5_E5CC_L0X.elf&quot;,&quot;fProjectName&quot;:&quot;STS_R1R2R5_E5CC_L0X&quot;,&quot;fPerformBuild&quot;:true,&quot;fDownload&quot;:true,&quot;fLoadSymbols&quot;:true}]}"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.loadList" value="{&quot;fItems&quot;:[{&quot;fIsFromMainTab&quot;:true,&quot;fPath&quot;:&quot;Release/STS_RR_R125.elf&quot;,&quot;fProjectName&quot;:&quot;STS_RR_R125&quot;,&quot;fPerformBuild&quot;:true,&quot;fDownload&quot;:true,&quot;fLoadSymbols&quot;:true}]}"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.override_start_address_mode" value="default"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.remoteCommand" value="target extended-remote"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.remoteCommand" value="target remote"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startServer" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.exception.divby0" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.exception.unaligned" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.haltonexception" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swd_mode" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_port" value="2332"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_trace_hclk" value="8000000"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_port" value="61235"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_trace_hclk" value="16000000"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.useRemoteTarget" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.vector_table" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.verify_flash_download" value="true"/>
@ -42,7 +28,7 @@
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_shared_stlink" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.frequency" value="0"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.halt_all_on_reset" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.log_file" value="D:\ONEDRIVE\STM32WLV13\Projects\NUCLEO-WL55JC\Applications\LoRaWAN\STS_R1R2R5_E5CC_L0X\STM32CubeIDE\Release\st-link_gdbserver_log.txt"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.log_file" value="D:\ONEDRIVE\STM32WLV13\Projects\NUCLEO-WL55JC\Applications\LoRaWAN\STS_RR_R125\STM32CubeIDE\Release\st-link_gdbserver_log.txt"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.low_power_debug" value="enable"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.max_halt_delay" value="2"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.reset_strategy" value="connect_under_reset"/>
@ -50,6 +36,7 @@
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_txt_serial_number" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.watchdog_config" value="none"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkenable_rtos" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkrestart_configurations" value="{&quot;fVersion&quot;:1,&quot;fItems&quot;:[{&quot;fDisplayName&quot;:&quot;Reset&quot;,&quot;fIsSuppressible&quot;:false,&quot;fResetAttribute&quot;:&quot;Software system reset&quot;,&quot;fResetStrategies&quot;:[{&quot;fDisplayName&quot;:&quot;Software system reset&quot;,&quot;fLaunchAttribute&quot;:&quot;system_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;Hardware reset&quot;,&quot;fLaunchAttribute&quot;:&quot;hardware_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset hardware\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;Core reset&quot;,&quot;fLaunchAttribute&quot;:&quot;core_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset core\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;None&quot;,&quot;fLaunchAttribute&quot;:&quot;no_reset&quot;,&quot;fGdbCommands&quot;:[],&quot;fCmdOptions&quot;:[&quot;-g&quot;]}],&quot;fGdbCommandGroup&quot;:{&quot;name&quot;:&quot;Additional commands&quot;,&quot;commands&quot;:[]},&quot;fStartApplication&quot;:true}]}"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.enableRtosProxy" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyCustomProperties" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriver" value="threadx"/>
@ -60,9 +47,9 @@
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="false"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDeviceId" value="com.st.stm32cube.ide.mcu.debug.jlink"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDeviceId" value="com.st.stm32cube.ide.mcu.debug.stlink"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="2331"/>
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="61234"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="true"/>
@ -76,12 +63,12 @@
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="remote"/>
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Release/STS_R1R2R5_E5CC_L0X.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="STS_R1R2R5_E5CC_L0X"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Release/STS_RR_R125.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="STS_RR_R125"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.842072465"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/STS_R1R2R5_E5CC_L0X"/>
<listEntry value="/STS_RR_R125"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>

View File

@ -345,7 +345,7 @@ void STS_TOF_VL53L0X_Range_Process(void)
if ((Status == 0) && (RangingMeasurementData.RangeStatus == 0 ))
{
//sts_tof_distance_data = (int) VL53L0XDevs.LeakyRange;
APP_LOG(TS_OFF, VLEVEL_M, "## LeakyRange = %4d mm\r\n", (int)sts_tof_distance_data);
APP_LOG(TS_OFF, VLEVEL_M, "## Measured Range = %4d mm\r\n", (int)sts_tof_distance_data);
sensor_data_ready = 1;
}
}

View File

@ -2,15 +2,16 @@
@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: Readme.txt STS_R1 STS_R2 STS_R5 *
* @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 +19,15 @@
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
@endverbatim
@par Description
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.
This application is targeting the STM32WLxx Nucleo board embedding the STM32WLxx.
******************************************************************************
@par Keywords
Applications, SubGHz_Phy, LoRaWAN, End_Node, SingleCore
@par Directory contents
- 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
- 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
@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
-Set Up:
-------------------------- V V --------------------------
| LoRa Object | | | | LoRa Network |
| | | | | |
ComPort<--| |--| |--| |-->Web Server
| | | |
-------------------------- --------------------------
@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
@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
@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
* <h3><center>&copy; COPYRIGHT STMicroelectronics</center></h3>
*/