From f009a24908e7dde23c95cf6aa00bc30218b9cfd0 Mon Sep 17 00:00:00 2001
From: WXK <287788329@qq.com>
Date: 星期四, 09 一月 2025 16:47:54 +0800
Subject: [PATCH] 1.23,去掉网关下发时间机制 防止一直丢包

---
 Src/OnChipDevices/Spi.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/Src/OnChipDevices/Spi.c b/Src/OnChipDevices/Spi.c
index 0ba5ed7..5bf96a0 100644
--- a/Src/OnChipDevices/Spi.c
+++ b/Src/OnChipDevices/Spi.c
@@ -20,7 +20,14 @@
     /* Write to SPIx CR1 */
     SPIx->CR1 = tmpreg;
 }
-
+void Uwb_CS_di()
+{
+     if(!HAL_GPIO_ReadPin( RADIO_NSS_GPIO_Port, RADIO_NSS_Pin))
+     {
+        HAL_GPIO_WritePin( RADIO_NSS_GPIO_Port, RADIO_NSS_Pin,GPIO_PIN_SET);
+         printf("LORA_cs_error\r\n");
+     }
+}
 /*! ------------------------------------------------------------------------------------------------------------------
  * Function: writetospi()
  *
@@ -43,7 +50,7 @@
     decaIrqStatus_t  stat ;
 
 //    stat = decamutexon() ;
-
+//Uwb_CS_di();
     SPIx_CS_GPIO->BRR = SPIx_CS;
 //	delay_ms(1);
 //	tt=HAL_SPI_Transmit(&hspi1,headerBuffer,headerLength,10);
@@ -97,7 +104,7 @@
 
     /* Wait for SPIx Tx buffer empty */
     //while (port_SPIx_busy_sending());
-
+//Uwb_CS_di();
     SPIx_CS_GPIO->BRR = SPIx_CS;
 //	HAL_SPI_Transmit(&hspi1,headerBuffer,headerLength,10);
 //	HAL_SPI_Receive(&hspi1,readBuffer,readlength,10);

--
Gitblit v1.9.3