Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
F2400 LIMP0 エラー 30電源の頻繁な電源オン/オフサイクル中に、LIMP0ピンがローにプルダウンされることがわかった。根本原因はまだ特定できていません。分析にご協力ください。 ソフトウェアデバッグの結果、故障が報告される際に以下のレジスタが設定されることがわかりました。 FS_CRC bit12 INIT_CRC_NOK_I FS_SAFETY_OUTPUTS bit3 LIMP0_DRV M_WU1_FLG ビット9 FS_EVT M_GEN_FLAG bit6 WD_G さらに、LIMP0ピンがローに引き込まれた後もトランシーバは通常モードのまま、CANメッセージの送受信は正常です。ソフトウェアではウォッチドッグ期間を無限に設定しましたが、故障が発生した時もレジスタは256msと表示されます。 Re: F2400 LIMP0 ERROR 1:障害エラーカウンタのデフォルト値は1です。正しく読みましたか? FS_I_FSSM_CFG[3:0] の値 2:以下に、LIMPに影響を与えるすべての要因を列挙しました。 最も基本的な方法を使って、一つずつ排除していきましょう。 Re: F2400 LIMP0 ERROR 1. LIMPプルアップはまだ有効ですか?これは正常ですか? はい、正常です。 2:LIMPが低いときに、故障エラーカウンタの値を読み取ります。 SPI経由で読み戻すと、この値は少し奇妙で、0になります。FS_I_FSSM_CFGレジスタは0x8000です。 Re: F2400 LIMP0 ERROR 1. LIMPプルアップはまだ可能ですか?これは正常ですか? 2:LIMPが低いときに、故障エラーカウンタの値を読み取ります。 Re: F2400 LIMP0 ERROR はい Re: F2400 LIMP0 ERROR こんにちは、ピンクマン FS2400のことでしょうか?
View full article
Zephyr RTOSの入口からの新しい設定が見つかりませんMXRT1185 こんにちは、NXPさん。 I.MXRT1185タイプNo.が見つかりません。ZephyrのRTOS入口から。 Zephyrを実行しているi.MXRT1185の設定が可能かどうか確認してリリースしてもらえますか? どうもありがとうございました。 MCUXpresso 設定ツール v26.09 Re: New config from Zephyr RTOS entrance can't find i.MXRT1185 こんにちは、 @jimmyli さん。 ご辛抱いただきありがとうございます。 関係チームに確認したところ、RT1185 i.MX 現在はサポートされていないことが確認できました。この問題は関係チームに提起し、さらなる検討を依頼しました。 この件をご指摘いただき、また貴重なご意見をいただき、ありがとうございます。 よろしくお願いいたします。 メイ・リウ
View full article
FLS Driver Support for Micron MT35XU01GBBA on S32G399 Hi NXP Experts, I am an AUTOSAR software engineer working with the S32G399 platform. From my understanding, the MX25UW51245GXDR00 serial NOR Flash is mounted on the S32G-VNP-RDB3 board. The FLS driver examples provided in SW32G_RTD_4.4_5.0.0_QLP07 indicate support for the S32G-VNP-RDB3 board, so I assume the NXP FLS driver has been validated with the MX25UW51245GXDR00 device. I have recently received a customer board that uses a Micron MT35XU01GBBA serial NOR Flash instead. Could you please clarify whether the FLS driver included in SW32G_RTD_4.4_5.0.0_QLP07 supports the Micron MT35XU01GBBA device? If support is available, are there any specific configuration changes or limitations that I should be aware of when migrating from the MX25UW51245GXDR00 to the MT35XU01GBBA? Re: FLS Driver Support for Micron MT35XU01GBBA on S32G399 Thank you so much!!! Re: FLS Driver Support for Micron MT35XU01GBBA on S32G399 Hi, Thanks for sharing the details. I will review the relevant parameters and requirements to consider when migrating the QSPI Flash from the MX25UW51245GXDR00 to the Micron MT35XU01GBBA, including FLS driver support, required configuration changes, and any potential limitations. I will get back to you with more details once I complete the review. Best regards. Re: FLS Driver Support for Micron MT35XU01GBBA on S32G399 Thank you for your patience while I reviewed all the information. As you may already know the FLS configuration used by the S32G-VNP-RDB3 example is device-specific. And thus includes parameters such as the flash ID, memory geometry, page size, erase size, command LUTs, address cycles, dummy cycles, reset sequence, and the transition between SPI and OPI modes that need to be configured for each device. Therefore, the Macronix configuration cannot be reused for the Micron device. The main differences to consider are: Memory size: The Macronix device is 512 Mb, whereas the MT35XU01GBBA is a 1 Gb device implemented with two stacked 512 Mb dies. The FLS address range and memory size must therefore be updated accordingly. Interface and timing: The Micron device uses the 1.8 V Xccela interface and supports Octal SDR/DDR operation. It supports up to 166 MHz in SDR and up to 200 MHz in DDR with DQS. The controller mode, DDR/SDR setting, DQS sampling, DLL/timing parameters, and dummy cycles must be configured according to the Micron device and the board design. Command sequences: The read, program, erase, register-access, and mode-transition LUTs must be recreated for the Micron command set. For example, the Micron device uses Octal read/program commands and has separate 4-byte command variants; these are different from the Macronix command sequences. Addressing and geometry: The Micron device supports 3-byte and 4-byte addressing. In Octal DDR mode, 4-byte addressing is required. The Micron data sheet specifies a 256-byte program page, 128-KB uniform sector erase, and 4-KB/32-KB subsector erase options. These values must be reflected in the FLS memory and sector configuration. Device identification: The expected JEDEC identification is different. The Micron data sheet specifies manufacturer ID 0x2C, memory type 0x5B for the 1.8 V device, and capacity code 0x1B for 1 Gb. The FLS read-ID sequence and expected device ID must be updated; the exact extended ID should also be verified against the full ordering code on the customer board. Programming limitation in Octal DDR: The Micron data sheet specifies even bus-transition requirements for Octal DDR programming. Odd start or end addresses may require alignment or 0xFF padding, so page-program handling should be verified carefully. Reset and startup state: The Micron reset sequence and the device's volatile/nonvolatile configuration registers must be checked. The controller and memory must start in the same protocol and timing mode after reset. If XIP or DDR boot is used, the boot configuration must also match the exact Micron ordering option. It is worth mentioning that I have checked internally and the MT35XU01GBBA has been used successfully in the past, however, the integration was done on the Linux side, thus I can assure the hardware peripheral supports the memory, however, I will need to check if there is any particular concern on the FLS driver. I have escalated this question to the internal team, I will share their feedback as soon as I receive it. For reference: AN13563: S32G QuadSPI Deep Dive: AN13563: S32G QuadSPI Deep Dive – Application note S32G QSPI NOR customization guide: S32G QSPI Nor customization doc UBOOT/Linux BSP support for 1Gbit Micron MT35XU01GBBA: https://community.nxp.com/t5/S32G-Internal-Community/gh-p/52149 Best regards,  Aldo. Re: FLS Driver Support for Micron MT35XU01GBBA on S32G399 Your information is very helpful. Thank you for your support. Could you please provide a configuration example for MT35XU01GBBA? I would like to use it as a reference when configuring the Fls module in my EB tresos project. Additionally, I am unable to access the following link: UBOOT/Linux BSP support for 1Gbit Micron MT35XU01GBBA: https://community.nxp.com/t5/S32G-Internal-Community/gh-p/52149 Could you please share the relevant information or provide an alternative link Re: FLS Driver Support for Micron MT35XU01GBBA on S32G399 Hi Quang, Unfortunately, we do not have a configuration example for enabling the MT35XU01GBBA memory in the FLS module through EB tresos for an AUTOSAR project. We confirmed that this device has not been tested, and the available RTD FIs demo only provides the configuration for the MX25UW51245G on the RDB board. For clarity, the internal U-Boot/Linux discussion was focused on evaluating general BSP support for the same flash device and investigating a flash-probing issue, including the JEDEC ID read at 200 MHz. It was not a reference implementation or configuration for the AUTOSAR FLS module in EB tresos. Therefore, we are unable to provide a reference example for the MT35XU01GBBA at this time. Nevertheless, we encourage you to proceed with your development and integration based on the available device documentation and your current setup. If you encounter any specific error or unexpected behavior during the implementation, please share the details and relevant logs or configuration information. We will be happy to help analyze the issue. If you need further assistance, please open a private support ticket so we can provide more focused support. We apologize for the inconvenience and appreciate your understanding. Best regards, Aldo Re: FLS Driver Support for Micron MT35XU01GBBA on S32G399 Hi Aldo_Bucio, in section 6.2. The FLS example from RTD 2.0.0 of "AN13563: S32G QuadSPI Deep Dive", i see that BootROM also contribute in initialize external flash, but i see that later application will reinit flash again. My question is without BootROM, can external flash is initialized successfully? I don't really understand the role of BootROM here. If my application runs directly at the start (not booting from external flash needed because i load the application to RAM and run it), application can still run independently for initializing and using external flash for storing Data, right? Re: FLS Driver Support for Micron MT35XU01GBBA on S32G399 Hi, Thank you for your patience while I reviewed this point. As a follow-up, the key distinction is that the BootROM configuration and the FLS driver configuration apply to different stages: • BootROM is the first software executed. It then transfers control to HSE firmware for secure boot or to the customer application for non-secure boot. (AN13456 — S32G3 Boot Process, Section 6, page 10) • QSPI reconfiguration parameters are not mandatory for QSPI boot. BootROM can boot without them at a lower interface speed, provided that the flash meets the boot requirements. These parameters optimize communication during boot; the optional item is the reconfiguration, not BootROM itself. (AN13456, Section 9, page 15) • The RTD 2.0.0 FLS example resets the external flash to SPI mode and then configures both the flash and the QuadSPI controller for OPI operation. (AN13563 — S32G QuadSPI Deep Dive, Section 6.2, page 30) Therefore, BootROM uses its configuration to access the boot image, whereas the FLS driver requires its own configuration to operate the flash from the application. BootROM compatibility alone does not establish FLS driver support for the Micron MT35XU01GBBA. In addition, the example in AN13563 uses the Macronix MX25UW51245G, so its configuration should not be assumed to apply directly to the Micron device. I remain available to continue supporting this investigation and to review any additional details. Best regards, Aldo References:  AN13456: S32G3 Boot Process Application Note AN13563: S32G QuadSPI Deep Dive – Application note
View full article
F2400 LIMP0 ERROR We found that during frequent power-on/off cycling of the 30 power supply, the LIMP0 pin is pulled low. We have not yet identified the root cause. Please help analyze this. Through software debugging, we found that the following registers are set when the fault is reported: FS_CRC bit12 INIT_CRC_NOK_I FS_SAFETY_OUTPUTS bit3 LIMP0_DRV M_WU1_FLG bit9 FS_EVT M_GEN_FLAG bit6 WD_G In addition, after the LIMP0 pin is pulled low, the transceiver remains in normal mode and CAN message transmission/reception is normal. In software, we configured the watchdog period as INFINITE, but when the fault occurs, the register still shows 256 ms. Re: F2400 LIMP0 ERROR 1: The default value of the fault error counter is 1. Did you read it correctly? The value of FS_I_FSSM_CFG[3:0] 2: I've listed all the factors that affect LIMP below: Let's use the most basic method to eliminate them one by one. Re: F2400 LIMP0 ERROR 1. Is the LIMP pull-up still active? Is this normal? Yes, it's normal. 2: Read the value of the Fault Error Counter when LIMP is low. This value is a bit strange when read back via SPI; it's 0. The FS_I_FSSM_CFG register is 0x8000. Re: F2400 LIMP0 ERROR 1. Is the LIMP pull-up still active? Is this normal? 2: Read the value of the Fault Error Counter when LIMP is low. Re: F2400 LIMP0 ERROR Yes Re: F2400 LIMP0 ERROR Hi PINKMAN Are you referring to the FS2400?
View full article
New config from Zephyr RTOS entrance can't find i.MXRT1185 Hi NXP,       I can't find i.MXRT1185 type No. from Zephyr RTOS entrance.       Can you help to check and release that we can config for i.MXRT1185 running Zephyr ?        Thanks very much. MCUXpresso Config Tool v26.09 Re: New config from Zephyr RTOS entrance can't find i.MXRT1185 Hi @jimmyli , Thank you for your patience. After checking with the relevant teams, I can confirm that i.MX RT1185 is currently not supported. We have raised this topic with the relevant teams for further consideration. Thank you for bringing this to our attention and for your valuable feedback. Best Regards May Liu
View full article
i.MX 93のEdgeLock® Secure Enclave(ELE)の使用方法 : PKCS#11経由での暗号鍵の保存と使用 (日本語ブログ) 本記事では、i.MX 93内蔵のEdgeLock® Secure Enclave(ELE)の暗号アクセラレータおよび鍵管理の機能をPKCS#11経由で使用する方法について解説いたします。 PKCS#11は暗号処理において広く使用されているAPIであり、同じく広く使用されているライブラリであるOpenSSLとの統合も可能です。そのためPKCS#11やOpenSSLを使用した認証処理を行うアプリケーション全て(例: Eclipse Mosquitto™ etc.)に対して、アプリケーション側の改造無しで保護機能の適用も可能です。 暗号アクセラレータおよび鍵管理の機能を提供するという点は別記事で紹介しているSE050などのセキュアエレメントとも共通します。 暗号アクセラレータおよび鍵管理の概要、セキュアエレメントとの大まかな比較や使い分けは以下の記事も参照ください。 半導体ハードウェア・セキュリティでよく耳にする機能について解説 (セキュアエレメント、セキュアエンクレーブ、TPM、HSM、TEE、TrustZoneなど) (日本語ブログ) 作業時間: 約55分 (yoctoのビルド除く) pkcs11-tool経由でのELEの使用 : 10分 openssl経由でのELEの使用 : 10分 PKCS#11 URI PEMファイルの作成 : 5分 Azure IoT Hubへのクラウド接続 : 30分 目次 1 動作確認に使用した環境 2 用語 2.1 EdgeLock® Secure Enclave(ELE) 2.2 i.MX Security Middleware(SMW) 2.3 PKCS#11 3 ハンズオン 3.1 pkcs11-tool経由でのELEの使用 3.2 openssl経由でのELEの使用 3.3 PKCS#11 URI PEMファイルの作成 3.4 ELE内の鍵を使用したEclipse Mosquitto™ client経由でのAzure IoT Hubへのクラウド接続 1 動作確認に使用した環境 ハードウェア: FRDM i.MX 93開発ボード (FRDM-IMX93) MicroSDカード32GB (SDカードにイメージを書き込んで使用する場合。16GBでも動作すると思われます) ソフトウェア: Linux BSP Version L6.18.2-1.0.0 ※FRDM-IMX93のwebページにあるビルド済みイメージでは正常に動作しないため、以下を参考にビルドください。 [入門] Yocto Linux BSPのビルド方法 - i.MX FRDMボード編 (日本語ブログ)   私がビルドした際はrepo initおよびimx-setup-release.sh実行時のコマンドに以下を使用しました。 repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-whinlatter -m imx-6.18.2-1.0.0.xml DISTRO=fsl-imx-wayland MACHINE=imx93-11x11-lpddr4x-frdm source imx-setup-release.sh -b ./build   2 用語 2.1 EdgeLock® Secure Enclave(ELE)   i.MX 93における「EdgeLock® Secure Enclave(ELE)」は、NXPが提供する暗号アクセラレータ、鍵管理、SoC全体の監視やアクセス権限管理など多数の高度なセキュリティ機能を統合したセキュリティブロックです。   SoC全体の監視やアクセス権限管理という点では代表的な機能としてセキュアブートがあります。i.MX 93のセキュアブートおよびその使用方法に関しては以下の記事を参照ください。 i.MX 93プロセッサ: セキュアブートの署名と認証の仕組みを解説 (日本語ブログ) i.MX 93プロセッサ: セキュアブートの実装方法 - 実践編   本記事では暗号アクセラレータおよび鍵管理の機能をPKCS#11経由で使用する方法について解説いたします。     2.2 i.MX Security Middleware(SMW)   NXPはi.MXプロセッサ内蔵のセキュリティハードウェアを制御するためのソフトウェアとしてi.MX SMW(Security Middleware)を提供しています。 GitHub - nxp-imx/imx-smw: i.MX Security Middleware Library · GitHub   SMWはハードウェアに依存しないAPIを提供します。これには後述するPKCS#11のAPIも含みます。 i.MX 93ではELEが内蔵されているため、実際にELEを制御する部分はimx-secure-enclaveが使用されます。 GitHub - nxp-imx/imx-secure-enclave: Secure Enclave Userspace Library · GitHub     2.3 PKCS#11 PKCS#11(Public-Key Cryptography Standards #11)は、暗号処理を行うハードウェアやソフトウェア(例:HSM、スマートカード、USBトークンなど)をアプリケーションから統一的に利用するためのAPI仕様です。別名「Cryptoki(クリプトキー)」とも呼ばれます。 PKCS#11を使用するアプリケーションとして、今回はpkcs11-toolを使用します。 imx-smwを含めた関係を図示すると以下のようになります。 PKCS#11を使用するアプリケーション(pkcs11-tool etc.) ↓ (PKCS#11 API経由での使用) imx-smw ↓ imx-secure-enclave ↓ EdgeLock Secure Enclave Hardware     また、以前のOpenSSL経由でのSE050の使用方法の記事では、Plug and Trust Middlewareに含まれるopenssl providerを使用してopenssl経由での使用方法を解説しました。 SMWはopenssl providerを提供しませんが、pkcs11-providerを使用することでopensslからPKCS#11のインターフェースを使用可能なため、openssl経由でのELEの使用も可能です。 GitHub - openssl-projects/pkcs11-provider: A pkcs#11 provider for OpenSSL 3.0+ · GitHub OpenSSL provider非使用時と、imx-smw + PKCSを使用する場合の関係を図示すると以下のようになります。 Provider非使用時はkeyがファイルとしてファイルシステム上に存在し、暗号処理もソフトウェアにより行われます。 imx-smwおよびpkcs11-provider使用時はkeyおよび暗号処理はELEハードウェアにより保護されます。使用するkeyはコード上またはファイルシステム上にあるPKCS#11 URIにより指定します。 ※URI(uri)とは?:   ハードウェア・セキュリティ・モジュール(HSM)などに安全に保管された秘密鍵や証明書を、ローカルファイルのパスの代わりに指定するための標準化された識別子(URI)です。   note : Plug and Trust MiddlewareもPKCS#11のAPIを提供しています。   3 ハンズオン 3.1 pkcs11-tool経由でのELEの使用   使用方法はSMW内のPKCS11-Tool User Guideに記載がありますが、ECDSA署名および検証に絞って一連の流れを説明します。   まず以下コマンドを実行してnvm_daemonを起動します。 nvm_daemonはELEを使用するためにファイルシステム領域を管理するサービスです。 systemctl start nvm_daemon systemctl status nvm_daemon   以下コマンドを実行することで次回起動時に自動で起動するようにもできます。 systemctl enable nvm_daemon   以降のコマンドを簡略化するため、以下コマンドでlibsmw_pkcs11の場所を指定します。 末尾の番号はsmwのバージョンによって変わる可能性があるためインストール済みのものに合わせてください。 export MODULE_PKCS11=/usr/lib/libsmw_pkcs11.so.5   以下コマンドでlibsmw_pkcs11経由で確認可能なトークンを確認します。 pkcs11-tool --module $MODULE_PKCS11 -L   以下の例のような表示がされれば問題なく動作しています。 Available slots: Slot 0 (0x0): Security Middleware Abstraction token label : smw token manufacturer : NXP Semiconductor token model : token flags : login required, PIN pad present, token initialized hardware version : 0.0 firmware version : 0.0 serial num : pin min/max : 0/0 uri : pkcs11:model=;manufacturer=NXP%20Semiconductor;serial=;token=smw   以下コマンドで利用可能なオブジェクトの一覧を表示します。 最初は何も表示されないはずです。 pkcs11-tool --module $MODULE_PKCS11 --login -O   以下コマンドでECC key pairを生成します。 pkcs11-tool --module $MODULE_PKCS11 \ --login \ --keypairgen \ --key-type EC:prime256v1 \ --id 02 \ --label "MyECCKey" \ --usage-sign \ --allowed-mechanisms "ECDSA-SHA256"   再度オブジェクト一覧を表示すると以下のようにECC key pairが見えるはずです。 Using slot 0 with a present token (0x0) Profile object 250360144 profile_id: CKP_BASELINE_PROVIDER (1) Public Key Object; EC EC_POINT 256 bits EC_POINT: 044104fe4c97a7a4f54702f9fc5740f62c0864e851098dc43cb4c9ba8633421e5bc362cdc559523118bb4fe4281851c051e24a88846a2d774eb3f928595761cf719e90 EC_PARAMS: 06082a8648ce3d030107 (OID 1.2.840.10045.3.1.7) label: MyECCKey ID: 02 Usage: verify Access: none Unique ID: uri: pkcs11:model=;manufacturer=NXP%20Semiconductor;serial=;token=smw;id=%02;object=MyECCKey;type=public Private Key Object; EC label: MyECCKey ID: 02 Usage: sign Access: sensitive, always sensitive Unique ID: uri: pkcs11:model=;manufacturer=NXP%20Semiconductor;serial=;token=smw;id=%02;object=MyECCKey;type=private   以下コマンドで適当なmessage.txtファイルを生成、それに対して署名の生成及び検証を行うことができます。 echo hello > message.txt pkcs11-tool --module $MODULE_PKCS11 \ --login \ --sign \ --id 02 \ --mechanism ECDSA-SHA256 \ --input-file message.txt \ --output-file signature.bin pkcs11-tool --module $MODULE_PKCS11 \ --login \ --verify \ --id 02 \ --mechanism ECDSA-SHA256 \ --input-file message.txt \ --signature-file signature.bin     3.2 openssl経由でのELEの使用   同様にECDSA署名および検証に絞って一連の流れを説明します。 前章のpkcs11-tool用の手順によってnvm_daemonの起動及びECC key pairの生成が完了している前提です。   以下の内容のopenssl.cnfを作成します。 末尾のmoduleおよびpkcs11-module-pathの行は、実際のシステムに合わせて変更が必要な可能性があります。 openssl_conf = openssl_init [openssl_init] providers = provider_sect [provider_sect] default = default_sect pkcs11 = pkcs11_sect [default_sect] activate = 1 [pkcs11_sect] module = /usr/lib/ossl-modules/pkcs11.so pkcs11-module-path = /usr/lib/libsmw_pkcs11.so.5 activate = 1   以下コマンドで上記設定ファイルをopensslで使用するよう設定します。 export OPENSSL_CONF=<作成したopenssl.cnfの絶対path>   以下コマンドで署名生成及び検証が可能です。 openssl pkeyutl -sign -inkey "pkcs11:object=MyECCKey;type=private" -in message.txt -out sig.bin -digest sha256 openssl pkeyutl -verify -pubin -inkey "pkcs11:object=MyECCKey;type=public" -in message.txt -sigfile sig.bin -digest sha256     3.3 PKCS#11 URI PEMファイルの作成   openssl providerの使用方法では、keyに直接オブジェクト一覧で確認可能なURIを使用しました。   しかしpkcs11-providerのドキュメントの "USE IN OLDER APPLICATIONS (URIs in PEM files)" には、これは新しい方法であり、従来のアプリケーションを使用する場合はこの方法が使用できない場合がある旨記載があります。   実際後述のMosquitto clientでは、openssl 3.0以降を使用する場合、URIを直接指定できないコードとなっていました。   このような場合、CLI tool uri2pem.pyを使用することでURIを含むファイルを生成し、通常の鍵ファイルを指定するのと同じ方法で使用することが可能です。   上記ページからダウンロードしたuri2pem.pyを使用し、以下コマンドでPKCS#11 URIを含むファイルを生成します。 python3 uri2pem.py --out MyECCKey.pem "pkcs11:object=MyECCKey;type=private" 詳細は確認できておりませんが、uri2pem.pyの内容を確認する限りprivate key以外のURIのpemファイルは作成できないようです。 生成された「MyECCKey.pem」を署名時のkeyとして指定することで先ほどと同様の動作が可能です。 openssl pkeyutl -sign -inkey MyECCKey.pem -in message.txt -out sig.bin -digest sha256 openssl pkeyutl -verify -pubin -inkey "pkcs11:object=MyECCKey;type=public" -in message.txt -sigfile sig.bin -digest sha256     3.4 ELE内の鍵を使用したEclipse Mosquitto™ client経由でのAzure IoT Hubへのクラウド接続   生成した鍵を使用してMosquitto clientを使用したAzure IoT Hubへのクラウド接続を試みます。   注: この手順で作成するRootCA証明書はあくまでテスト用です。テスト完了後はAzure IoT Hub上から証明書を削除することを推奨します。   事前に セキュアエレメントSE05xの使用方法 : FRDM-IMX93開発ボード上でのPlug and Trust Middlewareのセットアップ(日本語ブログ) の「Mosquitto clientのビルドとインストール」の章   セキュアエレメントSE05xの使用方法 : Eclipse Mosquitto clientを使用したAzure IoT Hubへの接続(日本語ブログ) の「Azure IoT Hubの作成」の章、   それぞれの手順を行い、Mosquitto clientのインストールおよびAzure IoT Hubの作成を完了させてください。     まずFRDM-IMX93側で以下コマンドを実行しMyECCKeyのpublic keyに対する証明書リクエストを作成、内容を確認します。 openssl req -new -key "pkcs11:object=MyECCKey" -outform PEM -subj /CN=frdmimx93_test -out frdmimx93_test.csr -sha256 openssl req -text -noout -in frdmimx93_test.csr   その後ホストPC側に「frdmimx93_test.csr」を移動し、以下を実行します。 openssl ecparam -genkey -name prime256v1 -out rootCA_key_pair.pem openssl req -new -x509 -subj /CN=rootCA -key rootCA_key_pair.pem > rootCA_cert.cer openssl x509 -req -in frdmimx93_test.csr -days 365 -CA rootCA_cert.cer -CAkey rootCA_key_pair.pem -out frdmimx93_test_cert.cer 作成した「frdmimx93_test_cert.cer」をFRDM-IMX93に戻します。後ほど「MyECCKey.pem」とセットで使用するため、そちらを作成したディレクトリに置きます。 また、Azure IoT Hubにて、作成した「rootCA_cert.cer」の登録、「frdmimx93_test」という名前のデバイスの作成を行います。 手順は以下記事の「Azure IoT Hubへの中間CA証明書の追加」の章を参照ください。 セキュアエレメントSE05xの使用方法 : Eclipse Mosquitto clientを使用したAzure IoT Hubへの接続(日本語ブログ) 注 : 前述のとおりここで登録した証明書はテスト用のため、動作確認後は削除を推奨します。   ここまでの手順を終えるとMosquitto clientを使用してAzure IoT Hubへの接続が可能になります。   以下コマンドを実行します。IOT_HUB_NAMEは適宜変更ください。 export IOT_HUB_NAME=ShinjiIotHubTest export DEVICE_NAME=frdmimx93_test mosquitto_pub -h "${IOT_HUB_NAME}.azure-devices.net" -p 8883 -u "${IOT_HUB_NAME}.azure-devices.net/${DEVICE_NAME}/api-version=2016-11-14" -t "devices/${DEVICE_NAME}/messages/events/" -m '{"mes":"Hello Azure with i.MX93!"}' --capath /etc/ssl/certs/ --cert frdmimx93_test_cert.cer --key MyECCKey.pem -i ${DEVICE_NAME} -d -q 1 以下のような出力が出れば成功です。 Client frdmimx93_test sending CONNECT Client frdmimx93_test received CONNACK (0) Client frdmimx93_test sending PUBLISH (d0, q1, r0, m1, 'devices/frdmimx93_test/messages/events/', ... (34 bytes)) Client frdmimx93_test received PUBACK (Mid: 1, RC:0) Client frdmimx93_test sending DISCONNECT 以下記事の「IoT Hubへ送信されたメッセージの確認とデバイスへのメッセージ送信」の手順を使用するとAzure IoT Hub側のCloud Shellでも受信メッセージを確認できます。 セキュアエレメントSE05xの使用方法 : Eclipse Mosquitto clientを使用したAzure IoT Hubへの接続(日本語ブログ)  ========================= 本投稿の「Comment」欄にコメントをいただいても、現在返信に対応しておりません。​ お手数をおかけしますが、お問い合わせの際には「NXPへの技術質問 - 問い合わせ方法 (日本語ブログ)」をご参照ください。​ (既に弊社NXP代理店、もしくはNXPとお付き合いのある方は、直接担当者へご質問いただいてもかまいません。) 本記事では、i.MX 93内蔵のEdgeLock® Secure Enclave(ELE)の暗号アクセラレータおよび鍵管理の機能をPKCS#11経由で使用する方法について解説いたします。 PKCS#11は暗号処理において広く使用されているAPIであり、同じく広く使用されているライブラリであるOpenSSLとの統合も可能です。そのためPKCS#11やOpenSSLを使用した認証処理を行うアプリケーション全て(例: Eclipse Mosquitto™ etc.)に対して、アプリケーション側の改造無しで保護機能の適用も可能です。 暗号アクセラレータおよび鍵管理の機能を提供するという点は別記事で紹介しているSE050などのセキュアエレメントとも共通します。 暗号アクセラレータおよび鍵管理の概要、セキュアエレメントとの大まかな比較や使い分けは以下の記事も参照ください。 半導体ハードウェア・セキュリティでよく耳にする機能について解説 (セキュアエレメント、セキュアエンクレーブ、TPM、HSM、TEE、TrustZoneなど) (日本語ブログ) 作業時間: 約55分 (yoctoのビルド除く) pkcs11-tool経由でのELEの使用 : 10分 openssl経由でのELEの使用 : 10分 PKCS#11 URI PEMファイルの作成 : 5分 Azure IoT Hubへのクラウド接続 : 30分   i.MX Processors Security 日本語ブログ
View full article
如何在 i.MX 93 上使用 EdgeLock® 安全隔离区 (ELE):通过 PKCS#11 存储和使用加密密钥(日语博客) 本文解释了如何通过 PKCS#11 使用i.MX 93 内置的EdgeLock ®安全隔离区 (ELE) 的加密加速器和密钥管理功能。 PKCS#11 是密码学中广泛使用的 API,并且可以与另一个广泛使用的库 OpenSSL 集成。因此™所有使用 PKCS#11 或 OpenSSL 进行身份验证的应用程序(例如 Eclipse Mosquitto 1 等)都可以应用保护,而无需对应用程序本身进行任何修改。 它提供加密加速和密钥管理功能,这一点与SE050等安全元件相同,SE050 将在另一篇文章中介绍。 有关加密加速器和密钥管理的概述,以及与安全元件的一般比较和使用指南,请参阅以下文章。 本文解释了半导体硬件安全中常见的特性(安全元件、安全隔离区、TPM、HSM、TEE、TrustZone 等)(日语博客)。 预计时间:约 55 分钟(不包括 Yocto 构建时间) 使用 pkcs11 工具通过 ELE 进行操作:10 分钟 使用 OpenSSL 通过 ELE 运行:10 分钟 创建 PKCS#11 URI PEM 文件:5 分钟 与 Azure IoT 中心的云连接:30 分钟 目录 1. 用于运行验证的环境 2. 术语 2.1 EdgeLock® 安全区域 (ELE) 2.2 i.MX 安全中间件 (SMW) 2.3 PKCS#11 3. 实践操作 3.1 通过 pkcs11 工具使用 ELE 3.2 通过 openssl 使用 ELE 3.3 创建 PKCS#11 URI PEM 文件 3.4 通过 Eclipse Mosquitto™ 客户端使用 ELE 中的密钥连接到 Azure IoT 中心云 1. 用于运行验证的环境 硬件: FRDM i.MX 93 开发板 ( FRDM-IMX93 ) 32GB microSD 卡(如果您要将镜像写入 SD 卡并使用它。据说 16GB 的卡也可以。) 软件: Linux BSP 版本 L6.18.2-1.0.0 *FRDM-IMX93 网页上的预构建镜像无法正常工作,请按照以下说明进行构建。 【新手指南】如何构建 Yocto Linux BSP - i.MX FRDM 开发板版(日语博客)   构建时,我在运行 repo init 和 imx-setup-release.sh 时使用了以下命令: repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-whinlatter -m imx-6.18.2-1.0.0.xml DISTRO=fsl-imx-wayland MACHINE=imx93-11x11-lpddr4x-frdm source imx-setup-release.sh -b ./build   2. 术语 2.1 EdgeLock® 安全区域 (ELE)   在 i.MX 93 中,“EdgeLock® 安全隔离区 (ELE)”是一个安全模块,它集成了 NXP 提供的众多高级安全功能,包括加密加速器、密钥管理、整体 SoC 监控和访问权限管理。   安全启动是监控整个SoC并管理访问权限的一项代表性功能。有关i.MX 93中的安全启动及其使用方法,请参阅以下文章。 i.MX 93 处理器:安全启动签名和认证机制详解(日语博客) i.MX 93 处理器:如何实现安全启动 - 实用指南   本文解释了如何通过 PKCS#11 使用加密加速器和密钥管理功能。     2.2 i.MX 安全中间件 (SMW)   NXP 提供 i.MX SMW(安全中间件)软件,用于控制 i.MX 处理器内置的安全硬件。 GitHub - nxp-imx/imx-smw:i.MX 安全中间件库 · GitHub   SMW 提供与硬件无关的 API,包括 PKCS#11 API,稍后将对此进行讨论。 由于 i.MX 93 内置了 ELE,因此实际控制 ELE 的部分是 imx-secure-enclave。 GitHub - nxp-imx/imx-secure-enclave:安全隔离区用户空间库 · GitHub     2.3 PKCS#11 PKCS#11(公钥密码学标准#11)是一个API规范,用于在应用程序中统一使用加密硬件和软件(例如,HSM、智能卡、USB令牌等)。它也被称为“Cryptoki”。 在这个例子中,我们将使用 pkcs11-tool 作为使用 PKCS#11 的应用程序。 imx-smw之间的关系可以表示如下: PKCS#11を使用するアプリケーション(pkcs11-tool etc.) ↓ (PKCS#11 API経由での使用) imx-smw ↓ imx-secure-enclave ↓ EdgeLock Secure Enclave Hardware     此外,在之前一篇关于通过 OpenSSL 使用 SE050 的文章中,我们解释了如何使用 Plug and Trust Middleware 中包含的 openssl 提供程序通过 openssl 来使用它。 SMW 不提供 openssl 提供程序,但可以通过 openssl 使用 ELE,因为可以通过使用 pkcs11-provider 从 openssl 使用 PKCS#11 接口。 GitHub - openssl-projects/pkcs11-provider:适用于 OpenSSL 3.0+ 的 pkcs#11 提供程序 · GitHub 下面图示了不使用 OpenSSL 提供程序与使用 imx-smw + PKCS 之间的关系。 当不使用密钥提供商时,密钥以文件的形式存在于文件系统中,加密由软件执行。 使用 imx-smw 和 pkcs11-provider 时,密钥和加密过程由 ELE 硬件保护。要使用的密钥由代码或文件系统中的 PKCS#11 URI 指定。 什么是URI? 这是一个标准化的标识符(URI),用于指定安全地存储在硬件安全模块(HSM)或类似设备中的私钥和证书,而不是本地文件路径。   注意:Plug and Trust Middleware 还提供 PKCS#11 API。   3. 实践操作 3.1 通过 pkcs11 工具使用 ELE   使用说明在 SMW 中的PKCS11 工具用户指南中有描述,但本说明将特别关注 ECDSA 签名和验证过程。   首先,运行以下命令启动 nvm_daemon。 nvm_daemon 是一项管理文件系统空间以供 ELE 使用的服务。 systemctl start nvm_daemon systemctl status nvm_daemon   您还可以通过执行以下命令,将其配置为在下次启动时自动启动。 systemctl enable nvm_daemon   为了简化后续命令,请使用以下命令指定 libsmw_pkcs11 的位置。 末尾的数字可能因 SMW 版本而异,请根据您安装的版本进行调整。 export MODULE_PKCS11=/usr/lib/libsmw_pkcs11.so.5   以下命令将检查可通过 libsmw_pkcs11 验证的令牌。 pkcs11-tool --module $MODULE_PKCS11 -L   如果您看到与以下示例类似的显示,则说明它运行正常。 Available slots: Slot 0 (0x0): Security Middleware Abstraction token label : smw token manufacturer : NXP Semiconductor token model : token flags : login required, PIN pad present, token initialized hardware version : 0.0 firmware version : 0.0 serial num : pin min/max : 0/0 uri : pkcs11:model=;manufacturer=NXP%20Semiconductor;serial=;token=smw   以下命令将显示可用对象列表。 一开始不应该显示任何内容。 pkcs11-tool --module $MODULE_PKCS11 --login -O   以下命令将生成 ECC 密钥对。 pkcs11-tool --module $MODULE_PKCS11 \ --login \ --keypairgen \ --key-type EC:prime256v1 \ --id 02 \ --label "MyECCKey" \ --usage-sign \ --allowed-mechanisms "ECDSA-SHA256"   如果再次显示对象列表,您应该会看到如下所示的 ECC 密钥对。 Using slot 0 with a present token (0x0) Profile object 250360144 profile_id: CKP_BASELINE_PROVIDER (1) Public Key Object; EC EC_POINT 256 bits EC_POINT: 044104fe4c97a7a4f54702f9fc5740f62c0864e851098dc43cb4c9ba8633421e5bc362cdc559523118bb4fe4281851c051e24a88846a2d774eb3f928595761cf719e90 EC_PARAMS: 06082a8648ce3d030107 (OID 1.2.840.10045.3.1.7) label: MyECCKey ID: 02 Usage: verify Access: none Unique ID: uri: pkcs11:model=;manufacturer=NXP%20Semiconductor;serial=;token=smw;id=%02;object=MyECCKey;type=public Private Key Object; EC label: MyECCKey ID: 02 Usage: sign Access: sensitive, always sensitive Unique ID: uri: pkcs11:model=;manufacturer=NXP%20Semiconductor;serial=;token=smw;id=%02;object=MyECCKey;type=private   以下命令将生成一个合适的 message.txt 文件,然后您可以生成并验证该文件的签名。 echo hello > message.txt pkcs11-tool --module $MODULE_PKCS11 \ --login \ --sign \ --id 02 \ --mechanism ECDSA-SHA256 \ --input-file message.txt \ --output-file signature.bin pkcs11-tool --module $MODULE_PKCS11 \ --login \ --verify \ --id 02 \ --mechanism ECDSA-SHA256 \ --input-file message.txt \ --signature-file signature.bin     3.2 通过 openssl 使用 ELE   同样,我们将解释整个过程,重点关注 ECDSA 的签署和验证。 这假设您已经启动了 nvm_daemon 并使用上一章中描述的 pkcs11-tool 程序生成了 ECC 密钥对。   创建一个名为 openssl.cnf 的文件,内容如下: 末尾的 `module` 和 `pkcs11-module-path` 行可能需要根据您的实际系统进行更改。 openssl_conf = openssl_init [openssl_init] providers = provider_sect [provider_sect] default = default_sect pkcs11 = pkcs11_sect [default_sect] activate = 1 [pkcs11_sect] module = /usr/lib/ossl-modules/pkcs11.so pkcs11-module-path = /usr/lib/libsmw_pkcs11.so.5 activate = 1   使用以下命令配置 openssl 以使用上述配置文件。 export OPENSSL_CONF=<作成したopenssl.cnfの絶対path>   可以使用以下命令生成和验证签名。 openssl pkeyutl -sign -inkey "pkcs11:object=MyECCKey;type=private" -in message.txt -out sig.bin -digest sha256 openssl pkeyutl -verify -pubin -inkey "pkcs11:object=MyECCKey;type=public" -in message.txt -sigfile sig.bin -digest sha256     3.3 创建 PKCS#11 URI PEM 文件   在使用 openssl 提供程序时,我使用了一个可以直接在对象列表中验证的 URI 作为键。   然而, pkcs11-provider 文档在“在旧应用程序中使用(PEM 文件中的 URI)”部分指出,这是一种新方法,在使用旧应用程序时可能无法使用。   事实上,稍后将讨论的 Mosquitto 客户端的代码会阻止您在使用 openssl 3.0 或更高版本时直接指定 URI。   在这种情况下,您可以使用CLI 工具 uri2pem.py生成包含 URI 的文件,并以与指定常规密钥文件相同的方式使用它。   使用从上述页面下载的 uri2pem.py,通过以下命令生成包含 PKCS#11 URI 的文件。 python3 uri2pem.py --out MyECCKey.pem "pkcs11:object=MyECCKey;type=private" 虽然我还没有能够确认细节,但根据 uri2pem.py 的内容来看,似乎无法为私钥以外的 URI 创建 pem 文件。 通过指定生成的“MyECCKey.pem”作为签名密钥,您可以执行与以前相同的操作。 openssl pkeyutl -sign -inkey MyECCKey.pem -in message.txt -out sig.bin -digest sha256 openssl pkeyutl -verify -pubin -inkey "pkcs11:object=MyECCKey;type=public" -in message.txt -sigfile sig.bin -digest sha256     3.4 通过 Eclipse Mosquitto™ 客户端使用 ELE 中的密钥连接到 Azure IoT 中心云   我们将尝试使用生成的密钥通过 Mosquitto 客户端建立与 Azure IoT 中心的云连接。   注意:使用此过程创建的根 CA 证书仅用于测试目的。建议在测试完成后从 Azure IoT 中心删除该证书。   提前 如何使用安全元件 SE05x:在 FRDM-IMX93 开发板上设置即插即用中间件(日文博客) “构建和安装 Mosquitto 客户端”这一章节   如何使用安全元件 SE05x:使用 Eclipse Mosquitto 客户端连接到 Azure IoT 中心(日语博客) 在“创建 Azure IoT 中心”这一章中,   按照每个步骤完成 Mosquitto 客户端的安装和 Azure IoT 中心的创建。     首先,在 FRDM-IMX93 端,执行以下命令为 MyECCKey 的公钥创建证书请求并验证其内容。 openssl req -new -key "pkcs11:object=MyECCKey" -outform PEM -subj /CN=frdmimx93_test -out frdmimx93_test.csr -sha256 openssl req -text -noout -in frdmimx93_test.csr   接下来,将“frdmimx93_test.csr”移动到主机,并执行以下操作: openssl ecparam -genkey -name prime256v1 -out rootCA_key_pair.pem openssl req -new -x509 -subj /CN=rootCA -key rootCA_key_pair.pem > rootCA_cert.cer openssl x509 -req -in frdmimx93_test.csr -days 365 -CA rootCA_cert.cer -CAkey rootCA_key_pair.pem -out frdmimx93_test_cert.cer 将创建的“frdmimx93_test_cert.cer”放回FRDM-IMX93上。由于稍后将与“ MyECCKey.pem ”一起使用,请将其放在创建它的同一目录中。 此外,您还需要在 Azure IoT 中心注册创建的“rootCA_cert.cer”文件,并创建一个名为“frdmimx93_test”的设备。 有关说明,请参阅以下文章中的“向 Azure IoT 中心添加中间 CA 证书”部分。 如何使用安全元件 SE05x:使用 Eclipse Mosquitto 客户端连接到 Azure IoT 中心(日语博客) 注意:如上所述,此处注册的证书仅用于测试目的,因此建议在确认其功能后将其删除。   完成这些步骤后,您就可以使用 Mosquitto 客户端连接到 Azure IoT 中心了。   执行以下命令。请根据实际情况更改 IOT_HUB_NAME。 export IOT_HUB_NAME=ShinjiIotHubTest export DEVICE_NAME=frdmimx93_test mosquitto_pub -h "${IOT_HUB_NAME}.azure-devices.net" -p 8883 -u "${IOT_HUB_NAME}.azure-devices.net/${DEVICE_NAME}/api-version=2016-11-14" -t "devices/${DEVICE_NAME}/messages/events/" -m '{"mes":"Hello Azure with i.MX93!"}' --capath /etc/ssl/certs/ --cert frdmimx93_test_cert.cer --key MyECCKey.pem -i ${DEVICE_NAME} -d -q 1 如果看到类似以下的输出,则表示成功。 Client frdmimx93_test sending CONNECT Client frdmimx93_test received CONNACK (0) Client frdmimx93_test sending PUBLISH (d0, q1, r0, m1, 'devices/frdmimx93_test/messages/events/', ... (34 bytes)) Client frdmimx93_test received PUBACK (Mid: 1, RC:0) Client frdmimx93_test sending DISCONNECT 按照以下文章“检查发送到 IoT 中心的消息和向设备发送消息”中的步骤,您还可以在 Azure IoT 中心端的 Cloud Shell 中检查接收到的消息。 如何使用安全元件 SE05x:使用 Eclipse Mosquitto 客户端连接到 Azure IoT 中心(日语博客) ========================= 我们目前无法 回复 此帖子“ 评论”部分留下的评论。 对于由此造成的不便,我们深表歉意,但 在进行咨询时, 请 参考“ NXP 技术问题 - 如何联系我们 ( 日语博客 ) ” 。 (如果您已经是 恩智浦的 分销商或 与 恩智浦 有合作关系 ,您可以直接咨询您的代表。) 本文解释了如何通过 PKCS#11 使用 i.MX 93 内置 EdgeLock® 安全隔离区 (ELE) 的加密加速器和密钥管理功能。 PKCS#11 是密码学中广泛使用的 API,并且可以与另一个广泛使用的库 OpenSSL 集成。因此,所有使用 PKCS#11 或 OpenSSL 进行身份验证的应用程序(例如 Eclipse Mosquitto ™等)都可以应用保护,而无需对应用程序本身进行任何修改。 它提供加密加速和密钥管理功能,这一点与 SE050 等安全元件相同,SE050 将在另一篇文章中介绍。 有关加密加速器和密钥管理的概述,以及与安全元件的一般比较和使用指南,请参阅以下文章。 本文解释了半导体硬件安全中常见的特性(安全元件、安全隔离区、TPM、HSM、TEE、TrustZone 等)(日语博客)。 预计时间:约 55 分钟(不包括 Yocto 构建时间) 使用 pkcs11 工具通过 ELE 进行操作:10 分钟 使用 OpenSSL 通过 ELE 运行:10 分钟 创建 PKCS#11 URI PEM 文件:5 分钟 与 Azure IoT 中心的云连接:30 分钟   i.MX 处理器 安全 日本博客
View full article
How to use the EdgeLock® Secure Enclave (ELE) on i.MX 93: Storing and using encryption keys via PKCS#11 (Japanese blog) This article explains how to use the cryptographic accelerator and key management functions of the i.MX 93's built-in EdgeLock ® Secure Enclave (ELE) via PKCS#11. PKCS#11 is a widely used API in cryptography and can be integrated with OpenSSL, another widely used library. Therefore ™ protection can be applied to all applications that perform authentication using PKCS#11 or OpenSSL (e.g., Eclipse Mosquitto 1, etc.) without any modifications to the application itself . The fact that it provides cryptographic acceleration and key management functions is something it shares with secure elements such as the SE050 , which are introduced in another article. For an overview of cryptographic accelerators and key management, as well as a general comparison and usage guidelines with secure elements, please refer to the following article. This article explains commonly heard features in semiconductor hardware security (Secure Element, Secure Enclave, TPM, HSM, TEE, TrustZone, etc.) (Japanese blog). Estimated time: Approximately 55 minutes (excluding Yocto build) Using ELE via pkcs11-tool: 10 minutes Using ELE via openssl: 10 minutes Creating a PKCS#11 URI PEM file: 5 minutes Cloud connectivity to Azure IoT Hub: 30 minutes table of contents 1. Environment used for operational verification 2. Terminology 2.1 EdgeLock® Secure Enclave (ELE) 2.2 i.MX Security Middleware (SMW) 2.3 PKCS#11 3. Hands-on 3.1 Using ELE via pkcs11-tool 3.2 Using ELE via openssl 3.3 Creating a PKCS#11 URI PEM file 3.4 Cloud connectivity to Azure IoT Hub via Eclipse Mosquitto™ client using keys within ELE 1. Environment used for operational verification Hardware: FRDM i.MX 93 Development Board ( FRDM-IMX93 ) 32GB microSD card (If you are writing an image to an SD card and using it. It is also thought that 16GB will work.) software: Linux BSP Version L6.18.2-1.0.0 *The pre-built image on the FRDM-IMX93 webpage does not work correctly, so please build it using the following instructions. [Beginner's Guide] How to Build Yocto Linux BSP - i.MX FRDM Board Edition (Japanese Blog)   When I built it, I used the following commands when running repo init and imx-setup-release.sh: repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-whinlatter -m imx-6.18.2-1.0.0.xml DISTRO=fsl-imx-wayland MACHINE=imx93-11x11-lpddr4x-frdm source imx-setup-release.sh -b ./build   2. Terminology 2.1 EdgeLock® Secure Enclave (ELE)   In i.MX 93, "EdgeLock® Secure Enclave (ELE)" is a security block that integrates numerous advanced security features provided by NXP, including cryptographic accelerators, key management, overall SoC monitoring, and access rights management.   Secure Boot is a representative feature for monitoring the entire SoC and managing access rights. For information on Secure Boot in i.MX 93 and how to use it, please refer to the following article. i.MX 93 Processor: Explaining the Secure Boot Signature and Authentication Mechanism (Japanese Blog) i.MX 93 Processor: How to Implement Secure Boot - Practical Guide   This article explains how to use cryptographic accelerator and key management functions via PKCS#11.     2.2 i.MX Security Middleware (SMW)   NXP provides i.MX SMW (Security Middleware) as software for controlling the security hardware built into the i.MX processor. GitHub - nxp-imx/imx-smw: i.MX Security Middleware Library · GitHub   SMW provides hardware-independent APIs, including the PKCS#11 API, which will be discussed later. Since i.MX 93 has a built-in ELE, the part that actually controls the ELE is imx-secure-enclave. GitHub - nxp-imx/imx-secure-enclave: Secure Enclave Userspace Library · GitHub     2.3 PKCS#11 PKCS#11 (Public-Key Cryptography Standards #11) is an API specification for unified use of cryptographic hardware and software (e.g., HSMs, smart cards, USB tokens, etc.) from applications. It is also known as "Cryptoki". For this example, we will use pkcs11-tool as the application that uses PKCS#11. The relationship including imx-smw can be illustrated as follows: PKCS#11を使用するアプリケーション(pkcs11-tool etc.) ↓ (PKCS#11 API経由での使用) imx-smw ↓ imx-secure-enclave ↓ EdgeLock Secure Enclave Hardware     Furthermore, in a previous article on using SE050 via OpenSSL , we explained how to use it via openssl using the openssl provider included in Plug and Trust Middleware. SMW does not provide an openssl provider, but it is possible to use ELE via openssl because the PKCS#11 interface can be used from openssl by using the pkcs11-provider. GitHub - openssl-projects/pkcs11-provider: A pkcs#11 provider for OpenSSL 3.0+ · GitHub The relationship between not using an OpenSSL provider and using imx-smw + PKCS is illustrated below. When a provider is not used, the key exists as a file on the file system, and encryption is performed by software. When using imx-smw and pkcs11-provider, the key and encryption process are protected by ELE hardware. The key to be used is specified by a PKCS#11 URI located in the code or on the file system. *What is a URI? This is a standardized identifier (URI) used to specify private keys and certificates securely stored in hardware security modules (HSMs) or similar devices, instead of local file paths.   Note: Plug and Trust Middleware also provides a PKCS#11 API.   3. Hands-on 3.1 Using ELE via pkcs11-tool   The usage instructions are described in the PKCS11-Tool User Guide within SMW, but this explanation will focus specifically on the ECDSA signing and verification process.   First, run the following command to start nvm_daemon. nvm_daemon is a service that manages filesystem space for use with ELE. systemctl start nvm_daemon systemctl status nvm_daemon   You can also configure it to start automatically the next time you boot by executing the following command. systemctl enable nvm_daemon   To simplify subsequent commands, specify the location of libsmw_pkcs11 with the following command. The number at the end may vary depending on the SMW version, so please adjust it to match your installed version. export MODULE_PKCS11=/usr/lib/libsmw_pkcs11.so.5   The following command will check the tokens that can be verified via libsmw_pkcs11. pkcs11-tool --module $MODULE_PKCS11 -L   If you see a display similar to the example below, it is working correctly. Available slots: Slot 0 (0x0): Security Middleware Abstraction token label : smw token manufacturer : NXP Semiconductor token model : token flags : login required, PIN pad present, token initialized hardware version : 0.0 firmware version : 0.0 serial num : pin min/max : 0/0 uri : pkcs11:model=;manufacturer=NXP%20Semiconductor;serial=;token=smw   The following command will display a list of available objects. Nothing should be displayed at first. pkcs11-tool --module $MODULE_PKCS11 --login -O   The following command will generate an ECC key pair. pkcs11-tool --module $MODULE_PKCS11 \ --login \ --keypairgen \ --key-type EC:prime256v1 \ --id 02 \ --label "MyECCKey" \ --usage-sign \ --allowed-mechanisms "ECDSA-SHA256"   If you display the object list again, you should see the ECC key pair as shown below. Using slot 0 with a present token (0x0) Profile object 250360144 profile_id: CKP_BASELINE_PROVIDER (1) Public Key Object; EC EC_POINT 256 bits EC_POINT: 044104fe4c97a7a4f54702f9fc5740f62c0864e851098dc43cb4c9ba8633421e5bc362cdc559523118bb4fe4281851c051e24a88846a2d774eb3f928595761cf719e90 EC_PARAMS: 06082a8648ce3d030107 (OID 1.2.840.10045.3.1.7) label: MyECCKey ID: 02 Usage: verify Access: none Unique ID: uri: pkcs11:model=;manufacturer=NXP%20Semiconductor;serial=;token=smw;id=%02;object=MyECCKey;type=public Private Key Object; EC label: MyECCKey ID: 02 Usage: sign Access: sensitive, always sensitive Unique ID: uri: pkcs11:model=;manufacturer=NXP%20Semiconductor;serial=;token=smw;id=%02;object=MyECCKey;type=private   The following command will generate a suitable message.txt file, and then you can generate and verify a signature on it. echo hello > message.txt pkcs11-tool --module $MODULE_PKCS11 \ --login \ --sign \ --id 02 \ --mechanism ECDSA-SHA256 \ --input-file message.txt \ --output-file signature.bin pkcs11-tool --module $MODULE_PKCS11 \ --login \ --verify \ --id 02 \ --mechanism ECDSA-SHA256 \ --input-file message.txt \ --signature-file signature.bin     3.2 Using ELE via openssl   Similarly, we will explain the entire process, focusing specifically on ECDSA signing and verification. This assumes that you have already started nvm_daemon and generated the ECC key pair using the procedure for pkcs11-tool described in the previous chapter.   Create an openssl.cnf file with the following content: The lines for `module` and `pkcs11-module-path` at the end may need to be changed to match your actual system. openssl_conf = openssl_init [openssl_init] providers = provider_sect [provider_sect] default = default_sect pkcs11 = pkcs11_sect [default_sect] activate = 1 [pkcs11_sect] module = /usr/lib/ossl-modules/pkcs11.so pkcs11-module-path = /usr/lib/libsmw_pkcs11.so.5 activate = 1   Use the following command to configure openssl to use the above configuration file. export OPENSSL_CONF=<作成したopenssl.cnfの絶対path>   Signature generation and verification can be done using the following commands. openssl pkeyutl -sign -inkey "pkcs11:object=MyECCKey;type=private" -in message.txt -out sig.bin -digest sha256 openssl pkeyutl -verify -pubin -inkey "pkcs11:object=MyECCKey;type=public" -in message.txt -sigfile sig.bin -digest sha256     3.3 Creating a PKCS#11 URI PEM file   In using the openssl provider, I used a URI that could be directly verified in the object list as the key.   However, the pkcs11-provider documentation , under "USE IN OLDER APPLICATIONS (URIs in PEM files)," states that this is a new method and may not be usable when using older applications.   In fact, the Mosquitto client, which will be discussed later, has code that prevents you from directly specifying a URI when using openssl 3.0 or later.   In such cases, you can use the CLI tool uri2pem.py to generate a file containing the URI and use it in the same way as specifying a regular key file.   Using uri2pem.py downloaded from the above page, generate a file containing the PKCS#11 URI with the following command. python3 uri2pem.py --out MyECCKey.pem "pkcs11:object=MyECCKey;type=private" Although I haven't been able to confirm the details, based on the contents of uri2pem.py, it seems that it's not possible to create pem files for URIs other than private keys. By specifying the generated "MyECCKey.pem" as the signing key, you can perform the same actions as before. openssl pkeyutl -sign -inkey MyECCKey.pem -in message.txt -out sig.bin -digest sha256 openssl pkeyutl -verify -pubin -inkey "pkcs11:object=MyECCKey;type=public" -in message.txt -sigfile sig.bin -digest sha256     3.4 Cloud connectivity to Azure IoT Hub via Eclipse Mosquitto™ client using keys within ELE   We will attempt to establish a cloud connection to Azure IoT Hub using the Mosquitto client with the generated key.   Note: The RootCA certificate created using this procedure is for testing purposes only. It is recommended to delete the certificate from Azure IoT Hub after testing is complete.   In advance How to use Secure Element SE05x: Setting up Plug and Trust Middleware on the FRDM-IMX93 development board (Japanese blog) The chapter "Building and Installing the Mosquitto Client"   How to use Secure Element SE05x: Connecting to Azure IoT Hub using Eclipse Mosquitto client (Japanese blog) In the chapter "Creating an Azure IoT Hub",   Follow each step to complete the installation of the Mosquitto client and the creation of the Azure IoT Hub.     First, on the FRDM-IMX93 side, execute the following command to create a certificate request for the public key of MyECCKey and verify its contents. openssl req -new -key "pkcs11:object=MyECCKey" -outform PEM -subj /CN=frdmimx93_test -out frdmimx93_test.csr -sha256 openssl req -text -noout -in frdmimx93_test.csr   Next, move "frdmimx93_test.csr" to the host PC and execute the following: openssl ecparam -genkey -name prime256v1 -out rootCA_key_pair.pem openssl req -new -x509 -subj /CN=rootCA -key rootCA_key_pair.pem > rootCA_cert.cer openssl x509 -req -in frdmimx93_test.csr -days 365 -CA rootCA_cert.cer -CAkey rootCA_key_pair.pem -out frdmimx93_test_cert.cer Place the created "frdmimx93_test_cert.cer" back onto the FRDM-IMX93. Since it will be used later in conjunction with " MyECCKey.pem ", place it in the same directory where you created it. Additionally, you will register the created "rootCA_cert.cer" file in Azure IoT Hub and create a device named "frdmimx93_test". For instructions, please refer to the "Adding an Intermediate CA Certificate to Azure IoT Hub" section in the following article. How to use Secure Element SE05x: Connecting to Azure IoT Hub using Eclipse Mosquitto client (Japanese blog) Note: As mentioned above, the certificate registered here is for testing purposes only, so it is recommended to delete it after confirming its functionality.   Once you have completed these steps, you will be able to connect to Azure IoT Hub using the Mosquitto client.   Execute the following command. Please change IOT_HUB_NAME as appropriate. export IOT_HUB_NAME=ShinjiIotHubTest export DEVICE_NAME=frdmimx93_test mosquitto_pub -h "${IOT_HUB_NAME}.azure-devices.net" -p 8883 -u "${IOT_HUB_NAME}.azure-devices.net/${DEVICE_NAME}/api-version=2016-11-14" -t "devices/${DEVICE_NAME}/messages/events/" -m '{"mes":"Hello Azure with i.MX93!"}' --capath /etc/ssl/certs/ --cert frdmimx93_test_cert.cer --key MyECCKey.pem -i ${DEVICE_NAME} -d -q 1 If you see output similar to the following, it's a success. Client frdmimx93_test sending CONNECT Client frdmimx93_test received CONNACK (0) Client frdmimx93_test sending PUBLISH (d0, q1, r0, m1, 'devices/frdmimx93_test/messages/events/', ... (34 bytes)) Client frdmimx93_test received PUBACK (Mid: 1, RC:0) Client frdmimx93_test sending DISCONNECT By following the steps in the article below, "Checking messages sent to IoT Hub and sending messages to devices," you can also check received messages in Cloud Shell on the Azure IoT Hub side. How to use Secure Element SE05x: Connecting to Azure IoT Hub using Eclipse Mosquitto client (Japanese blog) ========================= We are currently unable to respond to comments left in the " Comment " section of this post . We apologize for the inconvenience, but please refer to " Technical Questions to NXP - How to Contact Us( Japanese Blog) " when making inquiries.(If you are already an NXP distributor or have a relationship with NXP, you may ask your representative directly.) This article explains how to use the cryptographic accelerator and key management functions of the i.MX 93's built-in EdgeLock® Secure Enclave (ELE) via PKCS#11. PKCS#11 is a widely used API in cryptography and can be integrated with OpenSSL, another widely used library. Therefore, protection can be applied to all applications that perform authentication using PKCS#11 or OpenSSL (e.g., Eclipse Mosquitto ™ etc.) without any modifications to the application itself . The fact that it provides cryptographic acceleration and key management functions is something it shares with secure elements such as the SE050, which are introduced in another article. For an overview of cryptographic accelerators and key management, as well as a general comparison and usage guidelines with secure elements, please refer to the following article. This article explains commonly heard features in semiconductor hardware security (Secure Element, Secure Enclave, TPM, HSM, TEE, TrustZone, etc.) (Japanese blog). Estimated time: Approximately 55 minutes (excluding Yocto build) Using ELE via pkcs11-tool: 10 minutes Using ELE via openssl: 10 minutes Creating a PKCS#11 URI PEM file: 5 minutes Cloud connectivity to Azure IoT Hub: 30 minutes   i.MX Processors Security Japanese Blog
View full article
NXP Trimension® SR250で始めるUWB入門 第1回:UWBの基礎とSR250の概要 (日本語ブログ) はじめに   「スマホをポケットに入れたままドアが開く」「部屋に入ったら自動で照明がつく」「ソファに座った瞬間、サウンドバーが自分の位置に合わせて音場を自動調整してくれる」── こんな体験を実現できるデバイスが NXP Trimension® SR250 です。 SR250は、超高精度な無線測距技術「UWB (Ultra-Wideband:超広帯域無線)」と、相手デバイスなしで人や物体を感知できる「UWBレーダー」を、IoT向けとして世界初となるオンチップ処理付きで1チップに統合したICです。 そんな様々な可能性を秘めたこのSR250が、2026年3月、ついにマスマーケット向けリリースされました!評価ボード SR250UWBSHIELD が NXPのeコマースで購入できます。 「面白そうだけど、難しそうかな?」と思っていたあなた、今が試してみるチャンスです。 第1回はUWBとはそもそも何かという基礎から、SR250の特徴までをお届けします。本稿を読んで想像をふくらませ、ぜひ評価ボードを入手して一緒にUWBを体験しましょう! UWBって、昔どこかで聞いたことがある?   「UWBって、昔の高速データ転送技術では?」と思った方、鋭いです! 2000年代初頭、UWBは高速ワイヤレスデータ転送技術として大きな注目を集めました。WiMediaアライアンスが標準化を進めましたが、Wi-FiやBluetoothの急速な進化に押され、普及しないまま終わりました。 ところが2010年代後半、UWBは全く別の顔で復活します。精密測距・測位の技術として再定義され、IEEE 802.15.4zとして標準化。2019年 iPhone 11への搭載を機に、一気に注目度が高まりました。 UWBが広い帯域幅を持つという本質は変わっていません。ただ、その特性を「通信速度」ではなく「時間分解能」として使うことで、まったく新しい用途が生まれたのです。 UWBとは? ─ センチメートルの世界へ   UWB (Ultra-Wideband) は、名前の通り周波数軸で見れば超広帯域、逆に時間軸で見ると非常に短いパルス信号を使った無線技術です。IEEE 802.15.4z規格として標準化されており、近距離高精度測位の分野で今まさに急速に普及しています。 Wi-FiやBluetoothの位置精度が±1〜2mであるのに対して、UWBは±5〜10cmのセンチメートル精度を実現できます。これは「どこかにいる」ではなく「ここにいる」を検知できる技術です。 このセンチメートル精度と高いセキュリティの組み合わせが、スマートカーアクセスや精密な屋内測位を可能にしています。Androidスマートフォン・AirTagに加え、*Google Pixel Tagへの搭載も発表され、今後さらなる普及が期待されています。 *Google Pixel Tagは2026年11月発売予定 なぜUWBはマルチパスに強く、セキュアなのか? ─ 他無線技術との比較   マルチパスとは?   電波は光のように直進するだけでなく、壁・天井・家具などに反射しながら伝わります。受信側には「直進してきた電波」と「あちこちで反射してから届いた電波」が混ざって届きます。これがマルチパスです。特に屋内では反射が多く、マルチパスの環境となります。 BLEやWi-FiのようなRSSI (受信強度) ベースの測距は、この「混ざった電波の強さ」を使って距離を推定するため、反射波に大きく左右されてしまいます。 UWBは非常に短いパルス信号 (数ナノ秒幅) を使っているため、直接届いた信号と反射して後から届いた信号を時間的に分離して識別できます。   なぜUWBの測距はセキュアなのか? UWBは、 STS (Scrambled Timestamp Sequence:スクランブルされたタイムスタンプシーケンス) と呼ばれる暗号化された信号列を使用しています。STSはAES-128ベースの乱数生成器によって毎回異なる値が生成されます。受信側は事前に共有した鍵から同じSTSを計算し、受信値と照合することで、正規の送信元かどうかを検証します。 STSは毎回異なる値が生成されるため、傍受した信号をそのまま再送したり(リプレイアタック)、中継・偽装して距離を誤認識させたりする攻撃が成立しません。さらにセキュアレンジングでは、STS生成に使うセッション鍵をセキュアな環境で管理し、定期的に再計算します。仮に特定時点の鍵情報が漏洩しても被害範囲を限定できます。これらにより、UWBはBLEやWi-Fiベースのレンジングよりも強固なセキュリティを実現しています。   測距技術の比較   技術 精度 マルチパス耐性 セキュリティ 主な用途 UWB ±5~10 cm 高 (パルスで直接波を分離) 高 (STS暗号化) 精密測位・スマートアクセス BLE Channel Sounding ±0.5 m 中 (位相測定で改善) 中 (RTT+位相で保護) スマートアクセス・IoT Wi-Fi RTT (FTM) ±1〜2 m 低〜中 低 屋内ナビ・フロア判定 BLE RSSI ±1〜5 m 低 (強度ベース) 低 近接検知・ビーコン BLE Channel Soundingなど他技術はコスト・消費電力面での利点もあるため、用途に応じた使い分けやUWBとのハイブリッド構成も増えています。 UWBの測距原理:ToF と AoA   ToF (Time of Flight:飛行時間) TWR (Two Way Ranging) では、InitiatorがパルスをResponderに送り、Responderが折り返すことで、Initiatorが電波の往復時間を計測し距離を算出します。電波は光速で伝わるため、わずかな時間誤差が距離誤差に直結します。広帯域であるほど時間分解能が上がり、距離精度が向上するのです。 また、複数デバイスを組み合わせたTDOA (Time Difference of Arrival) にも対応しており、広いエリアのリアルタイム測位も可能です。 AoA (Angle of Arrival:到達角度) 複数のアンテナで受信した信号の位相差(PDOA, Phase Difference of Arrival)から、デバイスが存在する角度を算出します。SR250は3つの受信ポートを持つため、水平方向と垂直方向を同時に算出する3シングルショット3D AoA が可能です。   UWBレーダーとは?   測距 (Ranging) は2台のUWBデバイスが通信し合うことで距離を測りますが、レーダーはまったく異なるアプローチをとります。送信したパルスが人や物体に当たって反射してくる信号を解析することで、相手がUWBデバイスを持っていなくても距離・方向・存在を検知できるのです。 UWBレーダーは人体のわずかな動きを捉えることができ、プライバシーを守りながら「その場に人がいるか」「動いているか」を感知できます。 レーダー処理はSR250にお任せ!オンチップ・レーダー処理   レーダーのアルゴリズムは複雑で、独自に構築するのは容易ではありません。SR250は、単一ターゲットの存在・距離・角度検知まではオンチップで処理できるよう設計されており、アルゴリズム開発無しでレーダー機能を使うことができます。もっと複雑なレーダー処理をしたい場合は、反射はデータをホストに送ることでAI/MLを使用した応用も可能です。 SR250が切り拓くアプリケーション   測距とレーダーを1チップに統合したSR250は、スマートロック・スマートスピーカーといった民生機器から、工場・倉庫でのAGV (無人搬送車) やフォークリフトと作業者の衝突防止といった産業用途まで、幅広い分野での活用が期待されています。 「位置を知る」「存在を知る」「動きを知る」─ この3つがカメラなしでできるとしたら、どんな機器が作れるでしょうか。ぜひ想像しながら連載を読み進めてください。 連載の予定   本連載は全4回を予定しています。 第1回(本記事) UWBの基礎とSR250の概要 第2回 SR250評価ボード (SR250UWBSHIELD) のセットアップ 第3回 UWB測距 (Ranging) を試してみる 第4回 UWBレーダー (Radar)を試してみる 次回は評価ボードの入手方法・ハードウェア・ソフトウェア環境の構築を解説します。UWBを動かす準備を一緒に整えましょう! 参考リンク Trimension SR250 製品ページ(日本語) SR250 評価ボード(TRIMENSION-SR250) UWB Radar Fundamentals (AN13989) UWB Convergence Radar ホワイトペーパー Introducing The Trimension SR250 トレーニング(英語・24分) ========================= 本投稿の「Comment」欄にコメントをいただいても、現在返信に対応しておりません。 お手数をおかけしますが、お問い合わせの際には「NXPへの技術質問 - 問い合わせ方法 (日本語ブログ)」をご参照ください。 (既に弊社NXP代理店、もしくはNXPとお付き合いのある方は、直接担当者へご質問いただいてもかまいません。) センチメートル精度の測距と、相手デバイス不要のUWBレーダーを1チップに統合したNXP Trimension® SR250が、2026年3月にマスマーケット向けにリリースされました。本記事では、UWBの基礎原理からSR250の特徴を解説します。 (読了:10分) Security 日本語ブログ
View full article
NXP Trimension® SR250で始めるUWB入門 第3回:UWB測距デモを試してみる (日本語ブログ) はじめに   第2回では、SR250評価ボード (SR250UWBSHIELD) のセットアップ方法として、A. PnP (Plug and Play) ルートとB. Zephyr SDKルートの2種類の環境構築手順を解説しました。 今回はいよいよ実際にUWB測距デモを動かします。デモの進め方も引き続きA/Bの2ルートに分けて解説します。まだ環境構築が終わっていない方は、先に第2回をご確認ください。 スマートフォンとのUWB測距はBルートで扱います。まず、Zephyr SDKでビルドせずにpre-builtバイナリを使って試す方法を紹介し、その後にZephyr SDKでNearbyデモをビルドする方法を説明します。pre-built版ではZephyr SDKのビルドは不要で、RW612へのFW書き込みは第2回のPnPルートで説明した手順と同じ流れで行えます。 第1回 UWBの基礎とSR250の概要 第2回 SR250評価ボード (SR250UWBSHIELD) のセットアップ 第3回(本記事) UWB測距 (Ranging) を試してみる 第4回 UWBレーダー (Radar) を試してみる デモの全体像  UWB測距では、通信相手となるデバイスが必要です。今回のデモでは、 一方のボードが Controller としてUWBセッションのスケジューリング・タイミング制御を担い、同時に Initiator として測距を開始します。 もう一方のボードは Controlee としてControllerの指示に従い、Responder として応答パケットを返します。 ボード2台を用意する代わりに、UWB対応スマートフォンを相手デバイスとして使うことも可能です (Bルート参照)。 「A. PnPルート」の方はこちら 「B. Zephyr SDKルート」の方はこちら A. PnPルート   GitHub: SR250 UWB Plug-and-Play Application Simple_demosフォルダの概要   PnPデモ用リポジトリの Simple_demos\ フォルダには、以下のファイルが含まれています。 ファイル名 内容 UartInterface.py シリアル通信の基本処理をまとめたモジュール。 各デモスクリプトから共通で使用されます。 UwbConfig.py UWBセッションのパラメータ (チャネル、タイミング等) を設定するモジュール。 第2回のZephyr SDKルートで書き込んだキャリブレーションデモと同様に、デバイスのキャリブレーション値の設定もこのファイルで行います。 デモスクリプト各種 demo_ranging.py :2台のボード間でDS-TWR (Double-Sided Two-Way Ranging) による距離計測を行うメインデモ。 demo_radar_ocpd.py :オンチップ存在検知 (OCPD: On-Chip Presence Detection) デモ。 demo_radar_raw.py :CIR (Channel Impulse Response) の生データ取得デモ。 ※レーダー関連 (ocpd/radar_raw) のデモについては次回の記事で詳しく紹介します。 viki_SR250.pl UCIパケットをデコードするPerlスクリプト。ログの詳細解析に使用します。 使用にはPerlのインストールが必要です。WindowsではStrawberry Perlなどをインストールし、コマンドプロンプトで perl -v を実行して、Perlのバージョンが表示されること(Perlがインストールされ、PATHが設定されていること)を確認してください。   今回は測距用デモの  demo_ranging.py  を試してみましょう。   COMポートの確認   ボードをPCのUSBポートに接続し、COMポート番号を確認してください。確認方法は第2回をご参照ください。   Ranging Demoの起動   今回も第2回と同様に、Windows PCのコマンドプロンプトを使用します。コマンドプロンプトを2つ起動し、それぞれのコマンド内のCOMポート番号を、各ボードのCOMポート番号に置き換えて実行してください。ボーレートはスクリプトが自動設定するため、指定する必要はありません。   Controller側 (例:COM3): python demo_ranging.py COM3 controller Controlee側 (例:COM4): python demo_ranging.py COM4 controlee   実行ログの確認   スクリプトを起動すると、ターミナルにログが流れ始めます。Ctrl+Cで止めることができます。 ログには16進数の文字列がたくさん流れてきて、測距できているのかいないのか、一見ちんぷんかんぷんに見えるかもしれません。これらはUWBデバイスとホスト間でやり取りされるUCIパケットの生データです。次のセクションでUCIについて説明します。   UCI (UWB Command Interface) とは?   UCIは、FiRa Consortiumが策定したホストとUWBデバイス間の標準コマンドインターフェースです。コマンド・レスポンス・通知 (Notification) の3種類のメッセージで構成されています。 先ほど動作させたPythonスクリプトはバックグラウンドでボードにUCIコマンドを送信し、ボードからのUCIレスポンスおよびNotificationを受信しています。測距結果はUCI Notificationとして返されますが、デフォルトのPythonスクリプトではデコードされず、送受信したUCIパケットがそのまま16進数の生データとして表示されます。   UCIログの読み方   まずは、測距結果を含むUCI Notificationを一例として見てみましょう。 NXPUCIR <= 62 00 00 38 30 00 00 00 01 00 00 80 00 c8 00 00 00 01 00 00 00 00 00 00 00 00 00 00 01 11 11 00 00 30 00 85 f9 00 09 fc 00 00 00 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 UCIパケットでは、複数バイトの値をリトルエンディアンで読み取ります。この例の先頭4バイトはヘッダーです。 62 00 00 38 :Notificationであること、メッセージの種類、ペイロード長 (0x38 = 56バイト) を示します。 30 00 00 00 :セッションシーケンス番号です。 01 00 00 80 :UWBセッションを識別するセッションハンドルです。 c8 00 00 00 :測距間隔で、 0x000000C8 = 200 、200 msを示します。 01 :測距方式としてTwo-Way Ranging (TWR) が設定されています。 01 :このNotificationに含まれる測距結果が1件であることを示します。 続く測距結果のフィールドでは、 11 11 が相手デバイスの短いMACアドレス、続く 00 が測距成功、次の 00 が見通し (LoS) を示します。そして、 30 00 が距離のフィールドです。リトルエンディアンで読むと 0x0030 = 48 となるため、このパケットの測距結果は 48 cm です。   今回のように測距結果だけを確認したい場合は、次のセクションで説明するUCIパケット全体をデコードする viki_SR250.pl  を使わず、測距結果を取り出す関数をPythonスクリプトへ直接追加する方法もあります。例えば、 demo_ranging.py に以下のコールバック関数を追加します。 ntf[0] は測距ステータス、 ntf[2] と ntf[3] は距離データです。 def extract_ranging(id, ntf): if ntf[0] == 0: distance = int(ntf[2] + (ntf[3] << 8)) print(f"Device {id}: dist = {distance} cm")   次に、 demo_ranging.py の受信スレッドで extract_ranging をキーワード引数として渡します。 read_thread = Thread( target=UartIntf.read_from_serial_port, kwargs={"extract_ranging": extract_ranging} ) read_from_serial_port() は受信した測距Notificationをこの関数に渡すため、測距に成功するたびに、例えば Device 0: dist = 48 cm のように距離がリアルタイムで表示されます。   viki_SR250.pl  によるデコード   UCIパケット全体を詳しく解析したい場合は、 viki_SR250.pl  を使用します。 viki_SR250.pl  はUCIパケットの各フィールドをデコードし、セッション状態の遷移や各パケットの詳細を確認できます。使用にはPerlのインストールが必要です。 python -u demo_ranging.py COM3 controller | perl viki_SR250.pl   UCIの各フィールドがデコードされ、セッション状態の遷移や各パケットの詳細を確認できます。 B. Zephyr SDKルート   通常の測距デモ:ControllerとControleeデモ   Zephyr SDKルートでの測距デモも、Controller/Controlee構成で動作します。2台のボードにそれぞれ異なるファームウェアをビルドして書き込みます。 まず一つのボードだけ接続し、Controllerファームウェアのビルド、書き込みを行います。 west build -b frdm_rw612 -p auto uwbiot-top\demos\common\demo_ranging_controller\zephyr west flash 💡 前のビルドからビルドオプションを変更している場合、エラーが発生することがあります。sr250-uwbiot-zephyr\buildフォルダを消去するか、pristineビルドをまず試してみてください。 Controllerデモを書き込んだボードを一度外し、もう一つのボードを接続してControlee ファームウェアのビルド、書き込みを行います。 west build -b frdm_rw612 -p auto uwbiot-top\demos\common\demo_ranging_controlee\zephyr west flash   Controllerデモを書き込んでおいたボードを再度接続し、ターミナルソフトを2つ起動します。3Mbps設定で、それぞれのCOMポート番号を接続すると、以下のログのようにボード間の測距を開始します。 スマートフォンとの測距:Nearbyデモ   Bルートでは、BLEを接続の起点として使用し、UWB対応スマートフォンとの測距が可能です。このデモで使用するアプリケーション名は demo_nearby_interaction です。"Nearby" という名前は、AppleのiOS向け「Nearby Interaction」フレームワークと、Androidの「Nearby」APIに由来します。これらは、OSベンダーが提供するUWBを使った近距離インタラクション向けのAPIです。 Nearbyデモでは、最初からUWBで通信するのではなく、まずBLEを使って相手の発見・接続と、UWB測距に必要な情報交換を行います。スマートフォンのUWBは、このような事前の接続・設定を終えてから測距セッションを開始する設計になっているためです。また、BLEはUWBに比べて低消費電力で相手の発見や接続を行いやすいため、常時UWBを動作させず、必要なときだけUWB測距を開始することで消費電力を抑えられます。次の順序で測距を開始します。 BLEでSR250ボードとスマートフォンを接続します。 BLE経由で、UWB測距に必要なセッション情報や設定情報を交換し、双方の測距条件をそろえます。 交換した情報に基づいてUWBセッションを開始し、UWBでDS-TWR測距を行います。 つまり、BLEは接続とUWB測距の準備に使用し、実際の距離測定はUWBで行います。   Nearbyデモは、ボード1セットとUWB対応スマートフォンがあれば試せます。pre-builtバイナリで手軽に試す方法と、必要に応じてZephyr SDKでアプリケーションをビルド方法の2つを説明します。   方法1:pre-builtバイナリで試す   Zephyr SDKでビルドせず、あらかじめ用意されたpre-builtバイナリを使って手軽にNearbyデモを試すことができます。まずは動作確認をしたい場合に便利な方法です。 手順と必要なファイルは、GitHubのNXP Application Code Hub: UWB Nearby Interaction with phones を参照してください。リポジトリからUWB Trimension SR250 Nearby Interaction Demo application packageをダウンロードして展開し、 program_FRDM-RW612.bat を実行してファームウェアを書き込みます。書き込み操作は、第2回のPnPルートで説明した "Step 1: RW612 PnP用FWの書き込み" と同じ流れで、ボタン操作でISPモードへ入れてからバッチファイルを実行します。   方法2:Zephyr SDKでビルドする   ソースコードを変更したり、アプリケーションの動作を詳しく確認する場合は、Zephyr SDKでNearbyデモをビルドします。   Nearby Interactionファームウェアのビルド、書き込み: west build -b frdm_rw612 -p auto uwbiot-top\demos\SR2XX\demo_nearby_interaction\zephyr west flash   どちらの方法もFW書き込み後に、ターミナルソフトで接続すると以下のようなログが出力され、BLEアドバタイジングモードに入ります。スマートフォンのアプリを起動すると、BLE接続が確立され、UWB測距のログが流れ始めます。 スマートフォンアプリ   スマートフォン側では、パートナーである MobileKnowledgeが作成したMK UWB Connectを使用できます。AndroidスマートフォンではGoogle Playから、iPhoneではApp Storeから入手できます。アプリにはRanging、Distance Alert、Trackerなどのデモモードがあり、SR250 Nearby Interactionアクセサリとの測距を試すことができます。 iPhoneでは、MK UWB ConnectのほかにNXP Trimensions ARも使用できます。NXP Trimensions ARもMK UWB ConnectのTrackerデモも、UWB測距とARKit利用して、SR250アクセサリとの距離や位置関係をAR画面上で表示します。ARKitを使用するため、起動時にはアプリから姿勢キャリブレーションを案内されます。画面の指示に従って、スマートフォンを動かしてください。 Android:MK UWB Connect iPhone:MK UWB Connect または NXP Trimensions AR 対応端末:UWB対応スマートフォン iPhone:iPhone 11以降 (iPhone SE (第3世代)、iPhone 16eおよび17eを除く) Android:Google Pixel Proシリーズ、Samsung Galaxy S21+~S26シリーズ、AQUOS RシリーズのR8世代以降など その他の対応端末は、UWB対応モバイル端末一覧をご参照ください。   MK UWB Connectを動かしたときの画面は、NXP Application Code Hub: UWB Nearby Interaction with phonesで確認できます。 iPhoneでNXP Trimensions ARを動かしたときは以下のような画面で、SR250ボードまでの距離と方向が表示されます。 まとめ   今回は2つのルートでUWB測距デモを実際に動かしました。 Aルート (PnP):Pythonスクリプトを実行するだけで手軽にUWB測距が確認できます。 viki_SR250.pl  を使えばUCIログの詳細解析も可能です。 Bルート (Zephyr SDK):pre-builtバイナリを使えばビルドなしで、Zephyr SDKでビルドすればソースコードを変更しながら、BLEを活用したスマートフォンとの測距が可能です。スマートフォン側では、Android・iPhoneに対応した MK UWB Connect アプリを使用します。 次回はSR250のもう一つの機能、UWBレーダーによるオンチップ存在検知 (OCPD) デモを試してみます。 参考リンク Trimension SR250 製品ページ (日本語) SR250 評価ボード (TRIMENSION-SR250) SR250 UCI仕様書 (UM12508) SR250 UWBIoT for Zephyr OS (GitHub) Making UWB Plug and Play with Trimension SR250 (トレーニング動画) ========================= 本投稿の「Comment」欄にコメントをいただいても、現在返信に対応しておりません。 お手数をおかけしますが、お問い合わせの際には「NXPへの技術質問 - 問い合わせ方法 (日本語ブログ)」をご参照ください。 (既に弊社NXP代理店、もしくはNXPとお付き合いのある方は、直接担当者へご質問いただいてもかまいません。) 第3回では、第2回で構築した環境を使って、いよいよUWB測距デモを動かします。2台のSR250 UWB SHIELDによるボード間測距に加え、Zephyr SDKルートではBLEで接続したUWB対応スマートフォンとの測距も試します。PnPルートとZephyr SDKルートの2通りを解説します。 (作業時間:環境構築済みなら最短10分) 日本語ブログ
View full article
使用 NXP Trimension® SR250 开始使用 UWB - 第 3 部分:试用 UWB 距离演示(日语博客) 介绍   在第二部分中,我们将介绍 SR250 评估板( SR250UWBSHIELD )的设置方法,特别是 A。PnP(即插即用)Root 和 B。本文档介绍了设置 Zephyr SDK 根环境的两种方法。 这次,我们将正式进行UWB测距演示。我们将继续使用A、B两条不同的路径来讲解演示过程。如果您尚未完成环境设置,请先查看第二部分。 使用智能手机进行UWB距离测量将采用方案B。首先,我们将介绍如何在不使用Zephyr SDK的情况下尝试使用预编译的二进制文件,然后我们将解释如何使用Zephyr SDK构建Nearby演示程序。使用预编译版本时,无需构建Zephyr SDK,并且可以按照PnP方案第二部分中介绍的步骤,将固件写入RW612。 第一 UWB基础知识及SR250概述 第二次 设置 SR250 评估板 (SR250UWBSHIELD) 第三部分(本文) 我们来试试超宽带测距。 第四 试试超宽带雷达。 示威活动的总体情况 UWB测距需要通信伙伴设备。在本演示中, 其中一块板充当控制器,负责处理 UWB 会话的调度和定时控制,同时充当发起者来启动距离测量。 另一块板充当控制器接收方,遵循控制器的指令,并充当响应方,返回响应数据包。 除了使用两块电路板之外,您还可以使用支持 UWB 的智能手机作为另一台设备(参见路线 B)。 对于使用“A. PnP 途径”的用户,请点击此处。 对于使用“B. Zephyr SDK 途径”的用户,请点击此处。 A. PnP 路线   GitHub: SR250 UWB 即插即用应用程序 Simple_demos 文件夹概要   PnP 演示仓库中的 Simple_demos\ 文件夹包含以下文件: 文件名 内容 UartInterface.py 一个概括串行通信基本处理的模块。 这是所有演示脚本中通用的。 UwbConfig.py 用于配置 UWB 会话参数(信道、时间等)的模块。 与第二节课中使用 Zephyr SDK root 编写的校准演示类似,设备校准值也在此文件中设置。 各种演示脚本 demo_ranging.py 这是主要演示,演示如何使用 DS-TWR(双面双向测距)测量两个板之间的距离。 demo_radar_ocpd.py :片上存在检测 (OCPD) 演示。 demo_radar_raw.py :演示如何从 CIR(信道脉冲响应)获取原始数据。 *有关雷达相关(ocpd/radar_raw)演示的详细信息将在下一篇文章中介绍。 viki_SR250.pl 用于解码 UCI 数据包的 Perl 脚本。用于详细的日志分析。 要使用此功能,必须安装 Perl。在 Windows 系统上,请安装 Strawberry Perl 或类似程序,然后在命令提示符中运行 perl -v 以确认显示 Perl 版本(即 Perl 已安装且 PATH 环境变量已设置)。   这次,我们来尝试一下用于距离测量的 demo_ranging.py 演示。   检查 COM 端口   将开发板连接到电脑的 USB 端口,并检查 COM 端口号。有关如何检查端口号的说明,请参阅第 2 部分。   启动测距演示   与第二部分一样,我们将使用 Windows 电脑上的命令提示符。打开两个命令提示符窗口,并在执行命令前将每个命令中的 COM 端口号替换为您开发板的 COM 端口号。波特率将由脚本自动设置,因此您无需指定。   控制器端(例如,COM3): python demo_ranging.py COM3 controller 受控端(例如,COM4): python demo_ranging.py COM4 controlee   检查执行日志   运行脚本后,日志会开始输出到终端。你可以按 Ctrl+C 停止输出。 日志中可能充斥着十六进制字符串,乍一看很难判断距离测量是否正常工作。这些是UWB设备和主机之间交换的UCI数据包的原始数据。UCI将在下一节中进行解释。   什么是UCI (UWB命令接口) ?   UCI是由FiRa联盟开发的一种主机与UWB设备之间的标准命令接口。它包含三种类型的消息:命令、响应和通知。 我们刚刚运行的 Python 脚本会在后台向开发板发送 UCI 命令,并接收来自开发板的 UCI 响应和通知。距离测量结果以 UCI 通知的形式返回,但默认的 Python 脚本不会对其进行解码,因此发送和接收的 UCI 数据包会以原始十六进制数据的形式显示。   如何读取 UCI 日志   首先,我们来看一个包含距离测量结果的 UCI 通知示例。 NXPUCIR <= 62 00 00 38 30 00 00 00 01 00 00 80 00 c8 00 00 00 01 00 00 00 00 00 00 00 00 00 00 01 11 11 00 00 30 00 85 f9 00 09 FC 00 00 00 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 UCI 数据包以小端序格式读取多字节值。在本例中,前四个字节是数据包头部。 62 00 00 38 这表明它是一条通知,消息类型为 0x38,有效载荷长度为 56 字节。 30 00 00 00 这是会话序列号。 01 00 00 80 这是用于标识 UWB 会话的会话句柄。 c8 00 00 00 :表示距离测量间隔为 0x000000C8 = 200 ,200毫秒。 01 采用双向测距(TWR)作为距离测量方法。 01 这表示该通知包含一个距离测量结果。 在以下测距结果字段中, 11 11 是另一台设备的短 MAC 地址, 00 表示测距成功, 00 表示视距 (LoS) 连接。最后, 30 00 是距离字段。以小端字节序读取时,它变为 0x0030 = 48 ,因此该数据包的测距结果为48 厘米。   如果您只想查看距离测量结果(如本例所示),也可以直接在 Python 脚本中添加一个函数来提取距离测量结果,而无需使用 viki_SR250.pl 来解码整个 UCI 数据包(如下一节所述)。例如,将以下回调函数添加到 demo_ranging.py 中。 ntf[0] 表示距离测量状态, ntf[2] 和 ntf[3] 表示距离数据。 def extract_ranging(id, ntf): 如果 ntf[0] == 0: distance = int(ntf[2] + (ntf[3] << 8)) print(f"设备 {id}:距离 = {distance} 厘米")   接下来,我们将 extract_ranging 作为关键字参数传递给接收线程 demo_ranging.py 。 read_thread = Thread( target=UartIntf.read_from_serial_port,kwargs={"extract_ranging": extract_ranging} ) read_from_serial_port() 接收到的距离测量通知会传递给该函数,因此每次距离测量成功时,距离都会实时显示,例如 Device 0: dist = 48 cm 。   viki_SR250.pl 解码   如果要详细分析整个 UCI 数据包,请使用 viki_SR250.pl 。 viki_SR250.pl 会解码 UCI 数据包的每个字段,使您可以查看会话状态转换和每个数据包的详细信息。使用此功能需要安装 Perl。 python -u demo_ranging.py COM3 controller | perl viki_SR250.pl   UCI 的每个字段都会被解码,从而可以查看会话状态转换和每个数据包的详细信息。 B. Zephyr SDK 路线   标准距离测量演示:控制器和被控制器演示   使用 Zephyr SDK 的距离测量演示程序也适用于控制器/被控对象配置。需要为两个开发板分别构建不同的固件并写入其中。 首先,只连接一块板子,并构建和烧录控制器固件。 west build -b frdm_rw612 -p auto uwbiot-top\demos\common\demo_ranging_controller\zephyr west flash 💡 如果您自上次构建以来更改了构建选项,则可能会遇到错误。请尝试删除 sr250-uwbiot-zephyr\build 文件夹,或者先尝试全新构建。 移除已写入 Controller demo 的电路板,连接另一块电路板,然后构建并写入 Controlee 固件。 west build -b frdm_rw612 -p auto uwbiot-top\demos\common\demo_ranging_controlee\zephyr west flash   将已写入控制器演示程序的开发板重新连接,并启动两个终端程序。将速率设置为 3Mbps,连接相应的 COM 端口,然后开始测量开发板之间的距离,如下方日志所示。 测量智能手机与目标距离:附近演示   方案 B 使用 BLE 作为连接起点,从而能够使用兼容 UWB 的智能手机进行距离测量。本演示中使用的应用程序名称为demo_nearby_interaction 。“Nearby”一词源自苹果公司为 iOS 开发的“ Nearby Interaction ”框架以及安卓系统的“ Nearby ”API。这些 API 由操作系统供应商提供,用于使用 UWB 进行短距离交互。 在 Nearby 演示中,并非一开始就使用 UWB 通信,而是首先使用 BLE 来发现并连接对方,并交换 UWB 测距所需的信息。这是因为智能手机的 UWB 功能设计为仅在完成这些初步连接和设置后才启动测距会话。此外,由于 BLE 在发现和连接对方方面比 UWB 更节能,因此可以通过不持续运行 UWB,仅在必要时才启动 UWB 测距来降低功耗。测距过程按以下顺序开始: 使用蓝牙低功耗技术将 SR250 板和您的智能手机连接起来。 通过 BLE 交换 UWB 测距所需的会话信息和配置信息,确保双方的测距条件一致。 根据交换的信息,将启动 UWB 会话,并使用 UWB 执行 DS-TWR 距离测量。 简而言之,BLE 用于连接和准备 UWB 测距,而实际的距离测量则使用 UWB 进行。   只需一套开发板和一部兼容 UWB 的智能手机即可体验 Nearby 演示。我们将介绍两种方法:一种是使用预编译二进制文件轻松体验,另一种是如果需要,如何使用 Zephyr SDK 构建应用程序。   方法一:尝试使用预编译的二进制文件。   您可以使用预编译的二进制文件轻松试用 Nearby 演示,而无需使用 Zephyr SDK 进行构建。如果您只是想检查它是否有效,这是一种便捷的方法。 有关说明和所需文件,请参阅 GitHub 上的NXP 应用代码中心:UWB 近距离交互(与手机交互) 。从代码库下载并解压 UWB Trimension SR250 近距离交互演示应用包,然后运行 program_FRDM-RW612.bat 来刷写固件。刷写操作与 PnP 路线第二部分中“步骤 1:刷写 RW612 PnP 固件”的步骤相同;使用按钮进入 ISP 模式,然后执行批处理文件。   方法二:使用 Zephyr SDK 构建   要修改源代码或更详细地检查应用程序的行为,请使用 Zephyr SDK 构建 Nearby 演示。   Nearby Interaction固件构建和刷写: west build -b frdm_rw612 -p auto uwbiot-top\demos\SR2XX\demo_nearby_interaction\zephyr west flash   两种方法写入固件后,通过终端软件连接设备都会输出类似如下的日志,设备将进入BLE广播模式。启动智能手机应用程序后,BLE连接建立,UWB距离测量日志将开始输出。 智能手机应用   在智能手机方面,合作伙伴是 您可以使用由MobileKnowledge开发的MK UWB Connect应用。该应用可在 Google Play(适用于安卓智能手机)和 App Store(适用于 iPhone)下载。该应用包含多种演示模式,例如测距、距离警报和追踪器,方便您使用 SR250 Nearby Interaction 配件体验距离测量功能。 在 iPhone 上,除了MK UWB Connect之外,您还可以使用NXP Trimensions AR。NXP Trimensions AR 和 MK UWB Connect Tracker 演示程序均使用 UWB 测距和 ARKit 技术,在 AR 屏幕上显示与 SR250 配件的距离和位置关系。由于使用了 ARKit,该应用程序会在启动时引导您进行姿态校准。请按照屏幕上的说明移动您的智能手机。 Android : MK UWB Connect iPhone : MK UWB Connect或NXP Trimensions AR 兼容设备:支持UWB的智能手机 iPhone :iPhone 11 及更新机型(不包括 iPhone SE(第三代)、iPhone 16e 和 17e) Android :Google Pixel Pro 系列、三星 Galaxy S21+ 至 S26 系列、 AQUOS R 系列 R8 代及更新机型等。 对于其他兼容设备,请参阅UWB 兼容移动设备列表。   您可以在NXP 应用代码中心运行 MK UWB Connect 时查看屏幕:UWB Nearby Interaction with phones 。 当您在 iPhone 上运行 NXP Trimensions AR 时,以下屏幕将显示到 SR250 板的距离和方向。 总结   这次,我们实际上使用了两条不同的路线进行 UWB 测距演示。 路线 A(即插即用) :您只需运行一个 Python 脚本即可轻松检查 UWB 距离测量结果。使用 viki_SR250.pl ,您还可以对 UCI 日志进行详细分析。 方案 B(Zephyr SDK) :使用预编译的二进制文件,无需自行编译即可通过智能手机使用 BLE 进行距离测量;而使用 Zephyr SDK 编译则允许修改源代码。在智能手机端,请使用 MK UWB Connect 应用,该应用兼容 Android 和 iPhone。 下次,我们将尝试 SR250 的另一个功能:使用 UWB 雷达进行片上存在检测 (OCPD) 演示。 参考链接 Trimension SR250 产品页面(日语) SR250 评估板 (TRIMENSION-SR250) SR250 UCI 规范 (UM12508) SR250 UWBIoT for Zephyr OS(GitHub) 使用 Trimension SR250 实现 UWB 即插即用(培训视频) ========================= 即使您在本文的“评论”栏留言,我们目前也无法回复。 给您带来不便,我们深感抱歉。请在询问时参阅“NXP技术问题-联系方式(日本博客)”。 (如果您已经是NXP的代理商或与其有合作关系,可以直接向负责人咨询。) 在第三节课中,我们将使用第二节课中搭建的环境,最终运行UWB距离测量演示。除了使用两个SR250 UWB扩展板测量电路板之间的距离外,我们还将尝试使用通过BLE连接的UWB兼容智能手机,并采用Zephyr SDK方案进行距离测量。我们将分别讲解即插即用(PnP)方案和Zephyr SDK方案。 (预计时间:如果环境已经设置好,最快只需 10 分钟) 日本博客
View full article
Getting Started with UWB Using NXP Trimension® SR250 - Part 3: Trying Out a UWB Distancing Demo (Japanese Blog) Introduction   In the second part, we will cover the setup method for the SR250 evaluation board ( SR250UWBSHIELD ), specifically A. PnP (Plug and Play) Root and B.This document explains the two methods for setting up the Zephyr SDK root environment. This time, we will finally run the UWB ranging demonstration. We will continue to explain the demonstration process using two separate routes, A and B. If you haven't finished setting up your environment yet, please check out Part 2 first. UWB distance measurement with a smartphone will be handled using Route B. First, we will introduce how to try using a pre-built binary without building with the Zephyr SDK, and then we will explain how to build the Nearby demo with the Zephyr SDK. With the pre-built version, building the Zephyr SDK is not necessary, and writing the firmware to the RW612 can be done in the same way as the procedure explained in the second part on the PnP route. 1st Basics of UWB and an overview of the SR250 2nd time Setting up the SR250 evaluation board (SR250UWBSHIELD) Third installment (this article) Let's try UWB ranging. 4th Try out UWB radar. The overall picture of the demonstration UWB ranging requires a communication partner device. In this demonstration, One board acts as the Controller , handling scheduling and timing control for the UWB session, while simultaneously acting as the Initiator to start distance measurement. The other board acts as the Controlleree , following the Controller's instructions, and as the Responder , it returns response packets. Instead of using two boards, you can also use a UWB-compatible smartphone as the other device (see Route B). For those using the "A. PnP route," please click here. For those using the "B. Zephyr SDK route," please click here. A. PnP Route   GitHub: SR250 UWB Plug-and-Play Application Summary of the Simple_demos folder   The Simple_demos\ folder in the PnP demo repository contains the following files: file name Content UartInterface.py A module that summarizes the basic processing of serial communication. This is used in common across all demo scripts. UwbConfig.py A module for configuring UWB session parameters (channel, timing, etc.). Similar to the calibration demo written using the Zephyr SDK root in the second session, the device calibration values are also set in this file. Various demo scripts demo_ranging.py This is the main demo, demonstrating distance measurement between two boards using DS-TWR (Double-Sided Two-Way Ranging). demo_radar_ocpd.py : On-Chip Presence Detection (OCPD) demo. demo_radar_raw.py : A demonstration of obtaining raw data from CIR (Channel Impulse Response). *Details about the radar-related (ocpd/radar_raw) demo will be covered in the next article. viki_SR250.pl A Perl script for decoding UCI packets. Used for detailed log analysis. Perl must be installed to use this feature. On Windows, install Strawberry Perl or a similar program, then run perl -v in the command prompt to confirm that the Perl version is displayed (that Perl is installed and the PATH is set).   This time, let's try demo_ranging.py demo for distance measurement.   Check COM port   Connect the board to your PC's USB port and check the COM port number. Please refer to Part 2 for instructions on how to check the port number.   Launching Ranging Demo   As with the second installment, we will be using the command prompt on a Windows PC. Open two command prompt windows and replace the COM port number in each command with the COM port number of your board before executing them. The baud rate will be set automatically by the script, so you do not need to specify it.   Controller side (e.g., COM3): python demo_ranging.py COM3 controller Controlee side (e.g., COM4): python demo_ranging.py COM4 controlee   Checking the execution log   When you run the script, logs will start flowing to the terminal. You can stop it with Ctrl+C. The log may appear filled with hexadecimal strings, making it difficult to tell at first glance whether distance measurement is working or not. These are the raw data of UCI packets exchanged between the UWB device and the host. UCI will be explained in the next section.   What is UCI (UWB Command Interface) ?   UCI is a standard command interface between a host and a UWB device, developed by the FiRa Consortium. It consists of three types of messages: commands, responses, and notifications. The Python script we just ran sends UCI commands to the board in the background and receives UCI responses and notifications from the board. The distance measurement results are returned as UCI notifications, but the default Python script does not decode them, and the sent and received UCI packets are displayed as raw hexadecimal data.   How to read UCI logs   First, let's look at a UCI Notification that includes distance measurement results as an example. NXPUCIR <= 62 00 00 38 30 00 00 00 01 00 00 80 00 c8 00 00 00 01 00 00 00 00 00 00 00 00 00 00 01 11 11 00 00 30 00 85 f9 00 09 fc 00 00 00 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 UCI packets read multi-byte values in little-endian format. In this example, the first four bytes are the header. 62 00 00 38 This indicates that it is a notification, the message type, and the payload length (0x38 = 56 bytes). 30 00 00 00 This is the session sequence number. 01 00 00 80 This is the session handle that identifies the UWB session. c8 00 00 00 : Indicates a distance measurement interval of 0x000000C8 = 200 , 200 ms. 01 Two-Way Ranging (TWR) is set as the distance measurement method. 01 This indicates that this notification contains one distance measurement result. In the following range measurement result field, 11 11 is the short MAC address of the other device, followed by 00 which indicates successful range measurement, and then 00 which indicates line of sight (LoS). Finally, 30 00 is the distance field. When read in little-endian format, it becomes 0x0030 = 48 , so the range measurement result for this packet is 48 cm .   If you only want to check the distance measurement results, as in this case, you can also directly add a function to extract the distance measurement results into your Python script, instead of using viki_SR250.pl which decodes the entire UCI packet as explained in the next section. For example, add the following callback function to demo_ranging.py . ntf[0] is the distance measurement status, and ntf[2] and ntf[3] are the distance data. def extract_ranging(id, ntf): if ntf[0] == 0: distance = int(ntf[2] + (ntf[3] << 8)) print(f"Device {id}: dist = {distance} cm")   Next, we pass extract_ranging as a keyword argument to the receiving thread demo_ranging.py . read_thread = Thread( target=UartIntf.read_from_serial_port, kwargs={"extract_ranging": extract_ranging} ) read_from_serial_port() The received distance measurement notification is passed to this function, so each time the distance measurement is successful, the distance will be displayed in real time, for example, Device 0: dist = 48 cm .   viki_SR250.pl Decoded by   Use viki_SR250.pl if you want to analyze the entire UCI packet in detail. viki_SR250.pl decodes each field of the UCI packet, allowing you to see session state transitions and details of each packet. Perl must be installed to use this. python -u demo_ranging.py COM3 controller | perl viki_SR250.pl   Each field of the UCI is decoded, allowing you to view session state transitions and details of each packet. B. Zephyr SDK Route   Standard distance measurement demo: Controller and Controlleree demo   The distance measurement demo using the Zephyr SDK also works in a Controller/Controlee configuration. Different firmware is built and written to each of the two boards. First, connect only one board and build and flash the Controller firmware. west build -b frdm_rw612 -p auto uwbiot-top\demos\common\demo_ranging_controller\zephyr west flash 💡 If you have changed build options since the previous build, you may encounter errors. Try deleting the sr250-uwbiot-zephyr\build folder or try a pristine build first. Remove the board with the Controller demo written to it, connect the other board, and then build and write the Controlee firmware. west build -b frdm_rw612 -p auto uwbiot-top\demos\common\demo_ranging_controlee\zephyr west flash   Reconnect the board with the Controller demo written to it, and start two terminal programs. With the settings at 3Mbps, connect the respective COM port numbers, and the distance measurement between the boards will begin as shown in the log below. Measuring distance from a smartphone: Nearby demo   Route B uses BLE as the connection starting point, enabling distance measurement with UWB-compatible smartphones. The application name used in this demo is demo_nearby_interaction . The name "Nearby" comes from Apple's " Nearby Interaction " framework for iOS and Android's " Nearby " API. These are APIs provided by OS vendors for short-range interactions using UWB. In the Nearby demo, instead of communicating via UWB from the start, BLE is first used to discover and connect to the other party and exchange information necessary for UWB ranging. This is because smartphone UWB is designed to start the ranging session only after these preliminary connections and settings are completed. Also, since BLE is more power-efficient than UWB for discovering and connecting to the other party, power consumption can be reduced by not running UWB constantly and only starting UWB ranging when necessary. The ranging starts in the following order: Connect the SR250 board and your smartphone using BLE. Session information and configuration information necessary for UWB ranging are exchanged via BLE, ensuring that the ranging conditions are consistent for both parties. Based on the exchanged information, a UWB session will be started, and DS-TWR distance measurement will be performed using UWB. In short, BLE is used for connection and preparing for UWB ranging, while the actual distance measurement is performed using UWB.   The Nearby demo can be tried with just one board set and a UWB-compatible smartphone. We will explain two methods: an easy way to try it with a pre-built binary, and how to build an application using the Zephyr SDK if needed.   Method 1: Try with a pre-built binary.   You can easily try out the Nearby demo using pre-built binaries instead of building with the Zephyr SDK. This is a convenient method if you just want to check if it works. For instructions and required files, please refer to NXP Application Code Hub: UWB Nearby Interaction with phones on GitHub. Download and extract the UWB Trimension SR250 Nearby Interaction Demo application package from the repository, and run program_FRDM-RW612.bat to flash the firmware. The flashing operation follows the same procedure as "Step 1: Flashing RW612 PnP firmware" explained in Part 2 of the PnP route; enter ISP mode using the buttons and then execute the batch file.   Method 2: Build with Zephyr SDK   To modify the source code or examine the application's behavior in more detail, build the Nearby demo with the Zephyr SDK.   Nearby Interaction firmware build and flashing: west build -b frdm_rw612 -p auto uwbiot-top\demos\SR2XX\demo_nearby_interaction\zephyr west flash   In both methods, after writing the firmware, connecting with terminal software will output logs similar to the following, and the device will enter BLE advertising mode. When you launch the smartphone app, the BLE connection will be established, and UWB distance measurement logs will begin to flow. Smartphone app   On the smartphone side, the partner is You can use MK UWB Connect , created by MobileKnowledge . It's available from Google Play for Android smartphones and from the App Store for iPhones. The app includes demo modes such as Range, Distance Alert, and Tracker, allowing you to try out distance measurement with the SR250 Nearby Interaction accessory. On iPhones, you can use NXP Trimensions AR in addition to MK UWB Connect . Both NXP Trimensions AR and the MK UWB Connect Tracker demo use UWB ranging and ARKit to display the distance and positional relationship with SR250 accessories on the AR screen. Because ARKit is used, the app will guide you through attitude calibration upon startup. Please move your smartphone according to the on-screen instructions. Android : MK UWB Connect iPhone : MK UWB Connect or NXP Trimensions AR Compatible devices : UWB-compatible smartphones iPhone : iPhone 11 and later (excluding iPhone SE (3rd generation), iPhone 16e and 17e) Android : Google Pixel Pro series, Samsung Galaxy S21+ to S26 series, AQUOS R series R8 generation and later , etc. For other compatible devices, please refer to the list of UWB-compatible mobile devices .   You can view the screen when running MK UWB Connect at NXP Application Code Hub: UWB Nearby Interaction with phones . When you run NXP Trimensions AR on your iPhone, the following screen will display the distance and direction to the SR250 board. summary   This time, we actually ran the UWB ranging demonstration using two different routes. Route A (PnP) : You can easily check UWB distance measurement by simply running a Python script. Using viki_SR250.pl , you can also perform detailed analysis of UCI logs. Route B (Zephyr SDK) : Using the pre-built binary allows for distance measurement with a smartphone using BLE without building, while building with the Zephyr SDK allows for modification of the source code. On the smartphone side, use the MK UWB Connect app, which is compatible with Android and iPhone. Next time, we'll try out another feature of the SR250: an on-chip presence detection (OCPD) demonstration using UWB radar . Reference links Trimension SR250 Product Page (Japanese) SR250 Evaluation Board (TRIMENSION-SR250) SR250 UCI Specification (UM12508) SR250 UWBIoT for Zephyr OS (GitHub) Making UWB Plug and Play with Trimension SR250 (Training Video) ========================= We are currently unable to respond to comments left in the "Comment" section of this post. We apologize for the inconvenience, but please refer to " Technical Questions to NXP - How to Contact Us( Japanese Blog) " when making an inquiry. (If you are already an NXP distributor or have a relationship with NXP, you may ask your representative directly.) In the third session, we will finally run the UWB distance measurement demo using the environment we built in the second session. In addition to measuring distance between boards using two SR250 UWB SHIELDs, we will also try measuring distance with a UWB-compatible smartphone connected via BLE using the Zephyr SDK route. We will explain both the PnP route and the Zephyr SDK route. (Estimated time: as little as 10 minutes if the environment is already set up) Japanese Blog
View full article
Getting Started with UWB Using NXP Trimension® SR250 - Part 1: UWB Basics and an Overview of the SR250 (Japanese Blog) Introduction   "Doors open with your smartphone still in your pocket," "Lights turn on automatically when you enter a room," "The moment you sit down on the sofa, the soundbar automatically adjusts the sound field to your position"—the NXP Trimension ® SR250 is a device that can make these experiences a reality. The SR250 is the world's first IC for IoT applications to integrate ultra-high-precision wireless ranging technology " UWB (Ultra-Wideband) " and " UWB radar " that can detect people and objects without an external device, all on a single chip with on-chip processing. This SR250, which holds so much potential, was finally released to the mass market in March 2026! The evaluation board SR250UWBSHIELD is available for purchase from NXP's e-commerce site . If you've been thinking, "That sounds interesting, but it might be difficult," now's your chance to give it a try. In this first installment, we'll cover everything from the basics of what UWB is to the features of the SR250. Read this article to expand your imagination, and then get your hands on an evaluation board and experience UWB together! Have you heard of UWB somewhere before?   If you're thinking, "Isn't UWB an old high-speed data transfer technology?", you're very perceptive! In the early 2000s, UWB attracted considerable attention as a high-speed wireless data transfer technology . The WiMedia Alliance worked to standardize it, but it ultimately failed to gain widespread adoption due to the rapid evolution of Wi-Fi and Bluetooth. However, in the late 2010s, UWB made a comeback in a completely different form. It was redefined as a precision distance measurement and positioning technology and standardized as IEEE 802.15.4z. Its inclusion in the iPhone 11 in 2019 brought it a surge in popularity. The fundamental characteristic of UWB—its wide bandwidth—remains unchanged. However, by using this characteristic not as "communication speed" but as "temporal resolution," entirely new applications have emerged. What is UWB? — Into the world of centimeters   UWB (Ultra-Wideband), as its name suggests, is a wireless technology that uses extremely wide bandwidth in terms of frequency, and conversely, very short pulse signals in terms of time. It has been standardized as the IEEE 802.15.4z standard and is currently rapidly gaining popularity in the field of short-range high-precision positioning. While Wi-Fi and Bluetooth have a positioning accuracy of ±1-2m, UWB can achieve centimeter-level accuracy of ±5-10cm. This technology can detect "here" rather than "somewhere." This combination of centimeter-level accuracy and high security enables smart car access and precise indoor positioning. In addition to Android smartphones and AirTag, it has also been announced that it will be integrated into Google Pixel Tag, and further widespread adoption is expected in the future. *Google Pixel Tag is scheduled for release in November 2026. Why is UWB so robust against multipath interference and secure? — A comparison with other wireless technologies   What is multipathing?   Radio waves don't just travel in a straight line like light; they also propagate by reflecting off walls, ceilings, furniture, and other objects. The receiver receives a mixture of radio waves that traveled in a straight line and those that have reflected from various points. This is called multipath. Indoors, in particular, there are many reflections, creating a multipath environment. RSSI (Radio Speed Indicator) based ranging methods like BLE and Wi-Fi estimate distance using the "strength of mixed radio waves," making them highly susceptible to reflected waves. Because UWB uses very short pulse signals (a few nanoseconds wide), it can temporally separate and distinguish signals that arrive directly from signals that are reflected and arrive later.   Why is UWB ranging secure? UWB uses an encrypted signal sequence called STS (Scrambled Timestamp Sequence). The STS is generated each time by an AES-128-based random number generator, producing a different value each time . The receiver calculates the same STS using a pre-shared key and verifies the legitimacy of the sender by comparing it with the received value. Because a different STS value is generated each time, attacks that involve retransmitting intercepted signals (replay attacks) or relaying/spoofing signals to misinterpret distance are impossible. Furthermore, in secure ranging, the session key used to generate the STS is managed in a secure environment and recalculated periodically. Even if the key information at a specific point in time is leaked, the scope of damage can be limited. As a result, UWB achieves stronger security than BLE or Wi-Fi-based ranging.   Comparison of distance measurement technologies   technology accuracy Multipath resistance security Main uses UWB ±5~10 cm High ( separates waves directly with pulses) High (STS encryption) Precision positioning and smart access BLE Channel Sounding ±0.5 m Medium (improved by phase measurement) Medium (Protected by RTT+ phase) Smart Access IoT Wi-Fi RTT (FTM) ±1 to 2 m low to medium low Indoor navigation and floor detection BLE RSSI ±1 to 5 m Low (intensity-based) low Proximity detection and beacons Other technologies, such as BLE Channel Sounding, offer advantages in terms of cost and power consumption, leading to an increase in their use depending on the application, as well as hybrid configurations with UWB. UWB ranging principle: ToF and AoA   ToF (Time of Flight) In TWR (Two-Way Ranging), the Initiator sends a pulse to the Responder, which then returns it. The Initiator measures the round-trip time of the radio waves and calculates the distance. Because radio waves travel at the speed of light, even a small time error directly translates to a distance error. The wider the bandwidth, the higher the time resolution and the better the distance accuracy. Furthermore, it supports TDOA (Time Difference of Arrival) by combining multiple devices, enabling real-time positioning over a wide area. AoA (Angle of Arrival) The angle at which a device is located is calculated from the phase difference of arrival (PDOA) of signals received by multiple antennas. Because the SR250 has three receiving ports, it can perform 3-single-shot 3D AoA , simultaneously calculating horizontal and vertical angles.   What is UWB radar?   While ranging measures distance through communication between two UWB devices, radar takes a completely different approach. By analyzing the signals reflected from pulses that hit people or objects, it can detect distance, direction, and presence even if the other party does not have a UWB device . UWB radar can detect even the slightest movement of the human body, allowing you to sense whether there is a person present and whether they are moving, while protecting privacy. Leave radar processing to the SR250! On-chip radar processing   Radar algorithms are complex and not easy to develop from scratch. The SR250 is designed to handle the detection of a single target's presence, distance, and angle on-chip , allowing you to use radar functionality without developing your own algorithms. For more complex radar processing, reflections can be sent to a host, enabling AI/ML applications. Applications pioneered by the SR250   The SR250, which integrates ranging and radar into a single chip, is expected to be used in a wide range of fields, from consumer devices such as smart locks and smart speakers to industrial applications such as collision prevention between AGVs (automated guided vehicles) and forklifts and workers in factories and warehouses. "Knowing location," "Knowing presence," and "Knowing movement"—what kind of devices could be created if these three things were possible without a camera? Please read the series while imagining these possibilities. Scheduled serialization   This series is planned to consist of four parts. Part 1 (This article) Basics of UWB and an overview of the SR250 2nd time Setting up the SR250 evaluation board (SR250UWBSHIELD) 3rd Let's try UWB ranging. 4th Try out UWB radar. Next time, we'll explain how to obtain an evaluation board and how to set up the hardware and software environment. Let's get ready to run UWB together! Reference links Trimension SR250 Product Page (Japanese) SR250 Evaluation Board (TRIMENSION-SR250) UWB Radar Fundamentals (AN13989) UWB Convergence Radar White Paper Introducing the Trimension SR250 Training (English, 24 minutes) ========================= We are currently unable to respond to comments left in the "Comment" section of this post. We apologize for the inconvenience, but please refer to " Technical Questions to NXP - How to Contact Us( Japanese Blog) " when making an inquiry. (If you are already an NXP distributor or have a relationship with NXP, you may ask your representative directly.) The NXP Trimension® SR250, which integrates centimeter-precision ranging and a UWB radar that does not require a separate device onto a single chip, was released for the mass market in March 2026. This article explains the basic principles of UWB and the features of the SR250. (Reading time: 10 minutes) Security Japanese Blog
View full article
使用 NXP Trimension® SR250 入门 UWB - 第一部分:UWB 基础知识和 SR250 概述(日语博客) 介绍   “智能手机还在口袋里时,门就会打开”、“当你进入房间时,灯会自动打开”、“当你坐在沙发上时,条形音箱会自动调整声场以适应你的位置”——NXP Trimension ® SR250是一款能够将这些体验变为现实的设备。 SR250 是世界上首款用于物联网应用的集成电路,它集成了超高精度无线测距技术“ UWB(超宽带) ”和“ UWB 雷达”,无需外部设备即可在单个芯片上通过片上处理检测人和物体。 这款极具潜力的 SR250 终于在 2026 年 3 月面向大众市场发布!评估板SR250UWBSHIELD可从NXP 的电子商务网站购买。 如果你一直在想,“这听起来很有趣,但可能很难”,那么现在就是你尝试的机会。 在本系列文章的第一部分,我们将涵盖从UWB基础知识到SR250特性的所有内容。阅读本文,拓展您的想象力,然后入手一块评估板,一起体验UWB的魅力吧! 你之前听说过UWB吗?   如果你在想,“UWB 不是一种老旧的高速数据传输技术吗?”,那你真是太有洞察力了! 21世纪初,超宽带(UWB)作为一种高速无线数据传输技术引起了广泛关注。WiMedia联盟致力于将其标准化,但由于Wi-Fi和蓝牙的快速发展,最终未能得到广泛应用。 然而,在2010年代后期,UWB以一种截然不同的形式卷土重来。它被重新定义为一种精密距离测量和定位技术,并被标准化为IEEE 802.15.4z标准。2019年,iPhone 11搭载了这项技术,使其人气飙升。 超宽带(UWB)的基本特性——宽带宽——依然不变。然而,通过不再将这一特性视为“通信速度”,而是将其视为“时间分辨率”,全新的应用场景应运而生。 什么是UWB?——走进厘米的世界   超宽带(UWB)顾名思义,是一种无线技术,它使用极宽的频率带宽,相应地,使用极短的脉冲信号。该技术已被标准化为IEEE 802.15.4z标准,目前在短距离高精度定位领域正迅速普及。 虽然 Wi-Fi 和蓝牙的定位精度为 ±1-2 米,但 UWB 可以达到厘米级精度,为 ±5-10 厘米。这项技术可以检测“这里”,而不是“某个地方”。 厘米级的精度和高安全性相结合,实现了智能汽车门禁和精准的室内定位。除了安卓智能手机和AirTag之外,该技术还将集成到谷歌Pixel Tag中,预计未来将得到更广泛的应用。 *谷歌Pixel Tag计划于2026年11月发布。 为什么UWB对多径干扰的抵抗力如此之强且安全性如此之高?——与其他无线技术的比较   什么是多路径?   无线电波的传播方式并非像光一样沿直线传播;它们还会通过墙壁、天花板、家具和其他物体的反射而传播。在接收端,接收到的无线电波既有“沿直线传播的无线电波”,也有“从不同位置反射的无线电波”。这种现象被称为多径效应。尤其是在室内,反射现象更为普遍,从而形成多径环境。 基于 RSSI(无线电速度指示器)的测距方法,如 BLE 和 Wi-Fi,利用“混合无线电波的强度”来估算距离,因此极易受到反射波的影响。 由于超宽带使用非常短的脉冲信号(几纳秒宽),因此它可以将直接到达的信号与反射后稍后到达的信号在时间上分离和区分。   为什么UWB测距是安全的? 超宽带 (UWB) 使用一种称为STS (加扰时间戳序列)的加密信号序列。STS 每次都由基于 AES-128 的随机数生成器生成,每次生成的值都不同。接收方使用预共享密钥计算相同的 STS,并通过将其与接收到的值进行比较来验证发送方的合法性。 由于每次都会生成不同的STS值,因此涉及重传截获信号(重放攻击)或中继/欺骗信号以错误解读距离的攻击都无法实施。此外,在安全测距中,用于生成STS的会话密钥在安全环境中进行管理并定期重新计算。即使在特定时间点密钥信息泄露,造成的损失范围也有限。因此,UWB测距比基于BLE或Wi-Fi的测距具有更高的安全性。   距离测量技术比较   技术 准确性 多路径电阻 安全 主要用途 超宽带 ±5~10 厘米 高(直接用脉冲分离波) 高(STS加密) 精准定位和智能访问 BLE通道探测 ±0.5 米 介质(通过相位测量改进) 介质(受 RTT+ 相保护) 智能接入物联网 Wi-Fi RTT(FTM) ±1 至 2 米 低至中等 低的 室内导航和楼层检测 BLE RSSI ±1 至 5 米 低(基于强度) 低的 近距离检测和信标 其他技术,如 BLE 通道探测,在成本和功耗方面具有优势,因此根据应用的不同,其使用量有所增加,还可以与 UWB 进行混合配置。 UWB测距原理:飞行时间(ToF)和迎角(AoA)   飞行时间 (ToF) 在双向测距(TWR)中,发起方向响应方发送脉冲信号,响应方随后返回该信号。发起方测量无线电波的往返时间并计算距离。由于无线电波以光速传播,即使是很小的时间误差也会直接转化为距离误差。带宽越宽,时间分辨率越高,距离精度也越高。 此外,它通过组合多个设备支持 TDOA(到达时间差),从而实现大范围的实时定位。 到达角 (AoA) 设备所在位置的角度是通过多个天线接收到的信号的到达相位差 (PDOA) 计算得出的。由于 SR250 具有三个接收端口,因此可以执行3 次单次拍摄的 3D 到达角 (AoA)计算,同时计算水平角和垂直角。   什么是超宽带雷达?   测距是通过两个超宽带(UWB)设备之间的通信来测量距离,而雷达则采用完全不同的方法。它通过分析照射到人或物体上的脉冲反射信号,即使对方没有超宽带设备,也能探测到距离、方向和目标是否存在。 UWB 雷达甚至可以探测到人体最轻微的动作,让您能够感知周围是否有人以及他们是否在移动,同时保护隐私。 把雷达处理交给SR250吧!片上雷达处理   雷达算法复杂,从零开始开发并非易事。SR250芯片旨在处理单个目标的存在、距离和角度检测,无需自行开发算法即可使用雷达功能。对于更复杂的雷达处理,反射信号可以发送到主机,从而支持人工智能/机器学习应用。 SR250 开创的应用   SR250 将测距和雷达功能集成到单个芯片中,预计将广泛应用于各个领域,从智能锁和智能音箱等消费电子产品到工厂和仓库中 AGV(自动导引车)与叉车和工人之间的碰撞预防等工业应用。 “感知位置”、“感知存在”和“感知移动”——如果无需摄像头就能实现这三件事,那么可以创造出什么样的设备?请在阅读本系列文章的同时,畅想这些可能性。 计划序列化   本系列计划分为四部分。 第一部分(本文) UWB基础知识及SR250概述 第二次 设置 SR250 评估板 (SR250UWBSHIELD) 第三 我们来试试超宽带测距。 第四 试试超宽带雷达。 下次,我们将讲解如何获取评估板以及如何搭建硬件和软件环境。让我们一起准备运行UWB吧! 参考链接 Trimension SR250 产品页面(日语) SR250 评估板 (TRIMENSION-SR250) 超宽带雷达基础知识(AN13989) 超宽带融合雷达白皮书 Trimension SR250 培训介绍(英语,24 分钟) ========================= 即使您在本文的“评论”栏留言,我们目前也无法回复。 给您带来不便,我们深感抱歉。请在询问时参阅“NXP技术问题-联系方式(日本博客)”。 (如果您已经是NXP的代理商或与其有合作关系,可以直接向负责人咨询。) NXP Trimension® SR250 将厘米级精度的测距和无需单独设备的超宽带雷达集成到单个芯片上,于 2026 年 3 月面向大众市场发布。本文将解释超宽带的基本原理和 SR250 的特性。 (阅读时间:10分钟) 安全 日本博客
View full article
Connecting LCD_PAR_S035 to the U-blox IRIS-W1 EVK Using the 8080 8-bit Interface The LCD_PAR_S035 can be interfaced with the U-blox IRIS-W1 EVK using the 8080 8-bit parallel interface. Enabling this configuration requires a combination of GPIO routing, jumper wiring, and two resistor population changes on the EVK. The reason for this additional wiring is that the signals required by the LCD's 8080 interface are distributed across multiple expansion connectors on the EVK. Additionally, the CS (Chip Select) and DC (Data/Command) signals are not routed by default to the required GPIOs and must be reassigned through resistor rework. Without these modifications, the LCD controller cannot be properly controlled by the IRIS-W1 device when operating in 8080 parallel mode.   Signal Mapping The following GPIO assignments have been verified for operation with the LCD_PAR_S035:   GPIO56 -> CS Available on J48 after removing R263 and populating R264 GPIO57 -> DC Available on J48 after removing R265 and populating R266 GPIO54 -> WR Available on J43 by default GPIO48 -> RD Available on J44 by default GPIO44 -> RST Available on J3 by default GPIO45 -> TE Available on J4 by default GPIO53 -> D7 Available on J43 by default GPIO52 -> D6 Available on J44 by default GPIO51 -> D5 Available on J43 by default GPIO49 -> D4 Available on J43 by default GPIO47 -> D3 Available on J43 by default GPIO46 -> D2 Available on J48 by default GPIO43 -> D1 Available on J4 by default GPIO42 -> D0 Available on J3 by default GPIO17 -> I2C_SCL Available on J47 by default GPIO16 -> I2C_SDA Available on J10 by default Required Hardware Rework Two routing modifications are required to expose the LCD control signals through the desired GPIOs: CS Signal Routing:   Remove : R263 Populate : R264  DC Signal Routing: Remove : R265 Populate : R266 Populate:   Remove: LCD Configuration The LCD module must be configured for 8080 8-bit parallel mode before power-up. The interface selection switch located on the back of the LCD_PAR_S035 should be set to: 110     Incorrect switch settings will prevent communication between the display controller and the IRIS-W1. Software Configuration After completing the hardware setup, any compatible LVGL example from the SDK can be used as a starting point. The selected project must use a flash configuration that matches the flash device populated on the target hardware. Reference flash configurations are available in the following repository: https://github.com/u-blox/u-blox-sho-OpenCPU/tree/master/MCUXpresso/IRIS-W1/sw_config/flash_config Reference Design Files Additional information regarding connector locations, GPIO routing, resistor options, and board-level implementation can be found in the EVK design package: https://github.com/u-blox/evk_designs_sho_altium/tree/main/EVK-IRIS-W10/Deliverables Summary Enabling the LCD_PAR_S035 on the U-blox IRIS-W1 EVK through the 8080 8-bit interface requires: Configuring the display for 8080 8-bit mode (switch setting 110 ). Reworking resistor populations for CS and DC routing. Connecting the LCD control and data signals according to the GPIO mapping listed above. Selecting the appropriate flash configuration for the target hardware. Using an LVGL-based application to validate display operation. This configuration provides direct access to the LCD through the parallel interface and serves as a useful reference for graphics evaluations and GUI development on the IRIS-W1 platform. Results: FRDM-RW612
View full article
8MNANOLPD4-EVK 的 Altium 文件或 MIMX8MN6CVTIZAA 的原理图符号/封装 您好, 我能否获得最新的 Altium 项目文件,或者可以导入 Altium 的格式文件? 顺祝商祺! 8MNANOLPD4-EVK MIMX8MN6CVTIZAA Re: Altium files for 8MNANOLPD4-EVK or Schematic Symbol/Footprint for MIMX8MN6CVTIZAA 你好,以色列, 我可以获取可导入到 Altium 的电路板文件吗? 此致, 糟糕。 Re: Altium files for 8MNANOLPD4-EVK or Schematic Symbol/Footprint for MIMX8MN6CVTIZAA 你好@Stefano_Allegri , 您应该提交一个工单,请使用以下链接: https://support.nxp.com 此致, 以色列。 Re: Altium files for 8MNANOLPD4-EVK or Schematic Symbol/Footprint for MIMX8MN6CVTIZAA 你好,以色列, 我将开发一款新板,并以 8MNANOLPD4-EVK 作为参考设计,请问如何获取该板的 Altium 文件(原理图和布局图)? Re: Altium files for 8MNANOLPD4-EVK or Schematic Symbol/Footprint for MIMX8MN6CVTIZAA 嗨@Sal2020 , 我已将文件直接发送到您的邮箱。 此致, 以色列。
View full article
工具在 VS Code 中安装失败 您好,NXP, 我尝试在 VS Code 中安装配置工具和安全配置工具,但都失败了。 您能帮忙检查一下并提供一些修复建议吗? 非常感谢。 VS Code 版本:1.120.0 回复: Tools are failed to install in VS Code 嗨,哈里, 知道了。 谢谢 。 回复: Tools are failed to install in VS Code 嗨@jimmyli 作为替代方案,我建议分别下载并安装 MCUXpresso 配置工具和 MCUXpresso 安全配置工具。 请使用Windows系统的默认安装路径安装这两个工具。安装完成后,重启 VS Code。这样一来,MCUXpresso for VS Code 扩展程序应该能够自动检测已安装的工具,从而有助于避免您目前遇到的安装/检测错误。 MCUXpresso 配置工具 | 面向恩智浦微控制器 (MCU) 的软件开发 | 恩智浦半导体 MCUXpresso 安全配置工具 | 恩智浦半导体 BR 哈里
View full article
QEMU support for S32 series boards I am looking to use qemu to speed up ci/cd and testing for S32 automotive processors for a project. I am having trouble getting the SDK access.  2 questions: 1. is this allowed? I can't figure out if they want me to sign NDAs or whats the process. 2. whether its allowed or not how can I get an SDK? seems to be public but also blocked?? which seems counter intuitive to getting a hassle for the process of making accounts to acess this and won't tell me what I need. Re: QEMU support for S32 series boards Hello, @enough_ahnaf  Thanks for your reply. I have the following suggestions for your issue: 1. If you have any contact information with NXP repsentative,  you can reach out to them to request access 2. If not, you may create a support case via support.nxp.com to obtain further support. BR Chenyin Re: QEMU support for S32 series boards I don't even have that category. That's what I have been wanting to find out why? Seems its different access not public? Re: QEMU support for S32 series boards Hello, @enough_ahnaf  Thanks for your reply. You may try applying S32N5 SDK via the following URL BR Chenyin Re: QEMU support for S32 series boards S32 N5 SDK Re: QEMU support for S32 series boards Hello, @enough_ahnaf  Thanks for the post. May I know which SDK you were referring to? S32G or other SOC? BR Chenyin
View full article
Altium files for 8MNANOLPD4-EVK or Schematic Symbol/Footprint for MIMX8MN6CVTIZAA Hi, Could I get the last Altium project files or the files in a format importable into Altium? Best Regards, 8MNANOLPD4-EVK MIMX8MN6CVTIZAA Re: Altium files for 8MNANOLPD4-EVK or Schematic Symbol/Footprint for MIMX8MN6CVTIZAA Hi Israel, Can i get the files of the board that is importable to altium. Regards, Dangy. Re: Altium files for 8MNANOLPD4-EVK or Schematic Symbol/Footprint for MIMX8MN6CVTIZAA Hi @Stefano_Allegri, You should open a ticket use the next ticket: https://support.nxp.com Regards, Israel. Re: Altium files for 8MNANOLPD4-EVK or Schematic Symbol/Footprint for MIMX8MN6CVTIZAA Hi Israel, i will developper a new board and i will use 8MNANOLPD4-EVK for referance designe, how can i get the altium files of the board (schematics and layout)? Re: Altium files for 8MNANOLPD4-EVK or Schematic Symbol/Footprint for MIMX8MN6CVTIZAA Hi @Sal2020, I sent you the files directly to your mail. Regards, Israel.
View full article
QEMU对S32系列板卡的支持 我正在考虑使用 qemu 来加速 S32 汽车处理器的 CI/CD 和测试,用于一个项目。我无法获取SDK访问权限。 两个问题: 1. 这样做可以吗?我搞不清楚他们是不是要我签保密协议,也不知道具体流程是什么。 2. 无论是否允许,我该如何获取 SDK?它似乎是公开的,但又被屏蔽了?这似乎与创建帐户以访问它的过程相矛盾,而且它也不告诉我需要什么。 Re: QEMU support for S32 series boards 你好, @enough_ahnaf 谢谢你的回复。 针对您的问题,我有以下建议: 1.如果您有恩智浦代表的联系方式,您可以联系他们申请访问权限。 2. 如果以上方法均无效,您可以通过 support.nxp.com 创建支持案例以获得进一步支持。 BR 陈银 Re: QEMU support for S32 series boards 我甚至没有这个类别。我一直想知道为什么?似乎访问权限不一样,不是公开的? Re: QEMU support for S32 series boards 你好, @enough_ahnaf 感谢您的回复。 您可以尝试通过以下URL应用 S32N5 SDK BR 陈银 Re: QEMU support for S32 series boards S32 N5 SDK Re: QEMU support for S32 series boards 你好, @enough_ahnaf 感谢分享。 请问您指的是哪个SDK?S32G 或其他 SoC? BR 陈银
View full article