第一章 stm32wle5ccu6简介和开发环境搭建
第二章 stm32wle5ccu6移植pingpong通信
第三章 stm32wle5ccu6移植LoRaWAN_End_Node工程
第四章 stm32wle5ccu6移植LoRaWAN_AT_Slave工程
第五章 stm32wle5ccu6的序列器和定时器分析
官方只提供了STM32WL55JC和STM32WL55JC1的相关应用demo,由于封装不通我们并不能直接使用相关程序,需要移植才能使用。本次我们移植pingpong通信demo.
`
1、打开STM32CubeMX,选择start My projext from MCU开始工程
2、在MCU/MPU处选择使用STM32WLE5CCU6
3、在File->import project导入pingpong例程,选择导入工程为C"\Users\用户\STM32Cube\Repository\STM32CuBE_FW_WLV1.2.0\Projects\NUCLEO-WL55JC\Applications\SubGHz_Phy\SubGHz_Phy_PingPong\SubGHz_Phy_PingPong.ioc
用户为自己实际的用户名
导入后会有些报错,是因为原来WL55JC是BGA的封装引脚要多一些,而stm32wle5ccu6没有
4、在Project Manager->Project中设置工程名和存放路径,Toolchain/IDE设置为MDK-ARM;Code Generator设置为Copy all used libraries into the project folder
5、时钟输入配置,HSE和LSE都配置为Crystal/Ceramic Resonator
6、RTC开启Alarm A并且使能中断
7、SubGHz_Phy设置如下
8、时钟树配置,RTC使用LSE
9、点击GENERATE CODE生成代码,打开keil工程然后编译会报以下错误,是由于我们没有添加BSP包
10、把下载的软件包C:\Users\用户\STM32Cube\Repository\STM32Cube_FW_WL_V1.2.0\Drivers中的BSP包拷贝到当前工程下。然后在keil中添加文件和其所在目录索引。
11、然后编译工程,0 error 0 waring
1、修改BSP中关于射频开关部分的引脚定义,我们使用的亿佰特的E77模块,所以射频开关为PA6和PA7
stm32wlxx_nucleo_radio.h修改为下面这样,我们只使用了RF_SW_CTRL3_PIN、RF_SW_CTRL1_PIN 两个脚,另一个不用管。
#define RF_SW_CTRL3_PIN GPIO_PIN_6
#define RF_SW_CTRL3_GPIO_PORT GPIOA
#define RF_SW_CTRL3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define RF_SW_CTRL3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
#define RF_SW_CTRL1_PIN GPIO_PIN_7
#define RF_SW_CTRL1_GPIO_PORT GPIOA
#define RF_SW_CTRL1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define RF_SW_RX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
由于射频开关不同,射频控制逻辑也需要修改,把stm32wlxx_nucleo_radio.c中射频开关修改如下所示
int32_t BSP_RADIO_ConfigRFSwitch(BSP_RADIO_Switch_TypeDef Config)
{
switch (Config)
{
case RADIO_SWITCH_OFF:
{
/* Turn off switch */
HAL_GPIO_WritePin(RF_SW_CTRL3_GPIO_PORT, RF_SW_CTRL3_PIN, GPIO_PIN_RESET);
HAL_GPIO_WritePin(RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, GPIO_PIN_RESET);
HAL_GPIO_WritePin(RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, GPIO_PIN_RESET);
break;
}
case RADIO_SWITCH_RX:
{
/*Turns On in Rx Mode the RF Switch */
HAL_GPIO_WritePin(RF_SW_CTRL3_GPIO_PORT, RF_SW_CTRL3_PIN, GPIO_PIN_RESET);
HAL_GPIO_WritePin(RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, GPIO_PIN_SET);
HAL_GPIO_WritePin(RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, GPIO_PIN_RESET);
break;
}
case RADIO_SWITCH_RFO_LP:
{
/*Turns On in Tx Low Power the RF Switch */
HAL_GPIO_WritePin(RF_SW_CTRL3_GPIO_PORT, RF_SW_CTRL3_PIN, GPIO_PIN_SET);
HAL_GPIO_WritePin(RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, GPIO_PIN_RESET);
HAL_GPIO_WritePin(RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, GPIO_PIN_SET);
break;
}
case RADIO_SWITCH_RFO_HP:
{
/*Turns On in Tx High Power the RF Switch */
HAL_GPIO_WritePin(RF_SW_CTRL3_GPIO_PORT, RF_SW_CTRL3_PIN, GPIO_PIN_SET);
HAL_GPIO_WritePin(RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, GPIO_PIN_RESET);
HAL_GPIO_WritePin(RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, GPIO_PIN_SET);
break;
}
default:
break;
}
return BSP_ERROR_NONE;
}
int32_t BSP_RADIO_GetTxConfig(void)
{
//return RADIO_CONF_RFO_LP_HP;
return RADIO_CONF_RFO_HP;
}
//
//使用无源晶振
/**
* @brief Get If TCXO is to be present on board
* @note never remove called by MW,
* @retval
* RADIO_CONF_TCXO_NOT_SUPPORTED
* RADIO_CONF_TCXO_SUPPORTED
*/
int32_t BSP_RADIO_IsTCXO(void)
{
//return RADIO_CONF_TCXO_SUPPORTED;
return RADIO_CONF_TCXO_NOT_SUPPORTED
}
由于亿佰特的E77模块使用的是无源晶振,所以需要调整晶振负载电容以保证晶振精度
(这里不调整也可,因为是两个模块互通,但考虑后面lorawan工程还是调整为好),采用
模块厂商推荐值0x0B
//#define XTAL_DEFAULT_CAP_VALUE ( 0x20UL )
#define XTAL_DEFAULT_CAP_VALUE ( 0x0BUL )
2、修改subghz_phy_app.c文件,CubeMx刚生成工程是没有应用程序的。我们只需要从STM32Cube_FW_WL_V1.2.0软件包中去找到对应的工程文件然后修改,修改后的subghz_phy_appp.c如下。
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file subghz_phy_app.c
* @author MCD Application Team
* @brief Application of the SubGHz_Phy Middleware
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "platform.h"
#include "sys_app.h"
#include "subghz_phy_app.h"
#include "radio.h"
/* USER CODE BEGIN Includes */
#include "stm32_timer.h"
#include "stm32_seq.h"
#include "utilities_def.h"
#include "app_version.h"
#include "subghz_phy_version.h"
/* USER CODE END Includes */
/* External variables ---------------------------------------------------------*/
/* USER CODE BEGIN EV */
/* USER CODE END EV */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
typedef enum
{
RX,
RX_TIMEOUT,
RX_ERROR,
TX,
TX_TIMEOUT,
} States_t;
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* Configurations */
/*Timeout*/
#define RX_TIMEOUT_VALUE 3000
#define TX_TIMEOUT_VALUE 3000
/* PING string*/
#define PING "PING"
/* PONG string*/
#define PONG "PONG"
/*Size of the payload to be sent*/
/* Size must be greater of equal the PING and PONG*/
#define MAX_APP_BUFFER_SIZE 255
#if (PAYLOAD_LEN > MAX_APP_BUFFER_SIZE)
#error PAYLOAD_LEN must be less or equal than MAX_APP_BUFFER_SIZE
#endif /* (PAYLOAD_LEN > MAX_APP_BUFFER_SIZE) */
/* wait for remote to be in Rx, before sending a Tx frame*/
#define RX_TIME_MARGIN 200
/* Afc bandwidth in Hz */
#define FSK_AFC_BANDWIDTH 83333
/* LED blink Period*/
#define LED_PERIOD_MS 200
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
/* Radio events function pointer */
static RadioEvents_t RadioEvents;
/* USER CODE BEGIN PV */
/*Ping Pong FSM states */
static States_t State = RX;
/* App Rx Buffer*/
static uint8_t BufferRx[MAX_APP_BUFFER_SIZE];
/* App Tx Buffer*/
static uint8_t BufferTx[MAX_APP_BUFFER_SIZE];
/* Last Received Buffer Size*/
uint16_t RxBufferSize = 0;
/* Last Received packer Rssi*/
int8_t RssiValue = 0;
/* Last Received packer SNR (in Lora modulation)*/
int8_t SnrValue = 0;
/* Led Timers objects*/
static UTIL_TIMER_Object_t timerLed;
/* device state. Master: true, Slave: false*/
bool isMaster = true;
/* random delay to make sure 2 devices will sync*/
/* the closest the random delays are, the longer it will
take for the devices to sync when started simultaneously*/
static int32_t random_delay;
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
/*!
* @brief Function to be executed on Radio Tx Done event
*/
static void OnTxDone(void);
/**
* @brief Function to be executed on Radio Rx Done event
* @param payload ptr of buffer received
* @param size buffer size
* @param rssi
* @param LoraSnr_FskCfo
*/
static void OnRxDone(uint8_t *payload, uint16_t size, int16_t rssi, int8_t LoraSnr_FskCfo);
/**
* @brief Function executed on Radio Tx Timeout event
*/
static void OnTxTimeout(void);
/**
* @brief Function executed on Radio Rx Timeout event
*/
static void OnRxTimeout(void);
/**
* @brief Function executed on Radio Rx Error event
*/
static void OnRxError(void);
/* USER CODE BEGIN PFP */
/**
* @brief Function executed on when led timer elapses
* @param context ptr of LED context
*/
static void OnledEvent(void *context);
/**
* @brief PingPong state machine implementation
*/
static void PingPong_Process(void);
/* USER CODE END PFP */
/* Exported functions ---------------------------------------------------------*/
void SubghzApp_Init(void)
{
/* USER CODE BEGIN SubghzApp_Init_1 */
APP_LOG(TS_OFF, VLEVEL_M, "\n\rPING PONG\n\r");
/* Get SubGHY_Phy APP version*/
APP_LOG(TS_OFF, VLEVEL_M, "APPLICATION_VERSION: V%X.%X.%X\r\n",
(uint8_t)(APP_VERSION_MAIN),
(uint8_t)(APP_VERSION_SUB1),
(uint8_t)(APP_VERSION_SUB2));
/* Get MW SubGhz_Phy info */
APP_LOG(TS_OFF, VLEVEL_M, "MW_RADIO_VERSION: V%X.%X.%X\r\n",
(uint8_t)(SUBGHZ_PHY_VERSION_MAIN),
(uint8_t)(SUBGHZ_PHY_VERSION_SUB1),
(uint8_t)(SUBGHZ_PHY_VERSION_SUB2));
/* Led Timers*/
UTIL_TIMER_Create(&timerLed, LED_PERIOD_MS, UTIL_TIMER_ONESHOT, OnledEvent, NULL);
UTIL_TIMER_Start(&timerLed);
/* USER CODE END SubghzApp_Init_1 */
/* Radio initialization */
RadioEvents.TxDone = OnTxDone;
RadioEvents.RxDone = OnRxDone;
RadioEvents.TxTimeout = OnTxTimeout;
RadioEvents.RxTimeout = OnRxTimeout;
RadioEvents.RxError = OnRxError;
Radio.Init(&RadioEvents);
/* USER CODE BEGIN SubghzApp_Init_2 */
/*calculate random delay for synchronization*/
random_delay = (Radio.Random()) >> 22; /*10bits random e.g. from 0 to 1023 ms*/
/* Radio Set frequency */
Radio.SetChannel(RF_FREQUENCY);
/* Radio configuration */
#if ((USE_MODEM_LORA == 1) && (USE_MODEM_FSK == 0))
APP_LOG(TS_OFF, VLEVEL_M, "---------------\n\r");
APP_LOG(TS_OFF, VLEVEL_M, "LORA_MODULATION\n\r");
APP_LOG(TS_OFF, VLEVEL_M, "LORA_BW=%d kHz\n\r", (1 << LORA_BANDWIDTH) * 125);
APP_LOG(TS_OFF, VLEVEL_M, "LORA_SF=%d\n\r", LORA_SPREADING_FACTOR);
Radio.SetTxConfig(MODEM_LORA, TX_OUTPUT_POWER, 0, LORA_BANDWIDTH,
LORA_SPREADING_FACTOR, LORA_CODINGRATE,
LORA_PREAMBLE_LENGTH, LORA_FIX_LENGTH_PAYLOAD_ON,
true, 0, 0, LORA_IQ_INVERSION_ON, TX_TIMEOUT_VALUE);
Radio.SetRxConfig(MODEM_LORA, LORA_BANDWIDTH, LORA_SPREADING_FACTOR,
LORA_CODINGRATE, 0, LORA_PREAMBLE_LENGTH,
LORA_SYMBOL_TIMEOUT, LORA_FIX_LENGTH_PAYLOAD_ON,
0, true, 0, 0, LORA_IQ_INVERSION_ON, true);
Radio.SetMaxPayloadLength(MODEM_LORA, MAX_APP_BUFFER_SIZE);
#elif ((USE_MODEM_LORA == 0) && (USE_MODEM_FSK == 1))
APP_LOG(TS_OFF, VLEVEL_M, "---------------\n\r");
APP_LOG(TS_OFF, VLEVEL_M, "FSK_MODULATION\n\r");
APP_LOG(TS_OFF, VLEVEL_M, "FSK_BW=%d Hz\n\r", FSK_BANDWIDTH);
APP_LOG(TS_OFF, VLEVEL_M, "FSK_DR=%d bits/s\n\r", FSK_DATARATE);
Radio.SetTxConfig(MODEM_FSK, TX_OUTPUT_POWER, FSK_FDEV, 0,
FSK_DATARATE, 0,
FSK_PREAMBLE_LENGTH, FSK_FIX_LENGTH_PAYLOAD_ON,
true, 0, 0, 0, TX_TIMEOUT_VALUE);
Radio.SetRxConfig(MODEM_FSK, FSK_BANDWIDTH, FSK_DATARATE,
0, FSK_AFC_BANDWIDTH, FSK_PREAMBLE_LENGTH,
0, FSK_FIX_LENGTH_PAYLOAD_ON, 0, true,
0, 0, false, true);
Radio.SetMaxPayloadLength(MODEM_FSK, MAX_APP_BUFFER_SIZE);
#else
#error "Please define a modulation in the subghz_phy_app.h file."
#endif /* USE_MODEM_LORA | USE_MODEM_FSK */
/*fills tx buffer*/
memset(BufferTx, 0x0, MAX_APP_BUFFER_SIZE);
APP_LOG(TS_ON, VLEVEL_L, "rand=%d\n\r", random_delay);
/*starts reception*/
Radio.Rx(RX_TIMEOUT_VALUE + random_delay);
/*register task to to be run in while(1) after Radio IT*/
UTIL_SEQ_RegTask((1 << CFG_SEQ_Task_SubGHz_Phy_App_Process), UTIL_SEQ_RFU, PingPong_Process);
/* USER CODE END SubghzApp_Init_2 */
}
/* USER CODE BEGIN EF */
/* USER CODE END EF */
/* Private functions ---------------------------------------------------------*/
static void OnTxDone(void)
{
/* USER CODE BEGIN OnTxDone */
APP_LOG(TS_ON, VLEVEL_L, "OnTxDone\n\r");
/* Update the State of the FSM*/
State = TX;
/* Run PingPong process in background*/
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_SubGHz_Phy_App_Process), CFG_SEQ_Prio_0);
/* USER CODE END OnTxDone */
}
static void OnRxDone(uint8_t *payload, uint16_t size, int16_t rssi, int8_t LoraSnr_FskCfo)
{
/* USER CODE BEGIN OnRxDone */
APP_LOG(TS_ON, VLEVEL_L, "OnRxDone\n\r");
#if ((USE_MODEM_LORA == 1) && (USE_MODEM_FSK == 0))
APP_LOG(TS_ON, VLEVEL_L, "RssiValue=%d dBm, SnrValue=%ddB\n\r", rssi, LoraSnr_FskCfo);
/* Record payload Signal to noise ratio in Lora*/
SnrValue = LoraSnr_FskCfo;
#endif /* USE_MODEM_LORA | USE_MODEM_FSK */
#if ((USE_MODEM_LORA == 0) && (USE_MODEM_FSK == 1))
APP_LOG(TS_ON, VLEVEL_L, "RssiValue=%d dBm, Cfo=%dkHz\n\r", rssi, LoraSnr_FskCfo);
SnrValue = 0; /*not applicable in GFSK*/
#endif /* USE_MODEM_LORA | USE_MODEM_FSK */
/* Update the State of the FSM*/
State = RX;
/* Clear BufferRx*/
memset(BufferRx, 0, MAX_APP_BUFFER_SIZE);
/* Record payload size*/
RxBufferSize = size;
if (RxBufferSize <= MAX_APP_BUFFER_SIZE)
{
memcpy(BufferRx, payload, RxBufferSize);
}
/* Record Received Signal Strength*/
RssiValue = rssi;
/* Record payload content*/
APP_LOG(TS_ON, VLEVEL_H, "payload. size=%d \n\r", size);
for (int i = 0; i < PAYLOAD_LEN; i++)
{
APP_LOG(TS_OFF, VLEVEL_H, "%02X", BufferRx[i]);
if (i % 16 == 15)
{
APP_LOG(TS_OFF, VLEVEL_H, "\n\r");
}
}
APP_LOG(TS_OFF, VLEVEL_H, "\n\r");
/* Run PingPong process in background*/
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_SubGHz_Phy_App_Process), CFG_SEQ_Prio_0);
/* USER CODE END OnRxDone */
}
static void OnTxTimeout(void)
{
/* USER CODE BEGIN OnTxTimeout */
APP_LOG(TS_ON, VLEVEL_L, "OnTxTimeout\n\r");
/* Update the State of the FSM*/
State = TX_TIMEOUT;
/* Run PingPong process in background*/
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_SubGHz_Phy_App_Process), CFG_SEQ_Prio_0);
/* USER CODE END OnTxTimeout */
}
static void OnRxTimeout(void)
{
/* USER CODE BEGIN OnRxTimeout */
APP_LOG(TS_ON, VLEVEL_L, "OnRxTimeout\n\r");
/* Update the State of the FSM*/
State = RX_TIMEOUT;
/* Run PingPong process in background*/
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_SubGHz_Phy_App_Process), CFG_SEQ_Prio_0);
/* USER CODE END OnRxTimeout */
}
static void OnRxError(void)
{
/* USER CODE BEGIN OnRxError */
APP_LOG(TS_ON, VLEVEL_L, "OnRxError\n\r");
/* Update the State of the FSM*/
State = RX_ERROR;
/* Run PingPong process in background*/
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_SubGHz_Phy_App_Process), CFG_SEQ_Prio_0);
/* USER CODE END OnRxError */
}
/* USER CODE BEGIN PrFD */
static void PingPong_Process(void)
{
Radio.Sleep();
switch (State)
{
case RX:
if (isMaster == true)
{
if (RxBufferSize > 0)
{
if (strncmp((const char *)BufferRx, PONG, sizeof(PONG) - 1) == 0)
{
UTIL_TIMER_Stop(&timerLed);
/* switch off green led */
HAL_GPIO_WritePin(LED2_GPIO_Port, LED2_Pin, GPIO_PIN_RESET); /* LED_GREEN */
/* master toggles red led */
HAL_GPIO_TogglePin(LED3_GPIO_Port, LED3_Pin); /* LED_RED */
/* Add delay between RX and TX */
HAL_Delay(Radio.GetWakeupTime() + RX_TIME_MARGIN);
/* master sends PING*/
APP_LOG(TS_ON, VLEVEL_L, "..."
"PING"
"\n\r");
APP_LOG(TS_ON, VLEVEL_L, "Master Tx start\n\r");
memcpy(BufferTx, PING, sizeof(PING) - 1);
Radio.Send(BufferTx, PAYLOAD_LEN);
}
else if (strncmp((const char *)BufferRx, PING, sizeof(PING) - 1) == 0)
{
/* A master already exists then become a slave */
isMaster = false;
APP_LOG(TS_ON, VLEVEL_L, "Slave Rx start\n\r");
Radio.Rx(RX_TIMEOUT_VALUE);
}
else /* valid reception but neither a PING or a PONG message */
{
/* Set device as master and start again */
isMaster = true;
APP_LOG(TS_ON, VLEVEL_L, "Master Rx start\n\r");
Radio.Rx(RX_TIMEOUT_VALUE);
}
}
}
else
{
if (RxBufferSize > 0)
{
if (strncmp((const char *)BufferRx, PING, sizeof(PING) - 1) == 0)
{
UTIL_TIMER_Stop(&timerLed);
/* switch off red led */
HAL_GPIO_WritePin(LED3_GPIO_Port, LED3_Pin, GPIO_PIN_RESET); /* LED_RED */
/* slave toggles green led */
HAL_GPIO_TogglePin(LED2_GPIO_Port, LED2_Pin); /* LED_GREEN */
/* Add delay between RX and TX */
HAL_Delay(Radio.GetWakeupTime() + RX_TIME_MARGIN);
/*slave sends PONG*/
APP_LOG(TS_ON, VLEVEL_L, "..."
"PONG"
"\n\r");
APP_LOG(TS_ON, VLEVEL_L, "Slave Tx start\n\r");
memcpy(BufferTx, PONG, sizeof(PONG) - 1);
Radio.Send(BufferTx, PAYLOAD_LEN);
}
else /* valid reception but not a PING as expected */
{
/* Set device as master and start again */
isMaster = true;
APP_LOG(TS_ON, VLEVEL_L, "Master Rx start\n\r");
Radio.Rx(RX_TIMEOUT_VALUE);
}
}
}
break;
case TX:
APP_LOG(TS_ON, VLEVEL_L, "Rx start\n\r");
Radio.Rx(RX_TIMEOUT_VALUE);
break;
case RX_TIMEOUT:
case RX_ERROR:
if (isMaster == true)
{
/* Send the next PING frame */
/* Add delay between RX and TX*/
/* add random_delay to force sync between boards after some trials*/
HAL_Delay(Radio.GetWakeupTime() + RX_TIME_MARGIN + random_delay);
APP_LOG(TS_ON, VLEVEL_L, "Master Tx start\n\r");
/* master sends PING*/
memcpy(BufferTx, PING, sizeof(PING) - 1);
Radio.Send(BufferTx, PAYLOAD_LEN);
}
else
{
APP_LOG(TS_ON, VLEVEL_L, "Slave Rx start\n\r");
Radio.Rx(RX_TIMEOUT_VALUE);
}
break;
case TX_TIMEOUT:
APP_LOG(TS_ON, VLEVEL_L, "Slave Rx start\n\r");
Radio.Rx(RX_TIMEOUT_VALUE);
break;
default:
break;
}
}
static void OnledEvent(void *context)
{
HAL_GPIO_TogglePin(LED2_GPIO_Port, LED2_Pin); /* LED_GREEN */
HAL_GPIO_TogglePin(LED3_GPIO_Port, LED3_Pin); /* LED_RED */
UTIL_TIMER_Start(&timerLed);
}
/* USER CODE END PrFD */