重新提高spi传输优先级,优化spi传输失败率高问题
authorhcj <1224667075@qq.com>
Thu, 8 Jan 2026 03:07:58 +0000 (11:07 +0800)
committerhcj <1224667075@qq.com>
Thu, 8 Jan 2026 03:07:58 +0000 (11:07 +0800)
code/sdk/application/wearable/ln/nativeapp/nativeui/bluetooth/src/BluetoothEarPhoneView.cpp
code/sdk/zhihui/utils/custom_spi.c

index f4a1249..5c85b6d 100644 (file)
@@ -224,7 +224,7 @@ void BluetoothEarPhoneView::BtEnable()
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothEarPhoneView::BtEnable Bt is Discovering");\r
         return;\r
     } else {\r
-        results = gap_br_set_inquiry_paramters(DEVICE_MAJOR_CLASS_AUDIO_VIDEO|SERVICE_AUDIO|SERVICE_TELEPHONY, 0);\r
+        results = gap_br_set_inquiry_paramters(DEVICE_MAJOR_CLASS_AUDIO_VIDEO, 0);\r
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "gap_br_set_inquiry_paramters results %d", results);\r
         results = gap_br_start_discovery();\r
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "gap_br_start_discovery results %d", results);\r
index aa31d26..3231d42 100644 (file)
@@ -587,7 +587,9 @@ void custom_spi_init(void)
 
     // 降低优先级,避免抢占 NAND Flash 操作(文件下载时会导致 QSPI 总线冲突)
     // 从 osPriorityHigh (40) 降低到 osPriorityNormal (24),与 sio_irq_proc 同级
-    taskcfg.attr.priority = osPriorityNormal;
+    
+    //改回osPriorityHigh,底优先级,无法正确传输
+    taskcfg.attr.priority = osPriorityHigh;
 
     taskcfg.attr.stack_size = 0x2000;
     taskcfg.func = custom_spi_service_task;