CH571芯片,自己設(shè)計(jì)的PCB板子,使用鍵盤(pán)例程進(jìn)行改動(dòng),藍(lán)牙老是斷開(kāi)

本人是個(gè)人愛(ài)好者,使用CH571F芯片,自己設(shè)計(jì)的PCB板子,沒(méi)有設(shè)計(jì)外部32K晶振,采用內(nèi)部RC作為32K時(shí)鐘源,使用鍵盤(pán)例程進(jìn)行改動(dòng),發(fā)送數(shù)據(jù)時(shí)藍(lán)牙老是斷開(kāi),通過(guò)BLE助手查看板子的信號(hào)強(qiáng)度在-37dB,不知道是什么問(wèn)題,目前已經(jīng)嘗試調(diào)整過(guò),望解答一下。藍(lán)牙斷開(kāi)原因的reason的參考手冊(cè)從哪兒???



BLE_BUFF_MAX_LEN=251

BLE_TX_NUM_EVENT=4

CLK_OSC32K=2

// Minimum connection interval (units of 1.25ms)

#define DEFAULT_DESIRED_MIN_CONN_INTERVAL? ? ?15//8


// Maximum connection interval (units of 1.25ms)

#define DEFAULT_DESIRED_MAX_CONN_INTERVAL? ? ?45//8



串口輸出如下,

Disconnected.. Reason:8

Advertising..

Connected..

Update 1 - Int 0x6 - Latency 0

Update 1 - Int 0xc - Latency 0

Update 1 - Int 0xc - Latency 0

Update 1 - Int 0x1e - Latency 0

Disconnected.. Reason:8

Advertising..

Connected..

Update 1 - Int 0x6 - Latency 0

Update 1 - Int 0xc - Latency 0

Update 1 - Int 0xc - Latency 0

Update 1 - Int 0x1e - Latency 0

Disconnected.. Reason:8

Advertising..

Connected..

Update 1 - Int 0x6 - Latency 0

Update 1 - Int 0xc - Latency 0

Update 1 - Int 0xc - Latency 0

Disconnected.. Reason:13

Advertising..





#define BLE_HCI_STATUS_CODE_SUCCESS ? 0x00 #define BLE_HCI_STATUS_CODE_UNKNOWN_BTLE_COMMAND ? 0x01 #define BLE_HCI_STATUS_CODE_UNKNOWN_CONNECTION_IDENTIFIER ? 0x02 #define BLE_HCI_AUTHENTICATION_FAILURE ? 0x05 #define BLE_HCI_STATUS_CODE_PIN_OR_KEY_MISSING ? 0x06 #define BLE_HCI_MEMORY_CAPACITY_EXCEEDED ? 0x07 #define BLE_HCI_CONNECTION_TIMEOUT ? 0x08 #define BLE_HCI_STATUS_CODE_COMMAND_DISALLOWED ? 0x0C #define BLE_HCI_STATUS_CODE_INVALID_BTLE_COMMAND_PARAMETERS ? 0x12 #define BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION ? 0x13 #define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES ? 0x14 #define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF ? 0x15 #define BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION ? 0x16 #define BLE_HCI_UNSUPPORTED_REMOTE_FEATURE ? 0x1A #define BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS ? 0x1E #define BLE_HCI_STATUS_CODE_UNSPECIFIED_ERROR ? 0x1F #define BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT ? 0x22 #define BLE_HCI_STATUS_CODE_LMP_ERROR_TRANSACTION_COLLISION ? 0x23 #define BLE_HCI_STATUS_CODE_LMP_PDU_NOT_ALLOWED ? 0x24 #define BLE_HCI_INSTANT_PASSED ? 0x28 #define BLE_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED ? 0x29 #define BLE_HCI_DIFFERENT_TRANSACTION_COLLISION ? 0x2A #define BLE_HCI_PARAMETER_OUT_OF_MANDATORY_RANGE ? 0x30 #define BLE_HCI_CONTROLLER_BUSY ? 0x3A #define BLE_HCI_CONN_INTERVAL_UNACCEPTABLE ? 0x3B #define BLE_HCI_DIRECTED_ADVERTISER_TIMEOUT ? 0x3C #define BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE ? 0x3D #define BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED ? 0x3E#define BLE_HCI_STATUS_CODE_SUCCESS ? 0x00 #define BLE_HCI_STATUS_CODE_UNKNOWN_BTLE_COMMAND ? 0x01 #define BLE_HCI_STATUS_CODE_UNKNOWN_CONNECTION_IDENTIFIER ? 0x02 #define BLE_HCI_AUTHENTICATION_FAILURE ? 0x05 #define BLE_HCI_STATUS_CODE_PIN_OR_KEY_MISSING ? 0x06 #define BLE_HCI_MEMORY_CAPACITY_EXCEEDED ? 0x07 #define BLE_HCI_CONNECTION_TIMEOUT ? 0x08 #define BLE_HCI_STATUS_CODE_COMMAND_DISALLOWED ? 0x0C #define BLE_HCI_STATUS_CODE_INVALID_BTLE_COMMAND_PARAMETERS ? 0x12 #define BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION ? 0x13 #define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES ? 0x14 #define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF ? 0x15 #define BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION ? 0x16 #define BLE_HCI_UNSUPPORTED_REMOTE_FEATURE ? 0x1A #define BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS ? 0x1E #define BLE_HCI_STATUS_CODE_UNSPECIFIED_ERROR ? 0x1F #define BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT ? 0x22 #define BLE_HCI_STATUS_CODE_LMP_ERROR_TRANSACTION_COLLISION ? 0x23 #define BLE_HCI_STATUS_CODE_LMP_PDU_NOT_ALLOWED ? 0x24 #define BLE_HCI_INSTANT_PASSED ? 0x28 #define BLE_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED ? 0x29 #define BLE_HCI_DIFFERENT_TRANSACTION_COLLISION ? 0x2A #define BLE_HCI_PARAMETER_OUT_OF_MANDATORY_RANGE ? 0x30 #define BLE_HCI_CONTROLLER_BUSY ? 0x3A #define BLE_HCI_CONN_INTERVAL_UNACCEPTABLE ? 0x3B #define BLE_HCI_DIRECTED_ADVERTISER_TIMEOUT ? 0x3C #define BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE ? 0x3D #define BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED ? 0x3E

藍(lán)牙斷開(kāi)原因:
#define?	BLE_HCI_STATUS_CODE_SUCCESS???0x00
#define?	BLE_HCI_STATUS_CODE_UNKNOWN_BTLE_COMMAND???0x01
#define?	BLE_HCI_STATUS_CODE_UNKNOWN_CONNECTION_IDENTIFIER???0x02
#define?	BLE_HCI_AUTHENTICATION_FAILURE???0x05
#define?	BLE_HCI_STATUS_CODE_PIN_OR_KEY_MISSING???0x06
#define?	BLE_HCI_MEMORY_CAPACITY_EXCEEDED???0x07
#define?	BLE_HCI_CONNECTION_TIMEOUT???0x08
#define?	BLE_HCI_STATUS_CODE_COMMAND_DISALLOWED???0x0C
#define?	BLE_HCI_STATUS_CODE_INVALID_BTLE_COMMAND_PARAMETERS???0x12
#define?	BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION???0x13
#define?	BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES???0x14
#define?	BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF???0x15
#define?	BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION???0x16
#define?	BLE_HCI_UNSUPPORTED_REMOTE_FEATURE???0x1A
#define?	BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS???0x1E
#define?	BLE_HCI_STATUS_CODE_UNSPECIFIED_ERROR???0x1F
#define?	BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT???0x22
#define?	BLE_HCI_STATUS_CODE_LMP_ERROR_TRANSACTION_COLLISION???0x23
#define?	BLE_HCI_STATUS_CODE_LMP_PDU_NOT_ALLOWED???0x24
#define?	BLE_HCI_INSTANT_PASSED???0x28
#define?	BLE_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED???0x29
#define?	BLE_HCI_DIFFERENT_TRANSACTION_COLLISION???0x2A
#define?	BLE_HCI_PARAMETER_OUT_OF_MANDATORY_RANGE???0x30
#define?	BLE_HCI_CONTROLLER_BUSY???0x3A
#define?	BLE_HCI_CONN_INTERVAL_UNACCEPTABLE???0x3B
#define?	BLE_HCI_DIRECTED_ADVERTISER_TIMEOUT???0x3C
#define?	BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE???0x3D
#define?	BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED???0x3E

#define BLE_HCI_STATUS_CODE_SUCCESS ? 0x00 #define BLE_HCI_STATUS_CODE_UNKNOWN_BTLE_COMMAND ? 0x01 #define BLE_HCI_STATUS_CODE_UNKNOWN_CONNECTION_IDENTIFIER ? 0x02 #define BLE_HCI_AUTHENTICATION_FAILURE ? 0x05 #define BLE_HCI_STATUS_CODE_PIN_OR_KEY_MISSING ? 0x06 #define BLE_HCI_MEMORY_CAPACITY_EXCEEDED ? 0x07 #define BLE_HCI_CONNECTION_TIMEOUT ? 0x08 #define BLE_HCI_STATUS_CODE_COMMAND_DISALLOWED ? 0x0C #define BLE_HCI_STATUS_CODE_INVALID_BTLE_COMMAND_PARAMETERS ? 0x12 #define BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION ? 0x13 #define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES ? 0x14 #define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF ? 0x15 #define BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION ? 0x16 #define BLE_HCI_UNSUPPORTED_REMOTE_FEATURE ? 0x1A #define BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS ? 0x1E #define BLE_HCI_STATUS_CODE_UNSPECIFIED_ERROR ? 0x1F #define BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT ? 0x22 #define BLE_HCI_STATUS_CODE_LMP_ERROR_TRANSACTION_COLLISION ? 0x23 #define BLE_HCI_STATUS_CODE_LMP_PDU_NOT_ALLOWED ? 0x24 #define BLE_HCI_INSTANT_PASSED ? 0x28 #define BLE_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED ? 0x29 #define BLE_HCI_DIFFERENT_TRANSACTION_COLLISION ? 0x2A #define BLE_HCI_PARAMETER_OUT_OF_MANDATORY_RANGE ? 0x30 #define BLE_HCI_CONTROLLER_BUSY ? 0x3A #define BLE_HCI_CONN_INTERVAL_UNACCEPTABLE ? 0x3B #define BLE_HCI_DIRECTED_ADVERTISER_TIMEOUT ? 0x3C #define BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE ? 0x3D #define BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED ? 0x3E從你上面貼的原因來(lái)看,是連接超時(shí)和遠(yuǎn)程斷開(kāi),①使用官方EVT例程,啟用內(nèi)部32K。 ②PCB原理圖發(fā)至郵箱lpc@wch.cn,我們來(lái)幫忙看一下。


只有登錄才能回復(fù),可以選擇微信賬號(hào)登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频