
1. 前言 鉴于经常有客户对如何选择外部低速晶体,如何测试外部 32khz 时钟,如何直接使用外部32khz 信号源 以及 如何选择外部高速晶体,如何测试和校准频偏存在诸多困惑,我整理了该文档以备解惑用。 2. BlueNRG-低速晶体 2.1. 低速晶体的选择 下面是 BlueNRG-1/2 规格书上列的一些指标,主要 Fnom=32.768Khz, PD 不要超过 0.1uW就可以了: ![]() 下面是 BlueNRG-LP 规格书上列的一些指标,主要关注 Fnom=32.768Khz, PD 不要超过0.1uW 就可以了: ![]() 2.2. 32khz 时钟的测试 鉴于有客户反馈:板子可以正常工作,但是无法测量到 32khz 的时钟。这里我展示了 32khz时钟的具体测试方法: 2.2.1. 测试过程: 1. Connect an oscilloscope probe in the pin 14 (ANATEST1) test point. 2. Power up the BlueNRG-1 platform. Set the scope to capture a consistent number of 32 kHz waveform periods (for example 64 cycles, so set the time base at 200 μs). In this way, the influence of the jitter in the measure is minimized. 3. In the IFR tool of the GUI, perform a “Read” of the current IFR configuration, then tick the check-box “LS crystal measure” and then perform a “Write” operation. Now a power cycle is required to let the new IFR be operative. (note: the firmware the device programmed is DTM_UART.bin or DTM_SPI.bin ,which is located in C:\Program Files (x86)\STMicroelectronics\BlueNRG-1_2 DK 3.1.0\Firmware\BLE_Examples\DTM\BlueNRG-1). 4. At this point, the 32.768 kHz waveform is visible on the oscilloscope screen. Perform the measurement of the frequency: the difference between the target value (f = 32.768 kHz) and the measured one is the frequency offset Δf. 2.2.2. 期望结果: If DUT frequency > 32.768 kHz → increases XTAL caps If DUT frequency < 32.768 kHz → decreases XTAL caps To find the oscillator ppm, use the following formula: where: Δf = offset f = 32.768 kHz Add to the found ppm value the one declared in the adopted crystal datasheet. 当 BLE 堆栈初始化时,这个最终值必须在从 SCA 和主 SCA 字段中使用。 2.3. 如何直接使用外部 32khz 信号源 鉴于一些客户不想使用内部 RC 也不想外加 32khz low crystal , 客户想知道如何使用外部32khz 时钟源,如何使用?这里我展示了具体的使用方法: 2.3.1. 正确的输入 PIN 脚应该是 SXTAL0 pin, 时钟源的要求如下: 1. 提供 0 到 1.2V 的方波: In this case the internal xtal circuit will be disable (less power consumption).The firmware configuration LS_SOURCE=LS_SOURCE_EXTERNAL_32KHZ should be used and, in addition to this, a modification on the filesystem_bluenrg1.c is needed, that is . . cold_start_config[11] = (1 << 1); / <<<<<<<<<<< New line added / / Cold start configuration device / BLUE_CTRL->RADIO_CONFIG = 0x10000U | (uint16_t)((uint32_t)cold_start_config & 0x0000FFFFU); while ((BLUE_CTRL->RADIO_CONFIG & 0x10000) != 0); . . 2. 提供从 0 到 1.2 Vpp 的周期波形: In this case the configuration LS_SOURCE=LS_SOURCE_EXTERNAL_32KHZ should be used without further modification. 完整版请查看:附件 ![]() |
STM32 GUI LTDC 最大像素时钟评估方法
【2025·STM32峰会】GUI解决方案实训分享1-对LVGL咖啡机例程的牛刀小试以及问题排查
OpenBLT移植到STM32F405开发板
为什么要先开启STM32外设时钟?
【STM32MP157】从ST官方例程中分析RPMsg-TTY/SDB核间通信的使用方法
【经验分享】STM32实例-RTC实时时钟实验④-获取RTC时间函数与中断服务函数
STM32 以太网 MAC Loopback 的实现
STM32功能安全设计包,助力产品功能安全认证
基于STM32启动过程startup_xxxx.s文件经验分享
HRTIM 指南