Wireless Connectivity Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Wireless Connectivity Knowledge Base

Discussions

Sort by:
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-340508
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-340993
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-332703
View full article
In this document we will be seeing how to create a BLE demo application for an adopted BLE profile based on another demo application with a different profile. In this demo, the Pulse Oximeter Profile will be implemented.  The PLX (Pulse Oximeter) Profile was adopted by the Bluetooth SIG on 14th of July 2015. You can download the adopted profile and services specifications on https://www.bluetooth.org/en-us/specification/adopted-specifications. The files that will be modified in this post are, app.c,  app_config.c, app_preinclude.h, gatt_db.h, pulse_oximeter_service.c and pulse_oximeter_interface.h. A profile can have many services, the specification for the PLX profile defines which services need to be instantiated. The following table shows the Sensor Service Requirements. Service Sensor Pulse Oximeter Service Mandatory Device Information Service Mandatory Current Time Service Optional Bond Management Service Optional Battery Service Optional Table 1. Sensor Service Requirements For this demo we will instantiate the PLX service, the Device Information Service and the Battery Service. Each service has a source file and an interface file, the device information and battery services are already implemented, so we will only need to create the pulse_oximeter_interface.h file and the pulse_oximeter_service.c file. The PLX Service also has some requirements, these can be seen in the PLX service specification. The characteristic requirements for this service are shown in the table below. Characteristic Name Requirement Mandatory Properties Security Permissions PLX Spot-check Measurement C1 Indicate None PLX Continuous Measurement C1 Notify None PLX Features Mandatory Read None Record Access Control Point C2 Indicate, Write None Table 2. Pulse Oximeter Service Characteristics C1: Mandatory to support at least one of these characteristics. C2: Mandatory if measurement storage is supported for Spot-check measurements. For this demo, all the characteristics will be supported. Create a folder for the pulse oximeter service in  \ConnSw\bluetooth\profiles named pulse_oximeter and create the pulse_oximeter_service.c file. Next, go to the interface folder in \ConnSw\bluetooth\profiles and create the pulse_oximeter_interface.h file. At this point these files will be blank, but as we advance in the document we will be adding the service implementation and the interface macros and declarations. Clonate a BLE project with the cloner tool. For this demo the heart rate sensor project was clonated. You can choose an RTOS between bare metal or FreeRTOS. You will need to change some workspace configuration.  In the bluetooth->profiles->interface group, remove the interface file for the heart rate service and add the interface file that we just created. Rename the group named heart_rate in the bluetooth->profiles group to pulse_oximeter and remove the heart rate service source file and add the pulse_oximeter_service.c source file. These changes will be saved on the actual workspace, so if you change your RTOS you need to reconfigure your workspace. To change the device name that will be advertised you have to change the advertising structure located in app_config.h. /* Scanning and Advertising Data */ static const uint8_t adData0[1] =  { (gapAdTypeFlags_t)(gLeGeneralDiscoverableMode_c | gBrEdrNotSupported_c) }; static const uint8_t adData1[2] = { UuidArray(gBleSig_PulseOximeterService_d)}; static const gapAdStructure_t advScanStruct[] = { { .length = NumberOfElements(adData0) + 1, .adType = gAdFlags_c, .aData = (void *)adData0 }, { .length = NumberOfElements(adData1) + 1, .adType = gAdIncomplete16bitServiceList_c, .aData = (void *)adData1 }, { .adType = gAdShortenedLocalName_c, .length = 8, .aData = "FSL_PLX" } }; We also need to change the address of the device so we do not have conflicts with another device with the same address. The definition for the address is located in app_preinclude.h and is called BD_ADDR. In the demo it was changed to: #define BD_ADDR 0xBE,0x00,0x00,0x9F,0x04,0x00 Add the definitions in ble_sig_defines.h located in Bluetooth->host->interface for the UUID’s of the PLX service and its characteristics. /*! Pulse Oximeter Service UUID */ #define gBleSig_PulseOximeterService_d         0x1822 /*! PLX Spot-Check Measurement Characteristic UUID */ #define gBleSig_PLXSpotCheckMeasurement_d      0x2A5E /*! PLX Continuous Measurement Characteristic UUID */ #define gBleSig_PLXContinuousMeasurement_d     0x2A5F /*! PLX Features Characteristic UUID */ #define gBleSig_PLXFeatures_d                  0x2A60 /*! Record Access Control Point Characteristic UUID */ #define gBleSig_RecordAccessControlPoint_d     0x2A52 We need to create the GATT database for the pulse oximeter service. The requirements for the service can be found in the PLX Service specification. The database is created at compile time and is defined in the gatt_db.h.  Each characteristic can have certain properties such as read, write, notify, indicate, etc. We will modify the existing database according to our needs. The database for the pulse oximeter service should look something like this. PRIMARY_SERVICE(service_pulse_oximeter, gBleSig_PulseOximeterService_d)     CHARACTERISTIC(char_plx_spotcheck_measurement, gBleSig_PLXSpotCheckMeasurement_d, (gGattCharPropIndicate_c))         VALUE_VARLEN(value_PLX_spotcheck_measurement, gBleSig_PLXSpotCheckMeasurement_d, (gPermissionNone_c), 19, 3, 0x00, 0x00, 0x00)         CCCD(cccd_PLX_spotcheck_measurement)     CHARACTERISTIC(char_plx_continuous_measurement, gBleSig_PLXContinuousMeasurement_d, (gGattCharPropNotify_c))         VALUE_VARLEN(value_PLX_continuous_measurement, gBleSig_PLXContinuousMeasurement_d, (gPermissionNone_c), 20, 3, 0x00, 0x00, 0x00)         CCCD(cccd_PLX_continuous_measurement)     CHARACTERISTIC(char_plx_features, gBleSig_PLXFeatures_d, (gGattCharPropRead_c))         VALUE_VARLEN(value_plx_features, gBleSig_PLXFeatures_d, (gPermissionFlagReadable_c), 7, 2, 0x00, 0x00)     CHARACTERISTIC(char_RACP, gBleSig_RecordAccessControlPoint_d, (gGattCharPropIndicate_c | gGattCharPropWrite_c))         VALUE_VARLEN(value_RACP, gBleSig_RecordAccessControlPoint_d, (gPermissionNone_c), 4, 3, 0x00, 0x00, 0x00)         CCCD(cccd_RACP) For more information on how to create a GATT database you can check the BLE Application Developer’s Guide chapter 7. Now we need to make the interface file that contains all the macros and declarations of the structures needed by the PLX service. Enumerated types need to be created for each of the flags field or status field of every characteristic of the service. For example, the PLX Spot-check measurement field has a flags field, so we declare an enumerated type that will help us keep the program organized and well structured. The enum should look something like this: /*! Pulse Oximeter Service - PLX Spotcheck Measurement Flags */ typedef enum {     gPlx_TimestampPresent_c                      = BIT0,     /* C1 */     gPlx_SpotcheckMeasurementStatusPresent_c     = BIT1,     /* C2 */     gPlx_SpotcheckDeviceAndSensorStatusPresent_c = BIT2,     /* C3 */     gPlx_SpotcheckPulseAmplitudeIndexPresent_c   = BIT3,     /* C4 */     gPlx_DeviceClockNotSet_c                     = BIT4 } plxSpotcheckMeasurementFlags_tag; The characteristics that will be indicated or notified need to have a structure type that contains all the fields that need to be transmitted to the client. Some characteristics will not always notify or indicate the same fields, this varies depending on the flags field and the requirements for each field. In order to notify a characteristic we need to check the flags in the measurement structure to know which fields need to be transmitted. The structure for the PLX Spot-check measurement should look something like this: /*! Pulse Oximeter Service - Spotcheck Measurement */ typedef struct plxSpotcheckMeasurement_tag {     ctsDateTime_t              timestamp;             /* C1 */     plxSpO2PR_t                SpO2PRSpotcheck;       /* M */     uint32_t                   deviceAndSensorStatus; /* C3 */     uint16_t                   measurementStatus;     /* C2 */     ieee11073_16BitFloat_t     pulseAmplitudeIndex;   /* C4 */     uint8_t                    flags;                 /* M */ }plxSpotcheckMeasurement_t; The service has a configuration structure that contains the service handle, the initial features of the PLX Features characteristic and a pointer to an allocated space in memory to store spot-check measurements. The interface will also declare some functions such as Start, Stop, Subscribe, Unsubscribe, Record Measurements and the control point handler. /*! Pulse Oximeter Service - Configuration */ typedef struct plxConfig_tag {     uint16_t      serviceHandle;     plxFeatures_t plxFeatureFlags;     plxUserData_t *pUserData;     bool_t        procInProgress; } plxConfig_t; The service source file implements the service specific functionality. For example, in the PLX service, there are functions to record the different types of measurements, store a spot-check measurement in the database, execute a procedure for the RACP characteristic, validate a RACP procedure, etc. It implements the functions declared in the interface and some static functions that are needed to perform service specific tasks. To initialize the service you use the start function. This function initializes some characteristic values. In the PLX profile, the Features characteristic is initialized and a timer is allocated to indicate the spot-check measurements periodically when the Report Stored Records procedure is written to the RACP characteristic. The subscribe and unsubscribe functions are used to update the device identification when a device is connected to the server or disconnected. bleResult_t Plx_Start (plxConfig_t *pServiceConfig) {         mReportTimerId = TMR_AllocateTimer();         return Plx_SetPLXFeatures(pServiceConfig->serviceHandle, pServiceConfig->plxFeatureFlags); } All of the services implementations follow a similar template, each service can have certain characteristics that need to implement its own custom functions. In the case of the PLX service, the Record Access Control Point characteristic will need many functions to provide the full functionality of this characteristic. It needs a control point handler, a function for each of the possible procedures, a function to validate the procedures, etc. When the application makes a measurement it must fill the corresponding structure and call a function that will write the attribute in the database with the correct fields and then send an indication or notification. This function is called RecordMeasurement and is similar between the majority of the services. It receives the measurement structure and depending on the flags of the measurement, it writes the attribute in the GATT database in the correct format. One way to update a characteristic is to create an array of the maximum length of the characteristic and check which fields need to be added and keep an index to know how many bytes will be written to the characteristic by using the function GattDb_WriteAttribute(handle, index, &charValue[0]). The following function shows an example of how a characteristic can be updated. In the demo the function contains more fields, but the logic is the same. static bleResult_t Plx_UpdatePLXContinuousMeasurementCharacteristic ( uint16_t handle, plxContinuousMeasurement_t *pMeasurement ) {     uint8_t charValue[20];     uint8_t index = 0;     /* Add flags */     charValue[0] = pMeasurement->flags;     index++;     /* Add SpO2PR-Normal */     FLib_MemCpy(&charValue[index], &pMeasurement->SpO2PRNormal, sizeof(plxSpO2PR_t));     index += sizeof(plxSpO2PR_t);         /* Add SpO2PR-Fast */     if (pMeasurement->flags & gPlx_SpO2PRFastPresent_c)     {       FLib_MemCpy(&charValue[index], &pMeasurement->SpO2PRFast, sizeof(plxSpO2PR_t));       index += sizeof(plxSpO2PR_t);     }        return GattDb_WriteAttribute(handle, index, &charValue[0]); } The app.c handles the application specific functionality. In the PLX demo it handles the timer callback to make a PLX continuous measurement every second. It handles the key presses and makes a spot-check measurement each time the SW3 pushbutton is pressed. The GATT server callback receives an event when an attribute is written, and in our application the RACP characteristic is the only one that can be written by the client. When this event occurs, we call the Control Point Handler function. This function makes sure the indications are properly configured and check if another procedure is in progress. Then it calls the Send Procedure Response function, this function validates the procedure and calls the Execute Procedure function. This function will call one of the 4 possible procedures. It can call Report Stored Records, Report Number of Stored Records, Abort Operation or Delete Stored Records. When the project is running, the 4 LEDs will blink indicating an idle state. To start advertising, press the SW4 button and the LED1 will start flashing. When the device has connected to a client the LED1 will stop flashing and turn on. To disconnect the device, hold the SW4 button for some seconds. The device will return to an advertising state. In this demo, the spot-check measurement is made when the SW3 is pressed, and the continuous measurement is made every second. The spot-check measurement can be stored by the application if the Measurement Storage for spot-check measurements is supported (bit 2 of Supported Features Field in the PLX Features characteristic). The RACP characteristic lets the client control the database of the spot-check measurements, you can request the existing records, delete them, request the number of stored records or abort a procedure. To test the demo you can download and install the nRF Master Control application by Nordic Semiconductor on an Android Smartphone that supports BLE. This app lets you discover the services in the sensor and interact with each characteristic. The application will parse known characteristics, but because the PLX profile is relatively new, these characteristics will not be parsed and the values will be displayed in a raw format. Figure 1. nRF Master Control app
View full article
CMSIS, the ARM Cortex Microcontroller Software Interface Standard, can be used to distribute software components in standard package format. CMSIS compliant software components allow: • Easy reuse of example applications or template code • Combination of SW components from multiple vendors CMSIS packages available here: https://www.keil.arm.com/packs/ NXP WiFi package available here: https://www.keil.arm.com/packs/wifi-nxp/versions/   Getting NXP WiFi/BT software   Please find the minimal setup required to download the NXP WiFi/BT software CMSIS packs: First, get cpackget binary from the Open CMSIS Pack toolbox binaries Then, install the NXP WiFi and Bluetooth packages and their dependencies using below commands cpackget add NXP::WIFI@2.0.0 cpackget add NXP::WIRELESS_WPA_SUPPLICANT@2.0.0 cpackget add NXP::EDGEFAST_BT_BLE@2.0.0   Please note that the CMSIS software packs are installed in below directory: ~/.cache/arm/packs/NXP/   Building NXP WiFi/Bluetooth software   Using combined WiFi+Bluetooth application on i.MXRT1060-revC board, as an example.   Prerequisite Follow below steps to install all the required tools to get CMSIS packages and build them . <(curl https://aka.ms/vcpkg-init.sh -L) . ~/.vcpkg/vcpkg-init vcpkg new --application vcpkg add artifact arm:cmsis-toolbox vcpkg add artifact microsoft:cmake vcpkg add artifact microsoft:ninja vcpkg add artifact arm:arm-none-eabi-gcc vcpkg activate Refer to CMSIS toolbox installation documentation    Activate required tools . ~/.vcpkg/vcpkg-init vcpkg activate Install the NXP i.MXRT1060-REVC Bluetooth examples and their dependencies cpackget add NXP::MIMXRT1060-EVKC_EDGEFAST_BLUETOOTH_Examples@1.0.0 Workaround: current NXP SW is aligned with ARM::CMSIS@5.8.0, and does not support latest ARM::CMSIS@6.0.0, so we need to use older version with below commands cpackget rm ARM::CMSIS@6.0.0 cpackget add ARM::CMSIS@5.8.0 List the installed packages cpackget list Building combined WiFi+BT example application Copy example application to local directory and provide write permissions mkdir -p ~/test cp -r ~/.cache/arm/packs/NXP/MIMXRT1060-EVKC_EDGEFAST_BLUETOOTH_Examples/1.0.0/boards/evkcmimxrt1060/edgefast_bluetooth_examples/wifi_cli_over_ble_wu/ ~/test/ cd ~/test/wifi_cli_over_ble_wu/ && chmod -R u+w .   Build the application csolution convert wifi_cli_over_ble_wu.csolution.yml cbuild wifi_cli_over_ble_wu.flexspi_nor_debug+armgcc.cprj Convert elf to bin for flashing cd armgcc/flexspi_nor_debug arm-none-eabi-objcopy wifi_cli_over_ble_wu.elf -O binary wifi_cli_over_ble_wu.bin
View full article
Default init case By default, when no country regulatory setting is defined, we use WW (World Wide safe setting, meaning we only transmit on bands which are allowed worldwide, with the TX power compatible with all countries regulations)   Setting country 1/ When operating in AP mode: - we usually set country code (ex : country_code=JP) in hostapd.conf to define the country. - this country definition will be advertised to all connected STA if ieee80211d=1 is set in hostpad.conf - the country can also be set with "iw reg set" command   2/ When operating in STA mode - country code can be set with "iw reg set" command or in wpa_supplicant.conf (ex : country=jp) - once connected to the AP (with 80211d enabled), the STA will switch to the AP country setting (this behaviour can be disabled by adding country_ie_ignore=1 driver parameter)   Once country is set: - we will only transmit on channels allowed for that country - with country maximum TX power - we might use DFS feature on channels declared as DFS channels for that specific country   TX power settings   1/ By default, using Linux regulatory settings (/lib/firmware/regulatory.db, generated from db.txt) These settings define allowed channels, DFS flags and max TX power on a country basis See section "Regulatory db" further.   2/ Linux regulatory settings can be overwritten by: a. cntry_txpwr=0 and txpwrlimit_cfg=nxp/txpower.bin driver param (generated from txpower.conf (channel/MCS->txpower), see AN13009) Same setting for all countries (static). Using channels/flags from db.txt, and minimum TX power between db.txt and txpower.bin/rgpower.bin b. cntry_txpwr=1 (look for nxp/txpower_XX.bin files (generated from txpower.conf (channel/MCS->txpower), see AN13009) Need one txpower_XX.bin file for each country XX (dynamically loaded, for instance with iw reg set XX) Using channels/flags from db.txt, and minimum TX power between db.txt and txpower_XX.bin   cntry_txpwr txpwrlimit_cfg TX power limit Method 0 nxp/txpower.bin nxp/txpower.bin (static) V1 1 - nxp/txpower_XX.bin (dynamic) V1 cfg     We have default TX power tables, but customer can tune these TX power settings, based on their HW. Please refer to "AN13009 Wi-Fi Tx Power Management in Linux"       Regulatory db   Source https://wireless.wiki.kernel.org/en/developers/Regulatory/wireless-regdb   Wifi regulatory setting (allow channels, etc) are defined in db.txt, then converted to regulatory.db (store in /lib/firmware) We can get official db.txt from here, and build regulatory.db with below command   git clone git://git.kernel.org/pub/scm/linux/kernel/git/wens/wireless-regdb.git make   Kernel regulatory.db integrity is checked by the Linux kernel. Disabling REGDB signature check with the folllowing kernel config: CONFIG_EXPERT=y CONFIG_CFG80211_CERTIFICATION_ONUS=y # CONFIG_CFG80211_REQUIRE_SIGNED_REGDB is not set   Rebuilding kernel and flashing scp Image root@192.168.0.2:/run/media/mmcblk0p1/      iw reg command examples and other notes   root@imx8mqevk:~# iw reg get global country 00: DFS-UNSET         (2402 - 2472 @ 40), (N/A, 20), (N/A)         (2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, PASSIVE-SCAN         (2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, PASSIVE-SCAN         (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, PASSIVE-SCAN         (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, PASSIVE-SCAN         (5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, PASSIVE-SCAN         (5735 - 5835 @ 80), (N/A, 20), (N/A), PASSIVE-SCAN         (57240 - 63720 @ 2160), (N/A, 0), (N/A) root@imx8mqevk:~# iw reg get global country FR: DFS-ETSI         (2400 - 2483 @ 40), (N/A, 20), (N/A)         (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW         (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW         (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS         (5725 - 5875 @ 80), (N/A, 13), (N/A)         (57000 - 66000 @ 2160), (N/A, 40), (N/A)   By default (if no country is set), we are using the world domain. this is the most restrictive. Then you can set the country (using driver module parameter, wpa_supplicant.conf, etc) or get the country automatically provided by the access point (80211d). This will update the regulatory domain, meaning the allowed channels, etc. You can check the country settings with "iw reg get" command.   The regulatory domain has priority, compared to the channel list you would set in the wpa_supplicant.conf.  
View full article
/*** 2024 July 4th latest disclaimers:  - KW47, MCX W72 is a direct derivative from KW4x - please bookmark this page for future update - this article is for early enablement based on KW45, K32W148, MCX W71 and is pending updates up to wider releases of new KW47 and MCX W72 ---- Datasheet and HW manufacturing files shared on request----  ***/ Please, find the important link to build a PCB using a KW47 or MCX W72 and all concerning the radio performances, low power and radio certification (CE/FCC/IC).     KW47 product NXP web page:  pending release of KW47/MCXW72  MCXW72 product NXP web page: pending release of KW47/MCXW72  KW-MCXW-EVK getting started NXP web page pending release of KW47/MCXW72    HW:     KW47-MCXW72-EVK HW guideline: Available on request        HVQFN48 package specification: SOT619-17(D)   pending release of SOT619-17(DD)       KW47-MCXW72-EVK User Manual pending release of KW47/MCXW72        Minimum BoM (attached file) >> KW45 applicable for KW47 waiting release of KW47/MCXW72      DCDC management guide (AN13831) : KW45/K32W148 - Power Management Hardware (nxp.com) KW45 applicable for KW47 waiting release of KW47/MCXW72      Design-In check list: see attached file at the bottom of this article     RF matching: S parameters (attached file) pending release of KW47/MCXW72    Information: “As RF behavior are dependent of PCB layout & manufacturing; PCB prototypes (based on NXP recommendations) will have to be fine-tuned to insure the expected qualified in RF is reached on the final productized platform.”   Radio:     RF report: KW45 and K32W148 RF System Evaluation Report for Bluetooth LE and K32W148 for 802.15.4 Applications ... pending release of KW47/MCXW72      Radio co-existence: Kinetis Wireless Family Products Bluetooth Low Energy Coexistence with Wi-Fi Application (nxp.com) pending release of KW47/MCXW72      Distance performances: refer to attached file pending release of KW47/MCXW72      Antenna:  Compact Planar Antennas for 2.4 GHz Communication Designs and Applications within NXP EVK Boards Antennas for Channel Sounding Applications     Generic FSK Link Layer Quick Start (attached file)     BLE connectectivity test binary file:  SDK_x_xx_x_KW45B41Z-EVK\boards\kw45b41zevk\wireless_examples\genfsk\connectivity_test\bm\iar\     pending release of KW47/MCXW72       Return loss (S11) measurement: How to measure the return loss of your RF matching (S11)                    part of the RF report (AN13728)     Loadpull: pending release of KW47/MCXW72   SW tools:     IoT Tool box (mobile application)     Connectivity test tool for connectivity products (part of the IoT toolbox)     DTM: How to use the HCI_bb on Kinetis family products a... - NXP Community https://community.nxp.com/t5/Wireless-Connectivity-Knowledge/BLE-HCI-Application-to-set-transmitter-...   Crystal Article 1 :pending release of KW47/MCXW72     LowPower Estimator Tool https://community.nxp.com/t5/Wireless-Connectivity/Kinetis-KW35-38-KW45-amp-K32W1-MCXW71-Power-Profi... pending release of KW47/MCXW72       Low Power Consumption: https://www.nxp.com/docs/en/application-note/AN13230.pdf pending release of KW47/MCXW72     Certification: pending release of KW47/MCXW72  
View full article
On the KW45 product, there is a way to enable the 32kHz clock without using a crystal externally. Indeed, a FRO32K can be used instead. this article proposes to show you at a glance how to activate it and which performances to expect in comparison to a 32kHz crystal.  This Crystal-Less mode allows to reduce the cost of the system, without compromising the 32 kHz clock accuracy thanks to a software calibration mechanism called SFC standing for Smart Frequency Calibration. One other advantage of the FRO32K is the shorter start up time, including the calibration. The FRO32K clock is calibrated against the 32 MHz RF oscillator through the Signal Frequency Analyzer (SFA) module of KW45. Software enablement: The Crystal-less feature is available since the SDK version 2.12.7 (MR4) , all measurements in this document are done with softwares based on this version of SDK. To enable the Crystal-Less mode, simply define the compilation flag gBoardUseFro32k_d to 1 in board_platform.h or in app_preinclude.h. In this mode, the SFC module measures and recalibrates the FRO32K output frequency when necessary. This typically happens at a Power On Reset, or when the temperature changes, or periodically when the NBU is running. By using this mode, higher power consumption is expected. The FRO32K consumes more power than the XTAL32K in low power mode (around 350nA), and the NBU wakes up earlier while FRO32K is used, which also entails a higher power consumption.   FRO32K vs Xtal32K performances: For these measurements, we used an early FRO32K delivered feature but, even if it is still in experimental phase, the results below will already give you some information.    Clock accuracy at room temperature:    In steady state, the output frequency of the FRO32K is even more stable than that of the XTAL32K thanks to the SFC module. The clock frequency accuracy of the XTAL32K is a bit better than the FRO32K, however, both are within the permitted accuracy range and are compliant with the Bluetooth Low Energy specification. Clock accuracy after recalibration (triggered by a temperature variation):   This test proved that the FRO32K provided a source clock that is within the target accuracy range even during a temperature variation. Throughput test at room temperature: Throughput measurements are performed using two different clock sources to verify if there is any connection lost due to the potential clock drift entailed by using the FRO32K as a clock source. The BLE_Shell demo application is used for the throughput measurement. (refer to KW45-EVK Software Development Kit). The DUT is programmed with software using either the XTAL32K or the FRO32K as the source clock. After the communication establishment, the bit rate measurement is triggered manually, and the result is displayed on the prompt window.  Results: Two clock configurations show identical performance, which proves that the 32 kHz crystal-less mode presents no disconnection and no performance degradation. Throughput test over a temperature variation: it is the same test set up as above but within a 60 °C temperature variation. The results are identical to previous ones. No disconnection or performance degradation is detected. Conclusion Various tests and measurements proved that the FRO32K can be used as the 32 kHz clock source instead of the XTAL32K, with the help of the SFC module. It is capable of providing an accurate and stable 32 kHz clock source that satisfies the requirements of connectivity standards. However, please note that this feature is still in experimental phase, tests are still ongoing to ensure that the feature is robust in any circumstances. Customers who want to enable this feature in production must validate this solution according to their own use cases. For more detailed information, a draft version of the application note is attached to this article but an updated version will be available on NXP.com website when a new SDK is released.
View full article