Quantcast
Channel: 蓝牙论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 7485

[CC2640]SimpleProfile_SetParameter跟不上

$
0
0

[敘述]

血壓計 --> MCU uart --> SimpleProfile_SetParameter() --> Phone

NPI uart接收到來自血壓的data後,透過SimpleProfile_SetParameter()傳到Phone

uart約每14ms 接收1筆16bytes data

[問題]

發現上述方式會"偶發性"造成2640在接收、傳輸中突然像shutdown(估且稱作shutdown)一樣停止動作。

非一定在第n筆data發生,但一定在傳輸過程中。

[測試]

1、[Pass]懷疑血壓計端有問題

      試過當2640 shutdown時量測血壓計仍有吐data,但2640 uart已不接收

2、[Pass]懷疑2640 uart, 因此排除BLE send to Phone

      只要uart 收到data後不跑SimpleProfile_SetParameter就不會發生shutdown事件

3、[???]懷疑2640 SimpleProfile_SetParameter()處理速度跟不上uart接收data的速度

      測試1、在uart接收後delay 1x ~ 3xms,發現delay時間愈接近3xms,愈不會發生shutdown現象

                   血壓計 --> MCU uart --> delay 20~30ms --> SimpleProfile_SetParameter() --> Phone

      測試2、當量測開始時,假設uart會接收1000筆data(不delay),我讓前200筆data透過SimpleProfile_SetParameter()送到手機,

                   第201筆之後data不跑SimpleProfile_SetParameter(),目的是排除BLE連線問題可能,結果不會有shutdown現像

[結論]

綜合上述測試,看來問題很像是SimpleProfile_SetParameter()來不及處理uart 進來的data,導致shutdown,

請問是否有其它建議,或該如何解決??

謝謝


Viewing all articles
Browse latest Browse all 7485

Trending Articles