From 7d8ba5df7d883c86c24aa38449c4a6dd126e920f Mon Sep 17 00:00:00 2001
From: QuakeGod <quakegod@sina.com>
Date: 星期二, 06 八月 2024 14:41:31 +0800
Subject: [PATCH] Radio_LLCC68 1.15, Stable version

---
 ComLib/Src/BSP.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ComLib/Src/BSP.c b/ComLib/Src/BSP.c
index 665273d..d26b8e6 100644
--- a/ComLib/Src/BSP.c
+++ b/ComLib/Src/BSP.c
@@ -478,7 +478,7 @@
   SPI_InitStruct.ClockPolarity = LL_SPI_POLARITY_LOW;
   SPI_InitStruct.ClockPhase = LL_SPI_PHASE_1EDGE;
   SPI_InitStruct.NSS = LL_SPI_NSS_SOFT;
-  SPI_InitStruct.BaudRate = LL_SPI_BAUDRATEPRESCALER_DIV4;
+  SPI_InitStruct.BaudRate = LL_SPI_BAUDRATEPRESCALER_DIV8;
   SPI_InitStruct.BitOrder = LL_SPI_MSB_FIRST;
   SPI_InitStruct.CRCCalculation = LL_SPI_CRCCALCULATION_DISABLE;
   SPI_InitStruct.CRCPoly = 7;
@@ -648,9 +648,13 @@
 //  LL_USART_SetDEAssertionTime(USART1, 1);
 //  LL_USART_SetDEDeassertionTime(USART1, 1);
 //  LL_USART_EnableOneBitSamp(USART1);
+
+#if (USART1_AUTO_BAUDRATE == 1)
   LL_USART_EnableAutoBaudRate(USART1);
   LL_USART_SetAutoBaudRateMode(USART1, LL_USART_AUTOBAUD_DETECT_ON_FALLINGEDGE);
-  LL_USART_DisableOverrunDetect(USART1);
+#endif
+
+	LL_USART_DisableOverrunDetect(USART1);
   LL_USART_ConfigAsyncMode(USART1);
   LL_USART_Enable(USART1);
 }

--
Gitblit v1.9.1