From 36667ff9eed83df5f6460d596220908afc9b9a11 Mon Sep 17 00:00:00 2001
From: yincheng.zhong <634916154@qq.com>
Date: 星期二, 07 五月 2024 19:31:50 +0800
Subject: [PATCH] 改成中断触发模式,但是还是有BUG,会死机,还会有临近基站不测距的问题。

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

diff --git a/Src/OnChipDevices/Spi.c b/Src/OnChipDevices/Spi.c
index c1422d8..0c2ce0b 100644
--- a/Src/OnChipDevices/Spi.c
+++ b/Src/OnChipDevices/Spi.c
@@ -25,7 +25,7 @@
      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");
+        // printf("LORA_cs_error\r\n");
      }
 }
 /*! ------------------------------------------------------------------------------------------------------------------
@@ -50,7 +50,7 @@
     decaIrqStatus_t  stat ;
 
 //    stat = decamutexon() ;
-Uwb_CS_di();
+//Uwb_CS_di();
     SPIx_CS_GPIO->BRR = SPIx_CS;
 //	delay_ms(1);
 //	tt=HAL_SPI_Transmit(&hspi1,headerBuffer,headerLength,10);
@@ -104,7 +104,8 @@
 
     /* Wait for SPIx Tx buffer empty */
     //while (port_SPIx_busy_sending());
-Uwb_CS_di();
+//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