-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
examples/eltres_lpwa: Import LPWA_sample_app
Import LPWA_sample_app version 3.0.3.
- Loading branch information
Showing
5 changed files
with
1,741 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,250 @@ | ||
#MicroXplorer Configuration settings - do not modify | ||
File.Version=6 | ||
KeepUserPlacement=false | ||
Mcu.Family=STM32L0 | ||
Mcu.IP0=NVIC | ||
Mcu.IP1=RCC | ||
Mcu.IP2=RTC | ||
Mcu.IP3=SYS | ||
Mcu.IP4=USART1 | ||
Mcu.IP5=USART2 | ||
Mcu.IPNb=6 | ||
Mcu.Name=STM32L073R(B-Z)Tx | ||
Mcu.Package=LQFP64 | ||
Mcu.Pin0=PC13 | ||
Mcu.Pin1=PC14-OSC32_IN | ||
Mcu.Pin10=PA4 | ||
Mcu.Pin11=PA5 | ||
Mcu.Pin12=PA6 | ||
Mcu.Pin13=PA7 | ||
Mcu.Pin14=PB0 | ||
Mcu.Pin15=PB10 | ||
Mcu.Pin16=PC7 | ||
Mcu.Pin17=PA9 | ||
Mcu.Pin18=PA10 | ||
Mcu.Pin19=PA13 | ||
Mcu.Pin2=PC15-OSC32_OUT | ||
Mcu.Pin20=PA14 | ||
Mcu.Pin21=PB3 | ||
Mcu.Pin22=PB4 | ||
Mcu.Pin23=PB5 | ||
Mcu.Pin24=PB6 | ||
Mcu.Pin25=PB8 | ||
Mcu.Pin26=PB9 | ||
Mcu.Pin27=VP_RTC_VS_RTC_Activate | ||
Mcu.Pin28=VP_RTC_VS_RTC_Calendar | ||
Mcu.Pin29=VP_RTC_VS_RTC_Alarm_A_Intern | ||
Mcu.Pin3=PH0-OSC_IN | ||
Mcu.Pin30=VP_SYS_VS_Systick | ||
Mcu.Pin4=PC0 | ||
Mcu.Pin5=PC1 | ||
Mcu.Pin6=PA0 | ||
Mcu.Pin7=PA1 | ||
Mcu.Pin8=PA2 | ||
Mcu.Pin9=PA3 | ||
Mcu.PinsNb=31 | ||
Mcu.ThirdPartyNb=0 | ||
Mcu.UserConstants= | ||
Mcu.UserName=STM32L073RZTx | ||
MxCube.Version=6.0.1 | ||
MxDb.Version=DB.6.0.0 | ||
NVIC.EXTI0_1_IRQn=true\:2\:0\:true\:false\:true\:true\:true | ||
NVIC.EXTI4_15_IRQn=true\:2\:0\:true\:false\:true\:true\:true | ||
NVIC.ForceEnableDMAVector=true | ||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:true\:false | ||
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:true\:false | ||
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:true\:false | ||
NVIC.RTC_IRQn=true\:2\:0\:true\:false\:true\:true\:true | ||
NVIC.SVC_IRQn=true\:0\:0\:false\:false\:true\:true\:false | ||
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:true\:true | ||
NVIC.USART1_IRQn=true\:1\:0\:true\:false\:true\:true\:true | ||
PA0.GPIOParameters=GPIO_Label | ||
PA0.GPIO_Label=A0_HIZ_NOT_USED | ||
PA0.Locked=true | ||
PA0.Signal=GPIO_Input | ||
PA1.GPIOParameters=GPIO_Label | ||
PA1.GPIO_Label=A1_HIZ_NOT_USED | ||
PA1.Locked=true | ||
PA1.Signal=GPIO_Input | ||
PA10.Locked=true | ||
PA10.Mode=Asynchronous | ||
PA10.Signal=USART1_RX | ||
PA13.Mode=Serial_Wire | ||
PA13.Signal=SYS_SWDIO | ||
PA14.Mode=Serial_Wire | ||
PA14.Signal=SYS_SWCLK | ||
PA2.Mode=Asynchronous | ||
PA2.Signal=USART2_TX | ||
PA3.Mode=Asynchronous | ||
PA3.Signal=USART2_RX | ||
PA4.GPIOParameters=GPIO_Label | ||
PA4.GPIO_Label=A2_HIZ_NOT_USED | ||
PA4.Locked=true | ||
PA4.Signal=GPIO_Input | ||
PA5.GPIOParameters=GPIO_Label | ||
PA5.GPIO_Label=D13_HIZ_NOT_USED | ||
PA5.Locked=true | ||
PA5.Signal=GPIO_Input | ||
PA6.GPIOParameters=GPIO_Label | ||
PA6.GPIO_Label=D12_WAKEUP | ||
PA6.Locked=true | ||
PA6.Signal=GPIO_Output | ||
PA7.GPIOParameters=GPIO_Label | ||
PA7.GPIO_Label=D11_HIZ_NOT_USED | ||
PA7.Locked=true | ||
PA7.Signal=GPIO_Input | ||
PA9.Locked=true | ||
PA9.Mode=Asynchronous | ||
PA9.Signal=USART1_TX | ||
PB0.GPIOParameters=GPIO_Label | ||
PB0.GPIO_Label=A3_HIZ_NOT_USED | ||
PB0.Locked=true | ||
PB0.Signal=GPIO_Input | ||
PB10.GPIOParameters=GPIO_PuPd,GPIO_Label | ||
PB10.GPIO_Label=D6_GPI_WKUP | ||
PB10.GPIO_PuPd=GPIO_PULLDOWN | ||
PB10.Locked=true | ||
PB10.Signal=GPXTI10 | ||
PB3.Locked=true | ||
PB3.Mode=CTS_RTS | ||
PB3.Signal=USART1_RTS | ||
PB4.Locked=true | ||
PB4.Mode=CTS_RTS | ||
PB4.Signal=USART1_CTS | ||
PB5.GPIOParameters=GPIO_Label | ||
PB5.GPIO_Label=D4_HIZ_NOT_USED | ||
PB5.Locked=true | ||
PB5.Signal=GPIO_Input | ||
PB6.GPIOParameters=GPIO_Label | ||
PB6.GPIO_Label=D10_HIZ_NOT_USED | ||
PB6.Locked=true | ||
PB6.Signal=GPIO_Input | ||
PB8.GPIOParameters=GPIO_Label | ||
PB8.GPIO_Label=D15_HIZ_NOT_USED | ||
PB8.Locked=true | ||
PB8.Signal=GPIO_Input | ||
PB9.GPIOParameters=GPIO_Label | ||
PB9.GPIO_Label=D14_HIZ_NOT_USED | ||
PB9.Locked=true | ||
PB9.Signal=GPIO_Input | ||
PC0.GPIOParameters=GPIO_PuPd,GPIO_ModeDefaultEXTI | ||
PC0.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING | ||
PC0.GPIO_PuPd=GPIO_PULLDOWN | ||
PC0.Locked=true | ||
PC0.Signal=GPXTI0 | ||
PC1.GPIOParameters=GPIO_Label | ||
PC1.GPIO_Label=A4_HIZ_NOT_USED | ||
PC1.Locked=true | ||
PC1.Signal=GPIO_Input | ||
PC13.GPIOParameters=GPIO_Label | ||
PC13.GPIO_Label=USER_Btn[B1] | ||
PC13.Locked=true | ||
PC13.Signal=GPXTI13 | ||
PC14-OSC32_IN.Mode=LSE-External-Oscillator | ||
PC14-OSC32_IN.Signal=RCC_OSC32_IN | ||
PC15-OSC32_OUT.Mode=LSE-External-Oscillator | ||
PC15-OSC32_OUT.Signal=RCC_OSC32_OUT | ||
PC7.GPIOParameters=GPIO_Speed,GPIO_PuPd,GPIO_Label | ||
PC7.GPIO_Label=D9_GPO_RST | ||
PC7.GPIO_PuPd=GPIO_NOPULL | ||
PC7.GPIO_Speed=GPIO_SPEED_FREQ_LOW | ||
PC7.Locked=true | ||
PC7.Signal=GPIO_Output | ||
PH0-OSC_IN.Mode=HSE-External-Clock-Source | ||
PH0-OSC_IN.Signal=RCC_OSC_IN | ||
PinOutPanel.RotationAngle=0 | ||
ProjectManager.AskForMigrate=true | ||
ProjectManager.BackupPrevious=false | ||
ProjectManager.CompilerOptimize=2 | ||
ProjectManager.ComputerToolchain=false | ||
ProjectManager.CoupleFile=true | ||
ProjectManager.CustomerFirmwarePackage= | ||
ProjectManager.DefaultFWLocation=true | ||
ProjectManager.DeletePrevious=false | ||
ProjectManager.DeviceId=STM32L073RZTx | ||
ProjectManager.FirmwarePackage=STM32Cube FW_L0 V1.11.3 | ||
ProjectManager.FreePins=false | ||
ProjectManager.HalAssertFull=true | ||
ProjectManager.HeapSize=0x200 | ||
ProjectManager.KeepUserCode=true | ||
ProjectManager.LastFirmware=true | ||
ProjectManager.LibraryCopy=0 | ||
ProjectManager.MainLocation=Src | ||
ProjectManager.NoMain=false | ||
ProjectManager.PreviousToolchain= | ||
ProjectManager.ProjectBuild=false | ||
ProjectManager.ProjectFileName=LPWA_sample_app.ioc | ||
ProjectManager.ProjectName=LPWA_sample_app | ||
ProjectManager.RegisterCallBack= | ||
ProjectManager.StackSize=0xC00 | ||
ProjectManager.TargetToolchain=MDK-ARM V5 | ||
ProjectManager.ToolChainLocation= | ||
ProjectManager.UnderRoot=false | ||
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-true,3-MX_USART1_UART_Init-USART1-false-HAL-true,4-MX_USART2_UART_Init-USART2-false-HAL-true,5-MX_RTC_Init-RTC-false-HAL-true | ||
RCC.48CLKFreq_Value=32000000 | ||
RCC.48RNGFreq_Value=32000000 | ||
RCC.48USBFreq_Value=32000000 | ||
RCC.AHBFreq_Value=32000000 | ||
RCC.APB1Freq_Value=32000000 | ||
RCC.APB1TimFreq_Value=32000000 | ||
RCC.APB2Freq_Value=32000000 | ||
RCC.APB2TimFreq_Value=32000000 | ||
RCC.EnbaleCSS=false | ||
RCC.FCLKCortexFreq_Value=32000000 | ||
RCC.FamilyName=M | ||
RCC.HCLKFreq_Value=32000000 | ||
RCC.HSE_VALUE=8000000 | ||
RCC.HSI16_VALUE=16000000 | ||
RCC.HSI48_VALUE=48000000 | ||
RCC.HSI_VALUE=16000000 | ||
RCC.I2C1Freq_Value=32000000 | ||
RCC.I2C3Freq_Value=32000000 | ||
RCC.IPParameters=48CLKFreq_Value,48RNGFreq_Value,48USBFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,EnbaleCSS,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI16_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C3Freq_Value,LCDFreq_Value,LPTIMFreq_Value,LPUARTFreq_Value,LSI_VALUE,MCOPinFreq_Value,MSI_VALUE,PLLCLKFreq_Value,PLLMUL,PLLSourceVirtual,PWRFreq_Value,RTCClockSelection,RTCClockSelectionVirtual,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,TIMFreq_Value,TimerFreq_Value,USART1Freq_Value,USART2Freq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,WatchDogFreq_Value | ||
RCC.LCDFreq_Value=32768 | ||
RCC.LPTIMFreq_Value=32000000 | ||
RCC.LPUARTFreq_Value=32000000 | ||
RCC.LSI_VALUE=37000 | ||
RCC.MCOPinFreq_Value=32000000 | ||
RCC.MSI_VALUE=2097000 | ||
RCC.PLLCLKFreq_Value=32000000 | ||
RCC.PLLMUL=RCC_PLLMUL_8 | ||
RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE | ||
RCC.PWRFreq_Value=32000000 | ||
RCC.RTCClockSelection=RCC_RTCCLKSOURCE_LSE | ||
RCC.RTCClockSelectionVirtual=RCC_RTCCLKSOURCE_LSE | ||
RCC.RTCFreq_Value=32768 | ||
RCC.RTCHSEDivFreq_Value=4000000 | ||
RCC.SYSCLKFreq_VALUE=32000000 | ||
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK | ||
RCC.TIMFreq_Value=32000000 | ||
RCC.TimerFreq_Value=32000000 | ||
RCC.USART1Freq_Value=32000000 | ||
RCC.USART2Freq_Value=32000000 | ||
RCC.VCOInputFreq_Value=8000000 | ||
RCC.VCOOutputFreq_Value=64000000 | ||
RCC.WatchDogFreq_Value=37000 | ||
RTC.Alarm-Alarm\ A=RTC_ALARM_A | ||
RTC.IPParameters=Alarm-Alarm A | ||
SH.GPXTI0.0=GPIO_EXTI0 | ||
SH.GPXTI0.ConfNb=1 | ||
SH.GPXTI10.0=GPIO_EXTI10 | ||
SH.GPXTI10.ConfNb=1 | ||
SH.GPXTI13.0=GPIO_EXTI13 | ||
SH.GPXTI13.ConfNb=1 | ||
USART1.BaudRate=115200 | ||
USART1.IPParameters=BaudRate,WordLength,VirtualMode-Asynchronous | ||
USART1.VirtualMode-Asynchronous=VM_ASYNC | ||
USART1.WordLength=WORDLENGTH_8B | ||
USART2.BaudRate=115200 | ||
USART2.IPParameters=VirtualMode-Asynchronous,BaudRate,WordLength | ||
USART2.VirtualMode-Asynchronous=VM_ASYNC | ||
USART2.WordLength=WORDLENGTH_8B | ||
VP_RTC_VS_RTC_Activate.Mode=RTC_Enabled | ||
VP_RTC_VS_RTC_Activate.Signal=RTC_VS_RTC_Activate | ||
VP_RTC_VS_RTC_Alarm_A_Intern.Mode=Alarm A | ||
VP_RTC_VS_RTC_Alarm_A_Intern.Signal=RTC_VS_RTC_Alarm_A_Intern | ||
VP_RTC_VS_RTC_Calendar.Mode=RTC_Calendar | ||
VP_RTC_VS_RTC_Calendar.Signal=RTC_VS_RTC_Calendar | ||
VP_SYS_VS_Systick.Mode=SysTick | ||
VP_SYS_VS_Systick.Signal=SYS_VS_Systick | ||
board=single_profile_sample_app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
diff -upr Src/main.c Src/main.c | ||
--- Src/main.c 2021-04-27 11:20:28.299280000 +0900 | ||
+++ Src/main.c 2021-04-20 11:09:22.000000000 +0900 | ||
@@ -25,7 +25,7 @@ | ||
|
||
/* Private includes ----------------------------------------------------------*/ | ||
/* USER CODE BEGIN Includes */ | ||
- | ||
+#include "main_LPWA_sample_app.h" | ||
/* USER CODE END Includes */ | ||
|
||
/* Private typedef -----------------------------------------------------------*/ | ||
@@ -91,7 +91,7 @@ int main(void) | ||
MX_USART2_UART_Init(); | ||
MX_RTC_Init(); | ||
/* USER CODE BEGIN 2 */ | ||
- | ||
+ main_LPWA_sample_app(); | ||
/* USER CODE END 2 */ | ||
|
||
/* Infinite loop */ | ||
Only in Src: main_LPWA_sample_app.c | ||
diff -upr Src/stm32l0xx_it.c Src/stm32l0xx_it.c | ||
--- Src/stm32l0xx_it.c 2021-04-27 11:20:27.862447400 +0900 | ||
+++ Src/stm32l0xx_it.c 2021-04-20 11:09:22.000000000 +0900 | ||
@@ -52,7 +52,8 @@ | ||
|
||
/* Private user code ---------------------------------------------------------*/ | ||
/* USER CODE BEGIN 0 */ | ||
- | ||
+#include "CXM150x_Port.h" | ||
+#include "main_LPWA_sample_app.h" | ||
/* USER CODE END 0 */ | ||
|
||
/* External variables --------------------------------------------------------*/ | ||
@@ -146,7 +147,7 @@ void SysTick_Handler(void) | ||
void RTC_IRQHandler(void) | ||
{ | ||
/* USER CODE BEGIN RTC_IRQn 0 */ | ||
- | ||
+ rtc_callback(); | ||
/* USER CODE END RTC_IRQn 0 */ | ||
HAL_RTC_AlarmIRQHandler(&hrtc); | ||
/* USER CODE BEGIN RTC_IRQn 1 */ | ||
@@ -160,7 +161,7 @@ void RTC_IRQHandler(void) | ||
void EXTI0_1_IRQHandler(void) | ||
{ | ||
/* USER CODE BEGIN EXTI0_1_IRQn 0 */ | ||
- | ||
+ wrapper_CXM150x_int_out1(); | ||
/* USER CODE END EXTI0_1_IRQn 0 */ | ||
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_0); | ||
/* USER CODE BEGIN EXTI0_1_IRQn 1 */ | ||
@@ -174,7 +175,12 @@ void EXTI0_1_IRQHandler(void) | ||
void EXTI4_15_IRQHandler(void) | ||
{ | ||
/* USER CODE BEGIN EXTI4_15_IRQn 0 */ | ||
- | ||
+ if(__HAL_GPIO_EXTI_GET_IT(GPIO_PIN_10) != RESET){ | ||
+ wrapper_CXM150x_int_out2(); | ||
+ } | ||
+ if(__HAL_GPIO_EXTI_GET_IT(GPIO_PIN_13) != RESET){ | ||
+ push_btn_CXM150x(); | ||
+ } | ||
/* USER CODE END EXTI4_15_IRQn 0 */ | ||
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_10); | ||
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_13); | ||
diff -upr Src/usart.c Src/usart.c | ||
--- Src/usart.c 2021-04-27 11:20:27.743765600 +0900 | ||
+++ Src/usart.c 2021-04-20 11:09:22.000000000 +0900 | ||
@@ -21,7 +21,7 @@ | ||
#include "usart.h" | ||
|
||
/* USER CODE BEGIN 0 */ | ||
- | ||
+extern void wrapper_CXM150x_uart_rx_callback(void); | ||
/* USER CODE END 0 */ | ||
|
||
UART_HandleTypeDef huart1; | ||
@@ -185,6 +185,11 @@ void HAL_UART_MspDeInit(UART_HandleTypeD | ||
} | ||
|
||
/* USER CODE BEGIN 1 */ | ||
+void HAL_UART_RxCpltCallback(UART_HandleTypeDef *UartHandle){ | ||
+ if(UartHandle->Instance==USART1){ | ||
+ wrapper_CXM150x_uart_rx_callback(); | ||
+ } | ||
+} | ||
|
||
/* USER CODE END 1 */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
================================================================================ | ||
|
||
CXM1500GE LPWA_sample_app code version information | ||
|
||
================================================================================ | ||
2021/12/24 version 3.0.3 | ||
Add EU Duty function | ||
Change files | ||
main_LPWA_sample_app.c | ||
2021/08/16 version 3.0.2 | ||
Addition of license terms | ||
Change files | ||
main_LPWA_sample_app.c,main_LPWA_sample_app.h | ||
2020/12/15 version 3.0.1 | ||
Bug fix of PoC Enable callback function | ||
Change files | ||
main_LPWA_sample_app.c | ||
2020/07/09 version 3.0.0 | ||
Preliminary(first release version) |
Oops, something went wrong.