Commit a736a6c4 by Jeffrey Redondo

adding the new variables in algorithm developed to use timers

parent 0917f57f
......@@ -1772,7 +1772,7 @@
<Name>Build</Name>
<Buttons>
<Len>718</Len>
<Data>00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000004001C0000000000000000000000000000000001000000010000000180D07F0000000002001D000000000000000000000000000000000100000001000000018030800000000000001E00000000000000000000000000000000010000000100000001809E8A0000000000001F0000000000000000000000000000000001000000010000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA00000000000000000000000000000000000000000000000001000000010000009600000003002050000000001C4C6F7720506F776572206D6F6465206C303733205254432042473936960000000000000001001C4C6F7720506F776572206D6F6465206C303733205254432042473936000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64CF010000</Data>
<Data>00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000004001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E00000000000000000000000000000000010000000100000001809E8A0000000000001F0000000000000000000000000000000001000000010000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA00000000000000000000000000000000000000000000000001000000010000009600000003002050000000001C4C6F7720506F776572206D6F6465206C303733205254432042473936960000000000000001001C4C6F7720506F776572206D6F6465206C303733205254432042473936000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64CF010000</Data>
</Buttons>
<OriginalItems>
<Len>583</Len>
......
......@@ -244,7 +244,7 @@
<GroupNumber>2</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>1</FileType>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\BG96.c</PathWithFileName>
......
......@@ -47,7 +47,7 @@
#define BG96_AT_BAND_NB_ALL "AT+QCFG=\"band\",f,400a0e189f,a0e189f\r\n" //GSM,NB,CATM ->all,all, all
#define BG96_AT_PREPARE_UDP_PCKT "AT+QIOPEN=1,0,\"UDP\",\"node.iot.ttu.ee\",6805,0,1\r\n"
#define BG96_AT_SEND_UDP_PCKT "AT+QISEND=0\r\n"
#define BG96_DATA_STRING "POST /s/ HTTP/1.0\nAuthorization: Basic amVyZWRvc2FybWllbnRvOkVzdG9uaWEyMDE4\nX-Id: 179033\nContent-Type: text/plain\nContent-Length: "// 18\n\n201,-10,-75,157030"; 18= Lenght of the packets
#define BG96_DATA_STRING "POST /s/ HTTP/1.0\nAuthorization: Basic amVyZWRvc2FybWllbnRvOkVzdG9uaWEyMDE4\nX-Id: 200699\nContent-Type: text/plain\nContent-Length: "// 18\n\n201,-10,-75,157030"; 18= Lenght of the packets
#define BG96_AT_CRTL_Z "\x1A"
#define BG96_AT_CLOSE "AT+QICLOSE=0\r\n"
#define BG96_ID "157033"// 18\n\n201,-10,-75,157030"; 18= Lenght of the packets, 201=ID in middleware, -10 data, -75, data, 57030 ID.
......
......@@ -558,15 +558,19 @@ void BG96_SEND_TECH(){
void BG96_Cumulocity(){
//Variable and function to create the data string that should be sent to cumulocity
char data[153]="";
char data2[23]=""; //second part of the message
char data2[30]=""; //second part of the message
volatile int total_length=0;
char length[2]="";
volatile int length_rssi=0;
strcat(data2, "\n\n201,");
strcat(data2, "\n\n202,");
strcat(data2, BG96_Distance);
strcat(data2, ",-");
strcat(data2, rssi2);
strcat(data2, ",");
strcat(data2, snr2);
strcat(data2, ",");
strcat(data2, rsrp2);
strcat(data2, ",");
strcat(data2, BG96_ID);
strcpy(data,BG96_DATA_STRING);
total_length= (strlen(data2)-2);
......
......@@ -21,19 +21,83 @@ Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.1.0
Dialog DLL: TCM.DLL V1.32.0.0
<h2>Project:</h2>
C:\Users\jeff_\Desktop\STM32\Keil5\UART_L476RG\UART_L476RG_BG96_Shield\MDK-ARM\UART_L476RG_BG96_Shield.uvprojx
C:\GIT\NB-IoT\UART_Timer_L476RG_BG96_Shield\MDK-ARM\UART_L476RG_BG96_Shield.uvprojx
Project File Date: 06/14/2018
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 5 (build 528)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'UART_L476RG_BG96_Shield'
compiling main.c...
../Src/main.c(235): warning: #177-D: function "MX_TIM3_Init" was declared but never referenced
../Src/main.c(234): warning: #177-D: function "MX_TIM3_Init" was declared but never referenced
static void MX_TIM3_Init(void)
../Src/main.c: 1 warning, 0 errors
compiling BG96.c...
BG96.c(26): warning: #1295-D: Deprecated declaration BG96_Context_Check - give arg types
int BG96_Context_Check();
BG96.c(28): warning: #1295-D: Deprecated declaration BG96_Check_Internet - give arg types
int BG96_Check_Internet();
BG96.c(53): warning: #167-D: argument of type "uint8_t *" is incompatible with parameter of type "const char *"
char *c = strstr(EVB_Buffer,"Telia"); //here is Carrier/operator name
BG96.c(135): warning: #550-D: variable "tech" was set but never used
volatile char *tech, *mode1;
BG96.c(135): warning: #550-D: variable "mode1" was set but never used
volatile char *tech, *mode1;
BG96.c(161): warning: #177-D: variable "ap" was declared but never referenced
char sw=0,ap=0;
BG96.c(198): warning: #223-D: function "rand" declared implicitly
int var = rand()%30; //random variable
BG96.c(214): warning: #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
HAL_UART_Transmit(&huart1,temp,sizeof(temp),1000);
BG96.c(220): warning: #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
HAL_UART_Transmit(&huart2,temp,sizeof(temp),1000);
BG96.c(244): warning: #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
HAL_UART_Transmit(&huart1,rssichar,strlen(rssichar),1000);
BG96.c(248): warning: #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
HAL_UART_Transmit(&huart2,rssichar,sizeof(rssichar),1000);
BG96.c(265): warning: #167-D: argument of type "uint8_t *" is incompatible with parameter of type "const char *"
char *c = strstr(EVB_Buffer,"BG96");
BG96.c(295): warning: #167-D: argument of type "uint8_t *" is incompatible with parameter of type "const char *"
char *c = strstr(EVB_Buffer,"BG96");
BG96.c(399): warning: #167-D: argument of type "uint8_t *" is incompatible with parameter of type "const char *"
char *c = strstr(EVB_Buffer,"OK");
BG96.c(390): warning: #177-D: variable "ap" was declared but never referenced
char sw=0,ap=0;
BG96.c(432): warning: #167-D: argument of type "uint8_t *" is incompatible with parameter of type "const char *"
char *c = strstr(EVB_Buffer,"+QIACT:");
BG96.c(426): warning: #177-D: variable "sw" was declared but never referenced
char sw=0,ap=0;
BG96.c(426): warning: #177-D: variable "ap" was declared but never referenced
char sw=0,ap=0;
BG96.c(461): warning: #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
HAL_UART_Transmit(&huart1,rsrpchar,strlen(rsrpchar),1000); // or sizeof
BG96.c(465): warning: #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
HAL_UART_Transmit(&huart2,rsrpchar,sizeof(rsrpchar),1000);
BG96.c(489): warning: #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
HAL_UART_Transmit(&huart1,rsrqchar,sizeof(rsrqchar),1000);
BG96.c(493): warning: #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
HAL_UART_Transmit(&huart2,rsrqchar,sizeof(rsrqchar),1000);
BG96.c(518): warning: #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
HAL_UART_Transmit(&huart1,snrchar,sizeof(snrchar),1000);
BG96.c(522): warning: #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
HAL_UART_Transmit(&huart2,snrchar,sizeof(snrchar),1000);
BG96.c(544): warning: #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
HAL_UART_Transmit(&huart1,techchar,sizeof(techchar),1000);
BG96.c(548): warning: #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
HAL_UART_Transmit(&huart2,techchar,sizeof(techchar),1000);
BG96.c(583): warning: #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
HAL_UART_Transmit(&huart2,data,strlen(data),1000);
BG96.c(594): warning: #167-D: argument of type "uint8_t *" is incompatible with parameter of type "const char *"
char *c = strstr(EVB_Buffer,"+QIOPEN: 0,0");
BG96.c(622): warning: #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
HAL_UART_Transmit(&huart1,data,strlen(data),1000);
BG96.c(639): warning: #167-D: argument of type "uint8_t *" is incompatible with parameter of type "const char *"
char *c = strstr(EVB_Buffer,"+QPING: 0,"); // ping received
BG96.c(653): warning: #1-D: last line of file ends without a newline
}
BG96.c: 32 warnings, 0 errors
linking...
Program Size: Code=12688 RO-data=880 RW-data=48 ZI-data=1696
"UART_L476RG_BG96_Shield\UART_L476RG_BG96_Shield.axf" - 0 Error(s), 1 Warning(s).
Program Size: Code=12728 RO-data=880 RW-data=48 ZI-data=1696
"UART_L476RG_BG96_Shield\UART_L476RG_BG96_Shield.axf" - 0 Error(s), 32 Warning(s).
<h2>Software Packages used:</h2>
......@@ -56,7 +120,7 @@ Package Vendor: Keil
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.1.1
Build Time Elapsed: 00:00:14
Build Time Elapsed: 00:00:17
</pre>
</body>
</html>
......@@ -3,9 +3,9 @@
<title>Static Call Graph - [UART_L476RG_BG96_Shield\UART_L476RG_BG96_Shield.axf]</title></head>
<body><HR>
<H1>Static Call Graph for image UART_L476RG_BG96_Shield\UART_L476RG_BG96_Shield.axf</H1><HR>
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060528: Last Updated: Tue Jul 10 16:16:33 2018
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060528: Last Updated: Wed Jul 18 11:44:17 2018
<BR><P>
<H3>Maximum Stack Usage = 320 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
<H3>Maximum Stack Usage = 328 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3>
main &rArr; BG96_Cumulocity &rArr; BG96_Context_Activation &rArr; BG96_Power_On_EVB &rArr; BG96_Send_Clean &rArr; BG96_Send_UARTPC_EVB_Buffer &rArr; HAL_UART_Transmit &rArr; UART_WaitOnFlagUntilTimeout
<P>
......@@ -552,8 +552,8 @@ Global Symbols
<LI><a href="#[6f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;BG96_Attached
</UL>
<P><STRONG><a name="[78]"></a>BG96_Cumulocity</STRONG> (Thumb, 394 bytes, Stack size 200 bytes, bg96.o(i.BG96_Cumulocity))
<BR><BR>[Stack]<UL><LI>Max Depth = 320<LI>Call Chain = BG96_Cumulocity &rArr; BG96_Context_Activation &rArr; BG96_Power_On_EVB &rArr; BG96_Send_Clean &rArr; BG96_Send_UARTPC_EVB_Buffer &rArr; HAL_UART_Transmit &rArr; UART_WaitOnFlagUntilTimeout
<P><STRONG><a name="[78]"></a>BG96_Cumulocity</STRONG> (Thumb, 430 bytes, Stack size 208 bytes, bg96.o(i.BG96_Cumulocity))
<BR><BR>[Stack]<UL><LI>Max Depth = 328<LI>Call Chain = BG96_Cumulocity &rArr; BG96_Context_Activation &rArr; BG96_Power_On_EVB &rArr; BG96_Send_Clean &rArr; BG96_Send_UARTPC_EVB_Buffer &rArr; HAL_UART_Transmit &rArr; UART_WaitOnFlagUntilTimeout
</UL>
<BR>[Calls]<UL><LI><a href="#[6c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_UART_Transmit
<LI><a href="#[7d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__2sprintf
......@@ -1226,7 +1226,7 @@ Global Symbols
<P><STRONG><a name="[da]"></a>__scatterload_zeroinit</STRONG> (Thumb, 14 bytes, Stack size unknown bytes, handlers.o(i.__scatterload_zeroinit), UNUSED)
<P><STRONG><a name="[5b]"></a>main</STRONG> (Thumb, 136 bytes, Stack size 0 bytes, main.o(i.main))
<BR><BR>[Stack]<UL><LI>Max Depth = 320<LI>Call Chain = main &rArr; BG96_Cumulocity &rArr; BG96_Context_Activation &rArr; BG96_Power_On_EVB &rArr; BG96_Send_Clean &rArr; BG96_Send_UARTPC_EVB_Buffer &rArr; HAL_UART_Transmit &rArr; UART_WaitOnFlagUntilTimeout
<BR><BR>[Stack]<UL><LI>Max Depth = 328<LI>Call Chain = main &rArr; BG96_Cumulocity &rArr; BG96_Context_Activation &rArr; BG96_Power_On_EVB &rArr; BG96_Send_Clean &rArr; BG96_Send_UARTPC_EVB_Buffer &rArr; HAL_UART_Transmit &rArr; UART_WaitOnFlagUntilTimeout
</UL>
<BR>[Calls]<UL><LI><a href="#[b4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_UART_Receive_IT
<LI><a href="#[c7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_TIM_Base_Start_IT
......@@ -1329,7 +1329,7 @@ Local Symbols
<BR>[Called By]<UL><LI><a href="#[5b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
</UL>
<P><STRONG><a name="[b7]"></a>MX_TIM2_Init</STRONG> (Thumb, 80 bytes, Stack size 40 bytes, main.o(i.MX_TIM2_Init))
<P><STRONG><a name="[b7]"></a>MX_TIM2_Init</STRONG> (Thumb, 78 bytes, Stack size 40 bytes, main.o(i.MX_TIM2_Init))
<BR><BR>[Stack]<UL><LI>Max Depth = 80<LI>Call Chain = MX_TIM2_Init &rArr; HAL_TIM_Base_Init &rArr; TIM_Base_SetConfig
</UL>
<BR>[Calls]<UL><LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_TIM_ConfigClockSource
......
......@@ -714,9 +714,9 @@ I (../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim_ex.h)(0x5B16C8CC)
I (../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart.h)(0x5B16C8CC)
I (../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart_ex.h)(0x5B16C8CC)
I (../Inc/stm32l4xx_it.h)(0x5B1E1E50)
F (../Src/main.c)(0x5B44B1A2)(-c --cpu Cortex-M4.fp -D__EVAL -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32L4xx_HAL_Driver/Inc -I ../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I ../Drivers/CMSIS/Include --C99 -I.\RTE\_UART_L476RG_BG96_Shield -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.3.0\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32L4xx_DFP\2.0.0\Drivers\CMSIS\Device\ST\STM32L4xx\Include -D__UVISION_VERSION="524" -D_RTE_ -DSTM32L476xx -DUSE_HAL_DRIVER -DSTM32L476xx -o uart_l476rg_bg96_shield\main.o --omf_browse uart_l476rg_bg96_shield\main.crf --depend uart_l476rg_bg96_shield\main.d)
F (../Src/main.c)(0x5B472FFC)(-c --cpu Cortex-M4.fp -D__EVAL -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32L4xx_HAL_Driver/Inc -I ../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I ../Drivers/CMSIS/Include --C99 -I.\RTE\_UART_L476RG_BG96_Shield -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.3.0\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32L4xx_DFP\2.0.0\Drivers\CMSIS\Device\ST\STM32L4xx\Include -D__UVISION_VERSION="524" -D_RTE_ -DSTM32L476xx -DUSE_HAL_DRIVER -DSTM32L476xx -o uart_l476rg_bg96_shield\main.o --omf_browse uart_l476rg_bg96_shield\main.crf --depend uart_l476rg_bg96_shield\main.d)
I (../Inc/main.h)(0x5B1E1E51)
I (../Inc/bg96.h)(0x5B3F1E34)
I (../Inc/bg96.h)(0x5B4EFDD0)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x588BD7A4)
I (../Inc/UART.h)(0x5B1E2127)
I (../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h)(0x5B16C8CA)
......@@ -750,8 +750,8 @@ I (../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.h)(0x5B16C8CC)
I (../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim_ex.h)(0x5B16C8CC)
I (../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart.h)(0x5B16C8CC)
I (../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart_ex.h)(0x5B16C8CC)
F (.\BG96.c)(0x5B3F1B6C)(-c --cpu Cortex-M4.fp -D__EVAL -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32L4xx_HAL_Driver/Inc -I ../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I ../Drivers/CMSIS/Include --C99 -I.\RTE\_UART_L476RG_BG96_Shield -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.3.0\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32L4xx_DFP\2.0.0\Drivers\CMSIS\Device\ST\STM32L4xx\Include -D__UVISION_VERSION="524" -D_RTE_ -DSTM32L476xx -DUSE_HAL_DRIVER -DSTM32L476xx -o uart_l476rg_bg96_shield\bg96.o --omf_browse uart_l476rg_bg96_shield\bg96.crf --depend uart_l476rg_bg96_shield\bg96.d)
I (../Inc/bg96.h)(0x5B3F1E34)
F (.\BG96.c)(0x5B4EFDD0)(-c --cpu Cortex-M4.fp -D__EVAL -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32L4xx_HAL_Driver/Inc -I ../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I ../Drivers/CMSIS/Include --C99 -I.\RTE\_UART_L476RG_BG96_Shield -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.3.0\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32L4xx_DFP\2.0.0\Drivers\CMSIS\Device\ST\STM32L4xx\Include -D__UVISION_VERSION="524" -D_RTE_ -DSTM32L476xx -DUSE_HAL_DRIVER -DSTM32L476xx -o uart_l476rg_bg96_shield\bg96.o --omf_browse uart_l476rg_bg96_shield\bg96.crf --depend uart_l476rg_bg96_shield\bg96.d)
I (../Inc/bg96.h)(0x5B4EFDD0)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x588BD7A4)
I (../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h)(0x5B16C8CA)
I (../Inc/stm32l4xx_hal_conf.h)(0x5B1E1E51)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment