|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| applications/ | H | 25-Apr-2025 | - | 42 | 13 |
| docs/figures/ | H | 25-Apr-2025 | - | | |
| drivers/ | H | 25-Apr-2025 | - | 3,909 | 1,536 |
| nordic/ | H | 25-Apr-2025 | - | 350,515 | 271,298 |
| packages/ | H | 25-Apr-2025 | - | 196,752 | 134,347 |
| rt-thread/ | H | 25-Apr-2025 | - | 831,896 | 568,652 |
| .config | H A D | 25-Apr-2025 | 10.9 KiB | 459 | 412 |
| Kconfig | H A D | 25-Apr-2025 | 332 | 26 | 15 |
| README.md | H A D | 25-Apr-2025 | 2.9 KiB | 78 | 50 |
| SConscript | H A D | 25-Apr-2025 | 298 | 15 | 11 |
| SConstruct | H A D | 25-Apr-2025 | 977 | 35 | 26 |
| project.uvoptx | H A D | 25-Apr-2025 | 78.2 KiB | 2,412 | 2,395 |
| project.uvprojx | H A D | 25-Apr-2025 | 55.3 KiB | 1,408 | 1,402 |
| rtconfig.h | H A D | 25-Apr-2025 | 3.6 KiB | 218 | 81 |
| rtconfig.py | H A D | 25-Apr-2025 | 2.2 KiB | 84 | 61 |
| rtthread-nrf52832.sct | H A D | 25-Apr-2025 | 464 | 16 | 13 |
| template.uvoptx | H A D | 25-Apr-2025 | 5.2 KiB | 172 | 165 |
| template.uvprojx | H A D | 25-Apr-2025 | 14.3 KiB | 387 | 381 |
README.md
1# NRF52832 Nimble BSP 使用说明
2
3## 简介
4
5该 BSP 以 nrf52832 MCU 作为为平台,提供 NimBLE Bluetooth Stack 在 RT-Thread 上的基本功能。
6
7所使用的协议栈为 NimBLE 在 RT-Thread上的移植版本,提供完整的 Host 及 Controller 协议栈支持,主要特性如下:
8
9- 支持 BLE5.0 标准
10- 2Msym / s PHY 吞吐量
11- 安全管理(SM),支持 LE Legacy Pairing, LE Secure Connections, Transport Specific Key Distribution
12- 配置灵活,最多支持 32 个并发连接
13- 提供常用的 Profile 和 Service 支持
14- 清晰的 HCI 接口抽象
15- 支持 BLE Mesh(PB-GATT and PB-ADV provisioning, Relay support, GATT Proxy ....)
16- 最小 4.5 KB RAM,69KB Flash 的资源占用
17
18更多关于 NimBLE Stack 的介绍请参考 ``http://mynewt.apache.org/latest/network/docs/index.html``。
19
20## 外设支持
21
22本 BSP 目前对外设的支持情况如下:
23
24| **片内外设** | **支持情况** | **备注** |
25| :----------------- | :----------: | :------------------------------------- |
26| OS_Tick | 支持 | |
27| GPIO | 支持 | |
28| UART | 支持 | TX-->6;RX-->8 |
29
30## 使用说明
31
32当前工程已经默认导入RT-Thread 4.0源码和NimBLE软件包,且打开心率服务(HRS)的配置,无需再次配置,可直接使用MDK5 双击打开工程文件编译。
33
34### 编译及烧写
35
36- 编译工程
37
38直接双击 project.uvprojx 工程文件,打开该工程后,点击 build 按钮,编译生成 hex 文件。
39
40- 烧写
41
42使用 JLINK 连接板子,选择对应的芯片型号,点击 Download 按钮进行烧写。
43
44### 运行结果
45
46烧写完成后,正确连接板载串口至终端软件,复位重新执行,打印如下信息,此时标志 RT-Thread 已经在正常工作,可输入其它 FINSH 命令查看系统状态信息,如 ``ps`` 、 ``free`` 等。
47
48```
49 \ | /
50- RT - Thread Operating System
51 / | \ 4.0.0 build Jan 23 2019
52 2006 - 2018 Copyright by rt-thread team
53hello world
54msh />
55```
56
57### BLE 的简单使用
58
59当前工程提供一个 Heart rate 示例。系统正常运行后,在 Finsh 命令行 输入 `` ble_hr ``,执行该 Demo。如下:
60
61```
62msh />ble_hr
63[I/nimble] GAP procedure initiated: stop advertising.
64[I/nimble] GAP procedure initiated: advertise; disc_mode=2 adv_channel_map=0 own_addr_type=0 adv_filter_policy=0 adv_itvl_min=0 adv_itvl_max=0
65msh />
66```
67
68此时手机打开 `nRF Master Control Panel` APP,能够扫描到名为 `rtt_blehr_sensor` 的设备,连接之后,模拟的 Heart rate 示例开始运行。现象如下:
69
70
71
72## 注意事项
73
74- 该BSP UART默认使用 TX--->6;RX--->8 引脚,可根据板载设计自行修改;
75- 该协议栈移植自 Apache 开源方案 Nimble,相关介绍及 API 说明可参考``http://mynewt.apache.org/latest/network/docs/index.html``。
76
77
78