diff --git a/Core/Inc/main.h b/Core/Inc/main.h
index 2f74eef..53bc1f6 100644
--- a/Core/Inc/main.h
+++ b/Core/Inc/main.h
@@ -354,7 +354,7 @@ void Error_Handler(void);
*/
#define STS_LAMP_BAR_PWM_TIM_PERIOD (240 - 1)
#define STS_LAMP_BAR_HTIM htim1
-#define STS_LAMP_BAR_LED_NUM (60) //60 for 46CM length LED strip
+//#define STS_LAMP_BAR_LED_NUM (14) //60 for 46CM length LED strip
#define WSDATA_PORT_PIN_PA8
//#define WSDATA_PORT_PIN_PA9
diff --git a/Core/Inc/sys_conf.h b/Core/Inc/sys_conf.h
index c8e4d0f..37cdd34 100644
--- a/Core/Inc/sys_conf.h
+++ b/Core/Inc/sys_conf.h
@@ -47,7 +47,7 @@ extern "C" {
/**
* @brief Verbose level for all trace logs
*/
-#define VERBOSE_LEVEL VLEVEL_L
+#define VERBOSE_LEVEL VLEVEL_H
/**
* @brief Enable trace logs
diff --git a/Core/Src/main.c b/Core/Src/main.c
index e5be67e..fcbdfe1 100644
--- a/Core/Src/main.c
+++ b/Core/Src/main.c
@@ -117,11 +117,13 @@ int main(void)
MX_I2C2_Init();
MX_DMA_Init();
MX_TIM1_Init();
+ MX_USART2_UART_Init();
MX_LoRaWAN_Init();
- //STS_Lamp_Bar_Self_Test();
+
}
+ printf("\r\n Start O7");
/* USER CODE BEGIN 2 */
diff --git a/Core/Src/sts_lamp_bar.c b/Core/Src/sts_lamp_bar.c
index 52cd6a1..54d0525 100644
--- a/Core/Src/sts_lamp_bar.c
+++ b/Core/Src/sts_lamp_bar.c
@@ -28,25 +28,25 @@
#include "yunhorn_sts_sensors.h"
-#define ONE_PULSE (40) //36
-#define ZERO_PULSE (20)
-
+#define ONE_PULSE (24) //36
+#define ZERO_PULSE (12)
+#define STS_LAMP_BAR_LED_NUM (27) //60 for 46CM length LED strip
#define LED_DATA_LEN 24
#define WS2812B_DATA_LEN (LED_DATA_LEN * (STS_LAMP_BAR_LED_NUM))
-#define RESET_PULSE (24) //(80) TO FIX DARK_COLOR AND SM2
+#define RESET_PULSE (16) //(80) TO FIX DARK_COLOR AND SM2
typedef struct ws2812b_e {
//uint16_t head[3];
- uint16_t GRB[WS2812B_DATA_LEN];
- uint16_t tail;
+ uint16_t GRB[WS2812B_DATA_LEN+RESET_PULSE];
+ uint16_t tail[RESET_PULSE];
} WS2812B_FrameTypeDef;
volatile WS2812B_FrameTypeDef rgb_buf = {
-// .head[0] = 0,
-// .head[1] = 0,
-// .head[2] = 0,
- .tail = 0
+// .head[0] = 10,
+// .head[1] = 10,
+// .head[2] = 10,
+ //.tail = 00
};
uint8_t color_rgb[8][3] = { //STS_COLOR R G B MAPPING TABLE
@@ -101,7 +101,7 @@ void STS_WS2812B_Refresh(void)
{
HAL_TIM_PWM_Start_DMA(&STS_LAMP_BAR_HTIM, STS_LAMP_BAR_TIM_CHANNEL, (uint32_t *)&rgb_buf, (WS2812B_DATA_LEN+RESET_PULSE));
- //HAL_TIM_PWM_Start_IT(&STS_LAMP_BAR_HTIM, STS_LAMP_BAR_TIM_CHANNEL);
+ HAL_TIM_PWM_Start_IT(&STS_LAMP_BAR_HTIM, STS_LAMP_BAR_TIM_CHANNEL);
}
void STS_Lamp_Bar_Init(void)
@@ -140,26 +140,30 @@ void STS_WS2812B_Set_RGB(uint8_t red, uint8_t green, uint8_t blue, uint8_t idx)
{
for (uint8_t j = 0; j < 8; j ++)
{
- rgb_buf.GRB[idx*24+j] = (uint16_t)(((green<
-
+
@@ -16,7 +16,7 @@
-
+
diff --git a/STM32CubeIDE/Release/Application/User/Core/subdir.mk b/STM32CubeIDE/Release/Application/User/Core/subdir.mk
index f85e725..df1f29e 100644
--- a/STM32CubeIDE/Release/Application/User/Core/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/Core/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Application/User/LoRaWAN/App/subdir.mk b/STM32CubeIDE/Release/Application/User/LoRaWAN/App/subdir.mk
index f7cc4b2..65c8e93 100644
--- a/STM32CubeIDE/Release/Application/User/LoRaWAN/App/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/LoRaWAN/App/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Application/User/LoRaWAN/Target/subdir.mk b/STM32CubeIDE/Release/Application/User/LoRaWAN/Target/subdir.mk
index d7ad605..a11353d 100644
--- a/STM32CubeIDE/Release/Application/User/LoRaWAN/Target/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/LoRaWAN/Target/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Application/User/STS/Core/Src/subdir.mk b/STM32CubeIDE/Release/Application/User/STS/Core/Src/subdir.mk
index b2e6241..63c75f4 100644
--- a/STM32CubeIDE/Release/Application/User/STS/Core/Src/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/STS/Core/Src/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Application/User/STS/TOF/App/subdir.mk b/STM32CubeIDE/Release/Application/User/STS/TOF/App/subdir.mk
index 72b511e..55b12d7 100644
--- a/STM32CubeIDE/Release/Application/User/STS/TOF/App/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/STS/TOF/App/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Application/User/STS/TOF/Target/subdir.mk b/STM32CubeIDE/Release/Application/User/STS/TOF/Target/subdir.mk
index e7a9bbd..e5922cd 100644
--- a/STM32CubeIDE/Release/Application/User/STS/TOF/Target/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/STS/TOF/Target/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Application/User/Startup/subdir.mk b/STM32CubeIDE/Release/Application/User/Startup/subdir.mk
index 140938e..cc5db04 100644
--- a/STM32CubeIDE/Release/Application/User/Startup/subdir.mk
+++ b/STM32CubeIDE/Release/Application/User/Startup/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Drivers/BSP/53L8A1/subdir.mk b/STM32CubeIDE/Release/Drivers/BSP/53L8A1/subdir.mk
index e703e10..e71993d 100644
--- a/STM32CubeIDE/Release/Drivers/BSP/53L8A1/subdir.mk
+++ b/STM32CubeIDE/Release/Drivers/BSP/53L8A1/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Drivers/BSP/Components/subdir.mk b/STM32CubeIDE/Release/Drivers/BSP/Components/subdir.mk
index 74cc73a..f0fdf6b 100644
--- a/STM32CubeIDE/Release/Drivers/BSP/Components/subdir.mk
+++ b/STM32CubeIDE/Release/Drivers/BSP/Components/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Drivers/CMSIS/subdir.mk b/STM32CubeIDE/Release/Drivers/CMSIS/subdir.mk
index f9a98ba..1cd765c 100644
--- a/STM32CubeIDE/Release/Drivers/CMSIS/subdir.mk
+++ b/STM32CubeIDE/Release/Drivers/CMSIS/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Drivers/STM32WLxx_HAL_Driver/subdir.mk b/STM32CubeIDE/Release/Drivers/STM32WLxx_HAL_Driver/subdir.mk
index 5e5aa98..0d5d681 100644
--- a/STM32CubeIDE/Release/Drivers/STM32WLxx_HAL_Driver/subdir.mk
+++ b/STM32CubeIDE/Release/Drivers/STM32WLxx_HAL_Driver/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Middlewares/LoRaWAN/subdir.mk b/STM32CubeIDE/Release/Middlewares/LoRaWAN/subdir.mk
index ba0a44b..eae0ba4 100644
--- a/STM32CubeIDE/Release/Middlewares/LoRaWAN/subdir.mk
+++ b/STM32CubeIDE/Release/Middlewares/LoRaWAN/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Middlewares/SubGHz_Phy/subdir.mk b/STM32CubeIDE/Release/Middlewares/SubGHz_Phy/subdir.mk
index b9ca60b..da9d856 100644
--- a/STM32CubeIDE/Release/Middlewares/SubGHz_Phy/subdir.mk
+++ b/STM32CubeIDE/Release/Middlewares/SubGHz_Phy/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/Utilities/subdir.mk b/STM32CubeIDE/Release/Utilities/subdir.mk
index de816b4..826d8ef 100644
--- a/STM32CubeIDE/Release/Utilities/subdir.mk
+++ b/STM32CubeIDE/Release/Utilities/subdir.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
diff --git a/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin b/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin
index d828b0c..2efa0d0 100644
Binary files a/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin and b/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin differ
diff --git a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf
index 5f27c32..652d54a 100644
Binary files a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf and b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf differ
diff --git a/STM32CubeIDE/Release/makefile b/STM32CubeIDE/Release/makefile
index 36e5c5c..20dc099 100644
--- a/STM32CubeIDE/Release/makefile
+++ b/STM32CubeIDE/Release/makefile
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
-include ../makefile.init
diff --git a/STM32CubeIDE/Release/objects.mk b/STM32CubeIDE/Release/objects.mk
index a5103de..515d2a4 100644
--- a/STM32CubeIDE/Release/objects.mk
+++ b/STM32CubeIDE/Release/objects.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
USER_OBJS :=
diff --git a/STM32CubeIDE/Release/sources.mk b/STM32CubeIDE/Release/sources.mk
index 4110fdd..3380d01 100644
--- a/STM32CubeIDE/Release/sources.mk
+++ b/STM32CubeIDE/Release/sources.mk
@@ -1,6 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit!
-# Toolchain: GNU Tools for STM32 (12.3.rel1)
+# Toolchain: GNU Tools for STM32 (13.3.rel1)
################################################################################
ELF_SRCS :=