From: hcj <1224667075@qq.com> Date: Thu, 8 Jan 2026 03:07:58 +0000 (+0800) Subject: 重新提高spi传输优先级,优化spi传输失败率高问题 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=1c3be18729579a658ceb611a064f348407963aac;p=mirrors%2FFD230.git 重新提高spi传输优先级,优化spi传输失败率高问题 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/bluetooth/src/BluetoothEarPhoneView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/bluetooth/src/BluetoothEarPhoneView.cpp index f4a1249de..5c85b6d00 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/bluetooth/src/BluetoothEarPhoneView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/bluetooth/src/BluetoothEarPhoneView.cpp @@ -224,7 +224,7 @@ void BluetoothEarPhoneView::BtEnable() WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothEarPhoneView::BtEnable Bt is Discovering"); return; } else { - results = gap_br_set_inquiry_paramters(DEVICE_MAJOR_CLASS_AUDIO_VIDEO|SERVICE_AUDIO|SERVICE_TELEPHONY, 0); + results = gap_br_set_inquiry_paramters(DEVICE_MAJOR_CLASS_AUDIO_VIDEO, 0); WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "gap_br_set_inquiry_paramters results %d", results); results = gap_br_start_discovery(); WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "gap_br_start_discovery results %d", results); diff --git a/code/sdk/zhihui/utils/custom_spi.c b/code/sdk/zhihui/utils/custom_spi.c index aa31d26ee..3231d42d0 100644 --- a/code/sdk/zhihui/utils/custom_spi.c +++ b/code/sdk/zhihui/utils/custom_spi.c @@ -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;