NRF52832DK常见问题
这里登记NRF52832DK使用过程中遇到的各种问题。
1 支持哪些仿真器?
支持的仿真器有:
- 谷雨Jlink-Lite仿真器,10pin接口,与NRF52832DK完全匹配可直连。
- 标准Jlink仿真器,20pin接口,无法与52DK直连,需要转接,可选购我们的Jlink适配转接板。
2 支持哪些显示屏?
支持的显示屏有,意思是硬件接口和软件驱动均支持的。
- 谷雨1.44寸TFT彩色液晶屏,128x128分辨率。
- 谷雨1.32寸TFT彩色液晶屏
- 谷雨1.54寸ePaper电子墨水屏,200x200分辨率。
3 安卓或iOS的App源码?
Nordic开源非常多的ble应用的代码,包括nRF Connect和nRF ToolBox,源码托管在Nordic官网Github,另外还包括很多其他平台的相关代码,具有非常大的使用价值。
地址1:https://github.com/NordicSemiconductor
地址2:https://github.com/NordicPlayground
4 蓝牙代码相关
4.1 蓝牙断开原因定义
disconnected.reason,例如0x0013表示对方设备主动断开:
代码结构体位于文件:ble_gap.h
typedef struct
{
uint8_t reason; /**< HCI error code, see @ref BLE_HCI_STATUS_CODES. */
} ble_gap_evt_disconnected_t;
reason宏定义位于文件:ble_hci.h
#define BLE_HCI_STATUS_CODE_SUCCESS 0x00 /**< Success. */
#define BLE_HCI_STATUS_CODE_UNKNOWN_BTLE_COMMAND 0x01 /**< Unknown BLE Command. */
#define BLE_HCI_STATUS_CODE_UNKNOWN_CONNECTION_IDENTIFIER 0x02 /**< Unknown Connection Identifier. */
/*0x03 Hardware Failure
0x04 Page Timeout
*/
#define BLE_HCI_AUTHENTICATION_FAILURE 0x05 /**< Authentication Failure. */
#define BLE_HCI_STATUS_CODE_PIN_OR_KEY_MISSING 0x06 /**< Pin or Key missing. */
#define BLE_HCI_MEMORY_CAPACITY_EXCEEDED 0x07 /**< Memory Capacity Exceeded. */
#define BLE_HCI_CONNECTION_TIMEOUT 0x08 /**< Connection Timeout. */
/*0x09 Connection Limit Exceeded
0x0A Synchronous Connection Limit To A Device Exceeded
0x0B ACL Connection Already Exists*/
#define BLE_HCI_STATUS_CODE_COMMAND_DISALLOWED 0x0C /**< Command Disallowed. */
/*0x0D Connection Rejected due to Limited Resources
0x0E Connection Rejected Due To Security Reasons
0x0F Connection Rejected due to Unacceptable BD_ADDR
0x10 Connection Accept Timeout Exceeded
0x11 Unsupported Feature or Parameter Value*/
#define BLE_HCI_STATUS_CODE_INVALID_BTLE_COMMAND_PARAMETERS 0x12 /**< Invalid BLE Command Parameters. */
#define BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION 0x13 /**< Remote User Terminated Connection. */
#define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES 0x14 /**< Remote Device Terminated Connection due to low resources.*/
#define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF 0x15 /**< Remote Device Terminated Connection due to power off. */
#define BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION 0x16 /**< Local Host Terminated Connection. */