diff --git a/board/NUCLEO_STM32L053R8/BSP/Inc/mcu_init.h b/board/NUCLEO_STM32L053R8/BSP/Inc/mcu_init.h index 98d5b948..b54476b1 100644 --- a/board/NUCLEO_STM32L053R8/BSP/Inc/mcu_init.h +++ b/board/NUCLEO_STM32L053R8/BSP/Inc/mcu_init.h @@ -9,6 +9,7 @@ #include "usart.h" #include "i2c.h" #include "gpio.h" +#include "rhf76_lora.h" #include "tos.h" void board_init(void); diff --git a/board/NUCLEO_STM32L053R8/BSP/Inc/rhf76_lora.h b/board/NUCLEO_STM32L053R8/BSP/Inc/rhf76_lora.h new file mode 100644 index 00000000..321b097d --- /dev/null +++ b/board/NUCLEO_STM32L053R8/BSP/Inc/rhf76_lora.h @@ -0,0 +1,41 @@ +#ifndef __RHF76_LORA_H__ +#define __RHF76_LORA_H__ + +#include +#include +#include +#include "usart.h" +#define UART_RXBUF_MAXSIZE 256 + +typedef enum _class +{ + CLASS_A = 1, + CLASS_B , + CLASS_C , +}ENUM_CLASS_TypeDef; + +typedef enum _mode +{ + LWOTAA = 1, + LWABP , +}ENUM_MODE_TypeDef; + +typedef enum _id +{ + devaddr = 1, + deveui , + appeui, +}ENUM_ID_TypeDef; + +typedef enum _key +{ + appkey = 1, + appskey , + nwkskey, +}ENUM_KEY_TypeDef; + + +void rhf76_init(void); +int rhf76_send(const void *buf, uint32_t len); +#endif /* __RHF76_LORA_H__ */ + diff --git a/board/NUCLEO_STM32L053R8/BSP/Src/mcu_init.c b/board/NUCLEO_STM32L053R8/BSP/Src/mcu_init.c index 9dcec5ec..fc96aac4 100644 --- a/board/NUCLEO_STM32L053R8/BSP/Src/mcu_init.c +++ b/board/NUCLEO_STM32L053R8/BSP/Src/mcu_init.c @@ -33,7 +33,7 @@ void board_init(void) SystemClock_Config(); MX_GPIO_Init(); MX_I2C1_Init(); - //MX_USART1_UART_Init(); + MX_USART1_UART_Init(); MX_USART2_UART_Init(); } diff --git a/board/NUCLEO_STM32L053R8/BSP/Src/rhf76_lora.c b/board/NUCLEO_STM32L053R8/BSP/Src/rhf76_lora.c new file mode 100644 index 00000000..8f7a53f4 --- /dev/null +++ b/board/NUCLEO_STM32L053R8/BSP/Src/rhf76_lora.c @@ -0,0 +1,270 @@ +#include "rhf76_lora.h" +#include "tos.h" + +uint16_t rx_rd_index = 0; +uint16_t rx_wr_index = 0; +uint16_t rx_count = 0; +uint8_t g_rx_buf[UART_RXBUF_MAXSIZE]; + +void g_ring_buf(uint8_t in_data) +{ + g_rx_buf[rx_wr_index]=in_data; + rx_wr_index++; + rx_count++; + + if (rx_wr_index == UART_RXBUF_MAXSIZE) + { + rx_wr_index = 0; + } + + /* Check for overflow */ + if (rx_count == UART_RXBUF_MAXSIZE) + { + rx_wr_index = 0; + rx_count = 0; + rx_rd_index = 0; + } +} + +static int get_rx_byte(void) +{ + int c = -1; + + __disable_irq(); + if (rx_count > 0) + { + c = g_rx_buf[rx_rd_index]; + + rx_rd_index++; + if (rx_rd_index == UART_RXBUF_MAXSIZE) + { + rx_rd_index = 0; + } + rx_count--; + } + __enable_irq(); + + return c; +} + + +void drv_uart_send(char * buf, int len) +{ + HAL_UART_Transmit(&huart1, (uint8_t *)buf, len,0xFFFF); +} + +static int dev_uart_recv(uint8_t *buf, uint32_t len, uint32_t timeout) +{ + int c=0, i=0; + + do + { + c = get_rx_byte(); + if (c < 0) + { + timeout--; + HAL_Delay(1); + } + else + { + buf[i++] = (char)c; + } + }while(i0); + + return i; +} + + +bool rhf76_send_cmd(char * cmd, uint32_t len,char * reply1, char * reply2, uint32_t waittime) +{ + char buf[256] = {0}; + rx_rd_index = 0; + rx_wr_index = 0; + rx_count = 0; + drv_uart_send((char*)cmd,len); + if ( ( reply1 == 0 ) && ( reply2 == 0 ) ) + return true; + + HAL_Delay( waittime ); + dev_uart_recv((uint8_t *)buf, 120, 20); + printf("%s",buf); + if ( ( reply1 != 0 ) && ( reply2 != 0 ) ) + return ( ( bool ) strstr ( buf, reply1 ) || + ( bool ) strstr ( buf, reply2 ) ); + + else if ( reply1 != 0 ) + return ( ( bool ) strstr ( buf, reply1 ) ); + + else + return ( ( bool ) strstr ( buf, reply2 ) ); +} + + +void rhf76_reset ( void ) +{ + rhf76_send_cmd ( "AT+RESET\r\n", strlen("AT+RESET\r\n"),"OK", 0, 2500 ); +} + +void rhf76_set_id(ENUM_ID_TypeDef id_type,char *id) +{ + char cmd[64] = {0}; + switch(id_type) + { + case devaddr: + snprintf(cmd, 64, "%s=\"%s\",\"%s\"\r\n", "AT+ID", "devaddr", id); + break; + case deveui: + snprintf(cmd, 64, "%s=\"%s\",\"%s\"\r\n", "AT+ID", "deveui", id); + break; + case appeui: + snprintf(cmd, 64, "%s=\"%s\",\"%s\"\r\n", "AT+ID", "appeui", id); + break; + } +} + +void rhf76_set_key(ENUM_KEY_TypeDef key_type,char *key) +{ + char cmd[64] = {0}; + switch(key_type) + { + case appkey: + snprintf(cmd, 64, "%s=\"%s\",%s\r\n", "AT+KEY", "appkey", key); + break; + case appskey: + snprintf(cmd, 64, "%s=\"%s\",%s\r\n", "AT+KEY", "appskey", key); + break; + case nwkskey: + snprintf(cmd, 64, "%s=\"%s\",%s\r\n", "AT+KEY", "nwkskey", key); + break; + } +} + + +void rhf76_set_class ( ENUM_CLASS_TypeDef type ) +{ + switch( type ) + { + case CLASS_A: + rhf76_send_cmd ( "AT+CLASS=A\r\n", strlen("AT+CLASS=A\r\n"),"+CLASS: A", 0, 2500 ); + break; + case CLASS_B: + rhf76_send_cmd ( "AT+CLASS=B\r\n", strlen("AT+CLASS=B\r\n"),"+CLASS: B", 0, 2500 ); + break; + case CLASS_C: + rhf76_send_cmd ( "AT+CLASS=C\r\n", strlen("AT+CLASS=C\r\n"),"+CLASS: C", 0, 2500 ); + break; + default: + break; + } +} + +void rhf76_set_chanel(void) +{ + rhf76_send_cmd ( "at+ch=num,0-7\r\n", strlen("at+ch=num,0-7\r\n"),"NUM, 0-7", 0, 2500 ); +} + +void rhf76_set_adr(void) +{ + rhf76_send_cmd ( "at+adr=off\r\n", strlen("at+adr=off\r\n"),"OFF", 0, 2500 ); +} +void rhf76_set_mode ( ENUM_MODE_TypeDef mode ) +{ + switch( mode ) + { + case LWOTAA: + rhf76_send_cmd ( "AT+MODE=LWOTAA\r\n", strlen("AT+MODE=LWOTAA\r\n"),"+MODE: LWOTAA", 0, 2500 ); + break; + case LWABP: + rhf76_send_cmd ( "AT+MODE=LWABP\r\n", strlen("AT+MODE=LWABP\r\n"),"+MODE: LWABP", 0, 2500 ); + break; + default: + break; + } +} + +int32_t rhf76_join(void) +{ + if(rhf76_send_cmd("AT+join\r\n",strlen("AT+join\r\n"), "Network joined", "Done",14000)) + { + return 0; + } + + else + return -1; +} + +void rhf76_init(void) +{ + char *key = "2B7E151628AED2A6ABF7158809CF4F3C"; + char *appeui_id = "70B3D57ED00E0017"; + HAL_Delay(1000); + printf("Init RHF76 LoRa ...\n" ); + rhf76_reset(); + printf("\n< 1 >\n"); + rhf76_set_class(CLASS_A); + printf("\n< 2 >\n"); + rhf76_set_chanel(); + rhf76_set_adr(); + rhf76_set_mode(LWOTAA); + rhf76_set_id(appeui,appeui_id); + rhf76_set_key(appkey,key); + printf("\n< 3 >\n"); + rhf76_join(); + HAL_Delay(3000); + printf("Init RHF76 LoRa done\n"); +} + +int32_t rhf76_recv_timeout(int8_t * buf, uint32_t len, + int32_t timeout) +{ + return dev_uart_recv((uint8_t *)buf, len, timeout); +} + +int32_t rhf76_recv( int8_t * buf, uint32_t len) +{ + return rhf76_recv_timeout(buf, len, 5000); +} + +static char __num2hex(uint8_t num) +{ + if (num <= 0x9) { + return num + '0'; + } + + if ((0xA <= num) && (num <= 0xF)) { + return num - 0xA + 'A'; + } + + return (char)-1; +} + +static void __hex2str(uint8_t *in, char *out, int len) +{ + int i = 0; + + for (i = 0; i < len; ++i) { + out[i * 2] = __num2hex(in[i] >> 4); + out[i * 2 + 1] = __num2hex(in[i] & 0x0F); + } + out[2 * len] = '\0'; +} + +int rhf76_send(const void *buf, uint32_t len) +{ + char *str_buf = NULL; + + str_buf = tos_mmheap_calloc(2 * len + 1, sizeof(char)); + if (!str_buf) { + return -1; + } + __hex2str((uint8_t *)buf, str_buf, len); + + char cmd[100] = {0}; + + snprintf(cmd, sizeof(cmd), "AT+CMSGHEX=\"%s\"\r\n", str_buf); + cmd[sizeof(cmd) - 1] = '\0'; + tos_mmheap_free(str_buf); + + rhf76_send_cmd((char *)cmd, strlen(cmd), (char *)"ACK Received","Done",10000); + return len; +} diff --git a/board/NUCLEO_STM32L053R8/BSP/Src/stm32l0xx_it_module.c b/board/NUCLEO_STM32L053R8/BSP/Src/stm32l0xx_it_module.c new file mode 100644 index 00000000..5e2096c3 --- /dev/null +++ b/board/NUCLEO_STM32L053R8/BSP/Src/stm32l0xx_it_module.c @@ -0,0 +1,212 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32l0xx_it.c + * @brief Interrupt Service Routines. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2019 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +#include "stm32l0xx_it.h" +#include "tos.h" +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN TD */ + +/* USER CODE END TD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* Private user code ---------------------------------------------------------*/ +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/* External variables --------------------------------------------------------*/ +extern UART_HandleTypeDef huart1; +extern UART_HandleTypeDef huart2; +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/******************************************************************************/ +/* Cortex-M0+ Processor Interruption and Exception Handlers */ +/******************************************************************************/ +/** + * @brief This function handles Non maskable interrupt. + */ +void NMI_Handler(void) +{ + /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ + + /* USER CODE END NonMaskableInt_IRQn 0 */ + /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ + + /* USER CODE END NonMaskableInt_IRQn 1 */ +} + +/** + * @brief This function handles Hard fault interrupt. + */ +void HardFault_Handler(void) +{ + /* USER CODE BEGIN HardFault_IRQn 0 */ + + /* USER CODE END HardFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_HardFault_IRQn 0 */ + /* USER CODE END W1_HardFault_IRQn 0 */ + } +} + +/** + * @brief This function handles System service call via SWI instruction. + */ +void SVC_Handler(void) +{ + /* USER CODE BEGIN SVC_IRQn 0 */ + + /* USER CODE END SVC_IRQn 0 */ + /* USER CODE BEGIN SVC_IRQn 1 */ + + /* USER CODE END SVC_IRQn 1 */ +} + +/** + * @brief This function handles Pendable request for system service. + */ +__weak void PendSV_Handler(void) +{ + /* USER CODE BEGIN PendSV_IRQn 0 */ + + /* USER CODE END PendSV_IRQn 0 */ + /* USER CODE BEGIN PendSV_IRQn 1 */ + + /* USER CODE END PendSV_IRQn 1 */ +} + +/** + * @brief This function handles System tick timer. + */ +void SysTick_Handler(void) +{ + /* USER CODE BEGIN SysTick_IRQn 0 */ + + /* USER CODE END SysTick_IRQn 0 */ + HAL_IncTick(); + if(tos_knl_is_running()) + { + tos_knl_irq_enter(); + tos_tick_handler(); + tos_knl_irq_leave(); + } + /* USER CODE BEGIN SysTick_IRQn 1 */ + + /* USER CODE END SysTick_IRQn 1 */ +} + +/******************************************************************************/ +/* STM32L0xx Peripheral Interrupt Handlers */ +/* Add here the Interrupt Handlers for the used peripherals. */ +/* For the available peripheral interrupt handler names, */ +/* please refer to the startup file (startup_stm32l0xx.s). */ +/******************************************************************************/ + +/** + * @brief This function handles EXTI line 0 and line 1 interrupts. + */ +void EXTI0_1_IRQHandler(void) +{ + /* USER CODE BEGIN EXTI0_1_IRQn 0 */ + + /* USER CODE END EXTI0_1_IRQn 0 */ + HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_1); + /* USER CODE BEGIN EXTI0_1_IRQn 1 */ + + /* USER CODE END EXTI0_1_IRQn 1 */ +} + +/** + * @brief This function handles EXTI line 4 to 15 interrupts. + */ +void EXTI4_15_IRQHandler(void) +{ + /* USER CODE BEGIN EXTI4_15_IRQn 0 */ + + /* USER CODE END EXTI4_15_IRQn 0 */ + HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_4); + HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_7); + HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_10); + HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_13); + /* USER CODE BEGIN EXTI4_15_IRQn 1 */ + + /* USER CODE END EXTI4_15_IRQn 1 */ +} + +/** + * @brief This function handles USART1 global interrupt / USART1 wake-up interrupt through EXTI line 25. + */ +void USART1_IRQHandler(void) +{ + /* USER CODE BEGIN USART1_IRQn 0 */ + + /* USER CODE END USART1_IRQn 0 */ + HAL_UART_IRQHandler(&huart1); + /* USER CODE BEGIN USART1_IRQn 1 */ + + /* USER CODE END USART1_IRQn 1 */ +} + +/** + * @brief This function handles USART2 global interrupt / USART2 wake-up interrupt through EXTI line 26. + */ +void USART2_IRQHandler(void) +{ + /* USER CODE BEGIN USART2_IRQn 0 */ + + /* USER CODE END USART2_IRQn 0 */ + HAL_UART_IRQHandler(&huart2); + /* USER CODE BEGIN USART2_IRQn 1 */ + + /* USER CODE END USART2_IRQn 1 */ +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/board/NUCLEO_STM32L053R8/BSP/Src/usart.c b/board/NUCLEO_STM32L053R8/BSP/Src/usart.c index 963e661e..52318c4b 100644 --- a/board/NUCLEO_STM32L053R8/BSP/Src/usart.c +++ b/board/NUCLEO_STM32L053R8/BSP/Src/usart.c @@ -21,7 +21,7 @@ #include "usart.h" /* USER CODE BEGIN 0 */ - +uint8_t ch; /* USER CODE END 0 */ UART_HandleTypeDef huart1; @@ -46,7 +46,7 @@ void MX_USART1_UART_Init(void) { Error_Handler(); } - + HAL_UART_Receive_IT(&huart1, &ch, 1); } /* USART2 init function */ @@ -176,7 +176,14 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle) } /* USER CODE BEGIN 1 */ - +//extern void g_ring_buf(uint8_t in_data); +void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) +{ + if (huart== &huart1) { + HAL_UART_Receive_IT(&huart1, &ch, 1); + //g_ring_buf(ch); + } +} /* USER CODE END 1 */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/board/NUCLEO_STM32L053R8/KEIL/lorawan/NUCLEO_STM32L053R8.uvoptx b/board/NUCLEO_STM32L053R8/KEIL/lorawan/NUCLEO_STM32L053R8.uvoptx index 0aadb90b..f89c80f5 100644 --- a/board/NUCLEO_STM32L053R8/KEIL/lorawan/NUCLEO_STM32L053R8.uvoptx +++ b/board/NUCLEO_STM32L053R8/KEIL/lorawan/NUCLEO_STM32L053R8.uvoptx @@ -203,7 +203,7 @@ Application/MDK-ARM - 1 + 0 0 0 0 @@ -223,7 +223,7 @@ Application/User - 1 + 0 0 0 0 @@ -294,8 +294,8 @@ 0 0 0 - ..\..\BSP\Src\stm32l0xx_it.c - stm32l0xx_it.c + ..\..\BSP\Src\usart.c + usart.c 0 0 @@ -306,8 +306,20 @@ 0 0 0 - ..\..\BSP\Src\usart.c - usart.c + ..\..\BSP\Src\stm32l0xx_it_module.c + stm32l0xx_it_module.c + 0 + 0 + + + 2 + 9 + 1 + 0 + 0 + 0 + ..\..\BSP\Src\rhf76_lora.c + rhf76_lora.c 0 0 @@ -315,13 +327,13 @@ Drivers/STM32L0xx_HAL_Driver - 1 + 0 0 0 0 3 - 9 + 10 1 0 0 @@ -333,7 +345,7 @@ 3 - 10 + 11 1 0 0 @@ -345,7 +357,7 @@ 3 - 11 + 12 1 0 0 @@ -357,7 +369,7 @@ 3 - 12 + 13 1 0 0 @@ -369,7 +381,7 @@ 3 - 13 + 14 1 0 0 @@ -381,7 +393,7 @@ 3 - 14 + 15 1 0 0 @@ -393,7 +405,7 @@ 3 - 15 + 16 1 0 0 @@ -405,7 +417,7 @@ 3 - 16 + 17 1 0 0 @@ -417,7 +429,7 @@ 3 - 17 + 18 1 0 0 @@ -429,7 +441,7 @@ 3 - 18 + 19 1 0 0 @@ -441,7 +453,7 @@ 3 - 19 + 20 1 0 0 @@ -453,7 +465,7 @@ 3 - 20 + 21 1 0 0 @@ -465,7 +477,7 @@ 3 - 21 + 22 1 0 0 @@ -477,7 +489,7 @@ 3 - 22 + 23 1 0 0 @@ -489,7 +501,7 @@ 3 - 23 + 24 1 0 0 @@ -501,7 +513,7 @@ 3 - 24 + 25 1 0 0 @@ -513,7 +525,7 @@ 3 - 25 + 26 1 0 0 @@ -527,13 +539,13 @@ Drivers/CMSIS - 1 + 0 0 0 0 4 - 26 + 27 1 0 0 @@ -553,7 +565,7 @@ 0 5 - 27 + 28 1 0 0 @@ -565,7 +577,7 @@ 5 - 28 + 29 2 0 0 @@ -577,7 +589,7 @@ 5 - 29 + 30 1 0 0 @@ -597,7 +609,7 @@ 0 6 - 30 + 31 1 0 0 @@ -609,7 +621,7 @@ 6 - 31 + 32 1 0 0 @@ -621,7 +633,7 @@ 6 - 32 + 33 1 0 0 @@ -633,7 +645,7 @@ 6 - 33 + 34 1 0 0 @@ -645,7 +657,7 @@ 6 - 34 + 35 1 0 0 @@ -657,7 +669,7 @@ 6 - 35 + 36 1 0 0 @@ -669,7 +681,7 @@ 6 - 36 + 37 1 0 0 @@ -681,7 +693,7 @@ 6 - 37 + 38 1 0 0 @@ -693,7 +705,7 @@ 6 - 38 + 39 1 0 0 @@ -705,7 +717,7 @@ 6 - 39 + 40 1 0 0 @@ -717,7 +729,7 @@ 6 - 40 + 41 1 0 0 @@ -729,7 +741,7 @@ 6 - 41 + 42 1 0 0 @@ -741,7 +753,7 @@ 6 - 42 + 43 1 0 0 @@ -753,7 +765,7 @@ 6 - 43 + 44 1 0 0 @@ -765,7 +777,7 @@ 6 - 44 + 45 1 0 0 @@ -777,7 +789,7 @@ 6 - 45 + 46 1 0 0 @@ -789,7 +801,7 @@ 6 - 46 + 47 1 0 0 @@ -809,7 +821,7 @@ 0 7 - 47 + 48 1 0 0 @@ -821,110 +833,6 @@ - - examples - 1 - 0 - 0 - 0 - - 8 - 48 - 1 - 0 - 0 - 0 - ..\..\..\..\examples\LoRaWAN\lora_demo.c - lora_demo.c - 0 - 0 - - - - - devices - 1 - 0 - 0 - 0 - - 9 - 49 - 1 - 0 - 0 - 0 - ..\..\..\..\devices\rhf76_lora\RHF76.c - RHF76.c - 0 - 0 - - - - - hal - 1 - 0 - 0 - 0 - - 10 - 50 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\hal\st\stm32l0xx\src\tos_hal_uart.c - tos_hal_uart.c - 0 - 0 - - - - - at - 1 - 0 - 0 - 0 - - 11 - 51 - 1 - 0 - 0 - 0 - ..\..\..\..\net\at\src\tos_at.c - tos_at.c - 0 - 0 - - - 11 - 52 - 1 - 0 - 0 - 0 - ..\..\..\..\net\at\src\tos_at_utils.c - tos_at_utils.c - 0 - 0 - - - 11 - 53 - 1 - 0 - 0 - 0 - ..\..\..\..\net\lora_module_wrapper\lora_module_wrapper.c - lora_module_wrapper.c - 0 - 0 - - - ::CMSIS 0 diff --git a/board/NUCLEO_STM32L053R8/KEIL/lorawan/NUCLEO_STM32L053R8.uvprojx b/board/NUCLEO_STM32L053R8/KEIL/lorawan/NUCLEO_STM32L053R8.uvprojx index 3fa9e4f4..c42cac22 100644 --- a/board/NUCLEO_STM32L053R8/KEIL/lorawan/NUCLEO_STM32L053R8.uvprojx +++ b/board/NUCLEO_STM32L053R8/KEIL/lorawan/NUCLEO_STM32L053R8.uvprojx @@ -417,16 +417,21 @@ 1 ..\..\BSP\Src\stm32l0xx_hal_msp.c - - stm32l0xx_it.c - 1 - ..\..\BSP\Src\stm32l0xx_it.c - usart.c 1 ..\..\BSP\Src\usart.c + + stm32l0xx_it_module.c + 1 + ..\..\BSP\Src\stm32l0xx_it_module.c + + + rhf76_lora.c + 1 + ..\..\BSP\Src\rhf76_lora.c + @@ -649,56 +654,6 @@ - - examples - - - lora_demo.c - 1 - ..\..\..\..\examples\LoRaWAN\lora_demo.c - - - - - devices - - - RHF76.c - 1 - ..\..\..\..\devices\rhf76_lora\RHF76.c - - - - - hal - - - tos_hal_uart.c - 1 - ..\..\..\..\platform\hal\st\stm32l0xx\src\tos_hal_uart.c - - - - - at - - - tos_at.c - 1 - ..\..\..\..\net\at\src\tos_at.c - - - tos_at_utils.c - 1 - ..\..\..\..\net\at\src\tos_at_utils.c - - - lora_module_wrapper.c - 1 - ..\..\..\..\net\lora_module_wrapper\lora_module_wrapper.c - - - ::CMSIS diff --git a/board/NUCLEO_STM32L053R8/TOS_CONFIG/tos_config.h b/board/NUCLEO_STM32L053R8/TOS_CONFIG/tos_config.h index ef6d78d3..9003927f 100644 --- a/board/NUCLEO_STM32L053R8/TOS_CONFIG/tos_config.h +++ b/board/NUCLEO_STM32L053R8/TOS_CONFIG/tos_config.h @@ -15,7 +15,7 @@ #define TOS_CFG_MMHEAP_EN 1u -#define TOS_CFG_MMHEAP_POOL_SIZE 0x100 +#define TOS_CFG_MMHEAP_POOL_SIZE 0x400 #define TOS_CFG_MUTEX_EN 1u