diff --git a/Core/Inc/sys_conf.h b/Core/Inc/sys_conf.h index a963a2e..4941614 100644 --- a/Core/Inc/sys_conf.h +++ b/Core/Inc/sys_conf.h @@ -47,12 +47,12 @@ extern "C" { /** * @brief Verbose level for all trace logs */ -#define VERBOSE_LEVEL VLEVEL_H +#define VERBOSE_LEVEL VLEVEL_OFF /** * @brief Enable trace logs */ -#define APP_LOG_ENABLED 1 +#define APP_LOG_ENABLED 0 /** * @brief Activate monitoring (probes) of some internal RF signals for debug purpose @@ -75,7 +75,7 @@ extern "C" { * @brief Enable/Disable MCU Debugger pins (dbg serial wires) * @note by HW serial wires are ON by default, need to put them OFF to save power */ -#define DEBUGGER_ENABLED 1 +#define DEBUGGER_ENABLED 0 /** * @brief Disable Low Power mode diff --git a/Core/Inc/yunhorn_sts_prd_conf.h b/Core/Inc/yunhorn_sts_prd_conf.h index 671e7f6..b3dc2d2 100644 --- a/Core/Inc/yunhorn_sts_prd_conf.h +++ b/Core/Inc/yunhorn_sts_prd_conf.h @@ -240,9 +240,9 @@ -#define MajorVer 23U -#define MinorVer 11U -#define SubMinorVer 18U +#define MajorVer 24U +#define MinorVer 02U +#define SubMinorVer 21U #define FirmwareVersion 3U #define YUNHORN_STS_MAX_NVM_CFG_SIZE 64U #define YUNHORN_STS_AC_CODE_SIZE 20U diff --git a/Core/Src/dma.c b/Core/Src/dma.c index 366b255..c34a3c2 100644 --- a/Core/Src/dma.c +++ b/Core/Src/dma.c @@ -70,9 +70,11 @@ void MX_DMA_Init(void) // **** I2C2 // **** USART2 +#if 0 /* DMA1_Channel6_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA1_Channel6_IRQn, 0, 0); HAL_NVIC_EnableIRQ(DMA1_Channel6_IRQn); +#endif /* DMA1_Channel7_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA1_Channel7_IRQn, 0, 0); HAL_NVIC_EnableIRQ(DMA1_Channel7_IRQn); diff --git a/Core/Src/stm32wlxx_it.c b/Core/Src/stm32wlxx_it.c index e3545a0..3bb6950 100644 --- a/Core/Src/stm32wlxx_it.c +++ b/Core/Src/stm32wlxx_it.c @@ -76,8 +76,9 @@ extern DMA_HandleTypeDef hdma_i2c2_tx; //extern TIM_HandleTypeDef htim2; //extern TIM_HandleTypeDef htim16; extern DMA_HandleTypeDef hdma_usart2_tx; +#if 0 extern DMA_HandleTypeDef hdma_usart2_rx; - +#endif /* USER CODE BEGIN EV */ @@ -328,7 +329,9 @@ void DMA1_Channel6_IRQHandler(void) /* USER CODE BEGIN DMA1_Channel6_IRQn 0 */ /* USER CODE END DMA1_Channel6_IRQn 0 */ +#if 0 HAL_DMA_IRQHandler(&hdma_usart2_rx); +#endif /* USER CODE BEGIN DMA1_Channel6_IRQn 1 */ /* USER CODE END DMA1_Channel6_IRQn 1 */ diff --git a/Core/Src/sys_app.c b/Core/Src/sys_app.c index afd0327..2839e9d 100644 --- a/Core/Src/sys_app.c +++ b/Core/Src/sys_app.c @@ -122,7 +122,8 @@ void SystemApp_Init(void) /*Init low power manager*/ UTIL_LPM_Init(); /* Disable Stand-by mode */ - UTIL_LPM_SetOffMode((1 << CFG_LPM_APPLI_Id), UTIL_LPM_DISABLE); + //UTIL_LPM_SetOffMode((1 << CFG_LPM_APPLI_Id), UTIL_LPM_DISABLE); + UTIL_LPM_SetOffMode((1 << CFG_LPM_APPLI_Id), UTIL_LPM_ENABLE); #if defined (LOW_POWER_DISABLE) && (LOW_POWER_DISABLE == 1) /* Disable Stop Mode */ diff --git a/Core/Src/usart.c b/Core/Src/usart.c index e62df72..9cdb66e 100644 --- a/Core/Src/usart.c +++ b/Core/Src/usart.c @@ -28,7 +28,9 @@ UART_HandleTypeDef huart2; DMA_HandleTypeDef hdma_usart2_tx; +#if 0 DMA_HandleTypeDef hdma_usart2_rx; +#endif /* USART2 init function */ @@ -134,6 +136,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) #endif __HAL_LINKDMA(uartHandle,hdmatx,hdma_usart2_tx); +#if 0 /* USART2_RX Init */ hdma_usart2_rx.Instance = DMA1_Channel6; hdma_usart2_rx.Init.Request = DMA_REQUEST_USART2_RX; @@ -155,7 +158,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) } #endif __HAL_LINKDMA(uartHandle,hdmarx,hdma_usart2_rx); - +#endif /* USART2 interrupt Init */ HAL_NVIC_SetPriority(USART2_IRQn, 2, 0); HAL_NVIC_EnableIRQ(USART2_IRQn); @@ -184,7 +187,9 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle) /* USART2 DMA DeInit */ HAL_DMA_DeInit(uartHandle->hdmatx); +#if 0 HAL_DMA_DeInit(uartHandle->hdmarx); +#endif /* USART2 interrupt Deinit */ HAL_NVIC_DisableIRQ(USART2_IRQn); /* USER CODE BEGIN USART2_MspDeInit 1 */ diff --git a/STM32CubeIDE/.cproject b/STM32CubeIDE/.cproject index baedf70..d498e69 100644 --- a/STM32CubeIDE/.cproject +++ b/STM32CubeIDE/.cproject @@ -128,6 +128,7 @@