Multi Source Translation Content

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Multi Source Translation Content

讨论

排序依据:
新しいプロジェクトのコンパイル中に発生した問題 開発環境をセットアップしたばかりなので、S32K312の使い方を学ぶ予定です zhaobasui_0-1757310236757.png IDE、ADE アップデート パッケージ、および RTD パッケージをインストールした後、簡単なプロジェクトを作成しましたが、次のコンパイルの問題が発生しました。 zhaobasui_1-1757310604695.png 新しく作成したプロジェクトを別の同僚のコンピューター(自分のものと同じ開発環境を持つ)に配置し、問題なくコンパイルします。 助けてください、すでに3回再インストールしました。 なぜでしょうか? S32K312EVB-Q172 S32DS-S32プラットフォーム Re: ‌Problems encountered during compilation of a new project 私のパソコンにもインストールしましたが、操作は同じですが、このパソコンに問題があります。あなたが言及したリファレンスマニュアルには、あまり役立つ情報が記載されていないようです。 Re: ‌Problems encountered during compilation of a new project 私の問題はまだ解決されていません。FSL の使用にはまだ問題があり、Gnu の使用は遅すぎます。 Re: ‌Problems encountered during compilation of a new project 問題が解決してよかったです。 一方、RTD 4.0.0 のインストールフローに従っていないことがわかります。 詳細については、 SW32K3_S32M27x_RTD_R21-11_4.0.0_D2311_ReleaseNotes.pdf を参照してください。 Re: ‌Problems encountered during compilation of a new project zhaobasui_1-1757555030282.png zhaobasui_0-1757555012778.png zhaobasui_2-1757555038160.png また、C/C++build のツール チェーン エディターで現在のビルダーとして FSL Make Builder を選択すると、上記のコンパイル エラーが発生するという問題も見つかりました。ただし、他のオプションを選択すると、正常にコンパイルCAN。これはどういう意味ですか? zhaobasui_3-1757555302875.png zhaobasui_4-1757555322862.png Re: ‌Problems encountered during compilation of a new project 当社製品にご興味をお持ちいただき、また当社コミュニティに貢献していただき、ありがとうございます。 「ヘルプ」タブにある「インストールの詳細」のスクリーンショットを共有してください。
查看全文
バンドギャップ電圧測定 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> これは、マイクロコントローラに搭載されているバンドギャップ電圧の測定を示すSWの例です。 バンドギャップ電圧は、内部ATDチャネルにルーティングされます。ATDコンバータは入力電圧を測定し、フラッシュメモリにある変数に格納します。 SWサンプルプロジェクトは、MC9S12XEP100デバイス用のCodeWarrior v5.1で作成されています。 全般
查看全文
MCX W72 Knowledge hub The MCX W72x family features a 96 MHz Arm® Cortex®-M33 core coupled with a multiprotocol radio subsystem supporting Matter, Thread, Zigbee and Bluetooth LE. The independent radio subsystem, with a dedicated core and memory, offloads the main CPU, preserving it for the primary application and allowing firmware updates to support future wireless standards. The MCX W72x also offers advanced security with an integrated EdgeLock® Secure Enclave Core Profile and will be supported by NXP's EdgeLock 2GO cloud services for credential sharing. The MCX W72x family includes Bluetooth Channel Sounding capabilities, with a dedicated on-chip Localization Compute Engine to reduce ranging latency. It incorporates additional memory to support application-specific code, connectivity stacks and over-the-air firmware updates. In addition, the radio subsystem can run the full Thread or Zigbee stack alongside the Bluetooth Low Energy stack. This delivers reliable wireless performance, as the real-time activities of the radio run on a separate core from the application. Building on NXP's strong history of providing industrial edge solutions, the MCX W series offers a wide operating temperature range from -40 °C to 125 °C and peripherals for industrial applications, including an optional CAN interface and will be part of NXP's 15-year Product Longevity program to support long-term industrial use. The MCX W series is supported by the MCUXpresso Developer Experience to optimize, ease and help accelerate embedded system development. joseAntonio_ruiz_0-1739550415233.png   joseAntonio_ruiz_1-1739550414945.png Security Certifications  PSA Certified Level 2 SESIP Level 2 Security Target  SESIP Level 2 KW47/MCXW72 SESIP certificate and ST are on TrustCB website Regulatory Certifications European Union Declaration of Conformity - FRDM MCXW72 European Union Declaration of Conformity - MCXW72-LOC Bluetooth Qualifications Qualified Products | Bluetooth® Technology Website Q360996: KW47 / MCX W72 Bluetooth LE 6.0 (Channel Sounding) Controller Q332147: KW47 / MCX W72 Bluetooth LE 6.0 (Channel Sounding) Host Documents MCX W72 Product Family Data Sheet MCX W72 Reference Manual Errata Sheet for MCX W72 MCXW72 Hardware Design Guide   Getting Started with Matter on MCX W72 platforms Getting Started with OpenThread on NXP MCX W72    FRDM-MCXW72 User Manual Getting Started with the FRDM-MCXW72   MCX W72-LOC User Manual Bluetooth Interested in Bluetooth technology? Bluetooth® Low Energy Primer – Essential reading for understanding BLE fundamentals. Bluetooth® Specifications – Full list of standards, protocols, and technical documents. Awards and Recognition - Every year, the Bluetooth Special Interest Group (SIG) celebrates the hard work and commitment of working groups, committee members, and contributors who have been recognized by their peers as making a difference in advancing Bluetooth technology.  2024: Channel Sounding 2025: Channel sounding amplitude-based attack resilience, LE test mode enhancements and Ranging profile and service.  Bluetooth Feature Overview Bluetooth_5.0_Feature_Overview  Bluetooth_5.1_Feature_Overview  Bluetooth_5.2_Feature_Overview Bluetooth_5.3_Feature_Overview Bluetooth_5.4_Feature_Overview Bluetooth_6_Feature_Overview Bluetooth_6.1_Feature_Overview Bluetooth_6.2_Feature_Overview Bluetooth_6.3_Feature_Overview Application Notes Software, Hardware and Peripherals: AN14850 Boosting application performance with MCX W72: This application note describes the usage of the dual-core architecture in the MCX W72 microcontroller to improve performance in generic embedded applications. AN14937 32kHz Crystal-less mode on MCX W72: This application note provides information on the 32 kHz Crystal-less mode on the MCX W72 device. This mode allows you to reduce the cost of the system, without compromising the 32 kHz clock accuracy. The Free‑Running Oscillator (FRO32K) is used as the 32 kHz clock source and is calibrated against the 32 MHz RF oscillator through the Signal Frequency Analyzer (SFA) module of MCX W72 AN14745 Features, Usage, and Capabilities of Smart Power Switch on the MCX W72: This application note describes the use of the smart power switch in the MCX W72microcontroller. The MCX W72 integrates a programmable solid-state switch that turns connected components on or off, including MCX W72 power domains. AN14747 Loadpull test Report for MCX W72: This document explains the purpose of measuring the supply current, the transmit power, and the harmonics level. These measurements are monitored while the complex output load seen by the device under test (DUT) is tuned in amplitude and phase. Power Management:  AN14739 MCX W72 Bluetooth Low Energy Power Consumption Analysis: This document provides the power consumption analysis of the MCX W72 (IIOT) wireless MCU using the MCXW72-EVK board AN14745 Features Usage and Capabilities of Smart Power Switch on MCX W72 Microcontroller:  This application note describes the use of the smart power switch in the MCX W72 microcontroller. The MCX W72 integrates a programmable solid-state switch that turns connected components on or off, including MCX W72 power domains. AN14841 802.15.4 Matter and Zigbee Power Consumption Analysis for MCX W72: This document provides the power consumption analysis of the Kinetis MCX W72 (IIoT) wireless MCUs. AN14742 Power Management Hardware for the MCX W72: This application note describes the usage of the different modules dedicated to power management in the MCX W72microcontroller AN14664 Coincell Hardware Recommendations for Kinetis BLE Applications: his document describes some hardware and software solutions to minimize the peaks of current at the coin cell level AN14889: FRDM-MCXW72 Radio Frequency System Evaluation Report for Bluetooth Low Energy and for IEEE 802.15.4 This document provides the radio frequency (RF) evaluation test results of the FRDM-MCXW72 board for Bluetooth Low Energy (2FSK modulation) and IEEE 802.15.4 (OQPSK modulation) applications.  RF: AN14865 Channel Sounding Fundamentals for the KW47 and MCX W72: This document provides an overview of the fundamentals for CS technology and how it can be used for custom solutions and applications. AN14779 Printed Channel Sounding Antennas for the KW47 and MCX W72: his application note is focused on printed antennas implemented on printed-circuit boards (PCB), designed by NXP for the KW47 and MCX W72 controllers AN14832 Fundamental Steps to Design a Channel Sounding Board - Creating a Simple PCB without Diversity: In this document, an example of a minimalistic CS subsystem is presented. Attention is paid to the Radio-Frequency (RF) path, since RF circuitry strongly influences the properties of the whole CS application. AN14747 Loadpull Test Report for MCX W72: This document explains the purpose of measuring the supply current, the transmit power, and the harmonics level. These measurements are monitored while the complex output load seen by the device under test (DUT) is tuned in amplitude and phase. AN14868 RF Modeling of Channel Sounding in ANSYS: focuses on techniques for simulating and analyzing channel sounding in wireless communication systems using ANSYS tools AN14855 Channel Sounding Tests in Different Environments: This application note is about Bluetooth Channel Sounding (CS), a technique for measuring the distance between two devices in the Bluetooth frequency band. It explains key factors affecting accuracy AN14869 Fundamental Steps to Design a Complex Channel Sounding Board:  It focuses on creating hardware that supports advanced CS features, including antenna diversity and optimized RF paths, to improve accuracy and mitigate issues like multipath propagation. AN2731 Compact Planar Antennas for 2.4GHz Communication: This document is not an exhaustive inquiry into antenna design. It is instead focused on helping the customers understand enough board layout and antenna basics to select a correct antenna type for their application, as well as avoiding typical layout mistakes that cause performance issues that lead to delays Security: AN14648 MCX W72 In-System Programming Utility: The document provides steps to boot the MCX W72 MCU in ISP mode and establish various serial connections to communicate with the MCU AN14613 MCX W72 Secure Boot using SEC tool: The MCX W72 is a low-power, highly secure, single-chip wireless MCU, the contents of flash memory can be saved as encrypted data, which can be decrypted instantly. It helps in protecting the sensitive data and algorithms. AN14646 Debug Authentication on MCX W72: This application note describes the steps for debug authentication using the MCUXpresso Secure Provisioning Tool (SEC). AN14728 MCX W72 Flash Encryption using NPX: There is an increasing requirement to protect the application code and data stored in flash memories in an encrypted form due to security reasons. The NVM PRINCE XEX (NPX) is a module inside the Flash Memory Controller (FMC) that allows customers to protect the contents of flash regions (up to four regions). It performs on-the-fly, low-latency encryption and decryption of flash contents, and it is transparent to the developer and to the Cortex-M33 platform. No special handle is needed from the perspective of the developer. AN14644 MCX W72 Managing Lifecycles: This document describes the following: Lifecycle stages that are available to the user, how to access the lifecycles, limitations of the lifecycles, how to transition to the next lifecycle AN14670 EdgeLock 2GO Provisioning via SPSDK for MCUs: EdgeLock 2GO is a fully managed cloud platform operated by NXP that provides secure provisioning services for easy deployment and maintenance of IoT devices that integrate NXP MCU, MPU, and EdgeLock SE05x secure elements. AN14624 EdgeLock 2GO PRovisioning via Secure Provisioning Tool (SEC) for MCUs: EdgeLock 2GO is a fully managed cloud platform operated by NXP that provides secure provisioning services for easy deployment and maintenance of IoT devices that integrate NXP MCU, MPU, and EdgeLock SE05x secure elements. AN14544 EdgeLock 2Go Services for MPU and MCU: EdgeLock 2GO is the service platform of NXP for provisioning and managing IoT devices. It lets you securely install keys and certificates into your devices, either during manufacturing or in the field, and then keep credentials up to date during the device life cycle. EdgeLock 2GO uses the security capability of each device, for optimal levels of security across your entire IoT fleet. Bluetooth Training Bluetooth Low Energy 6.0 NXP Training MCX W Series Training - NXP Community   RF Switch Comparison Absorptive/Reflective Standards Comparison ETSI / FCC / ARIB requirements BLE Channel Sounding  - Overview BLE Channel Sounding - RF Hardware BLE Channel Sounding - ANSYS Modeling Tools  BLE Channel Sounding - Antenna Prototypes Validation Measurements Equipment Wireless Equipment: This article provides the links to the Equipment that helps to the project development  Useful Links Debug probe firmware installation for the KW47-EVK and FRDM-MCXW72 This post will cover how to install the CMSIS-DAP/SEGGER J-link firmware for the KW47-EVK and FRDM-MCXW72 using NXP’s MCU-LINK installer. How to generate a Standalone IAR toolchain project from MCUXSDK application example - KWX/MCWX  Updating NBU for Wireless Examples on KW47/MCXW72This post will cover how to update the NBU firmware How to import and run demo examples with MCUXpresso for Visual Studio Code: This article gives information on how to import and run demo examples from the new SDK with ARM GCC toolchain, in MCUXpresso for Visual Studio Code. [MCUXSDK] How to use GitHub SDK for KW4x, MCXW7x, MCXW2x - NXP Community this community post provides step by step how to use GitHub SDK [MCUXSDK] GitHub SDK - Documentation for Bluetooth LE platforms - NXP Community this community post provides the documentation for BLE platforms.  The best way to build a PCB first time right with KW47 (Automotive) or MCXW72 (IoT/Industrial): In this community provides the important link to build a PCB using a KW45 or K32W148 and MCXW71 and all concerning the radio performances, low power and radio certification (CE/FCC/ICC) Workaround implementation for DCDC failure during drive strength change a DCDC failure can occur infrequently during a drive strength change to low, and the DCDC output voltage becomes greater than or equal to the current output voltage. How to use the HCI_bb on Kinetis family products and get access to the DTM mode:  This article is presenting two parts: How to flash the HCI_bb binary into the Kinetis product. Perform RF measurement using the R&S CMW270 BLE HCI Application to set transmitter/receiver test commands: This article provides the steps to show how user could send serial commands to the device. Bluetooth LE HCI Black Box Quick Start Guide : This article describes a simple process for enabling the user controls the radio through serial commands. Kinetis (../45/47/43;MCX W71/72/70) & MCX W23 Power Profile Tools (including Localization):  This page is dedicated to the Kinetis (KW35/KW38/KW45/KW47/KW43) and MCX W7x (MCX W71/W72/W70) Power Profile Tools. It will help you to estimate the power consumption in your application (Automotive or IIoT) and evaluate the battery lifetime of your solution. KW47/MCXW72 32MHz & 32kHz Oscillation margins: this article provides the properly configuration for the Oscillation margins for the circuit. Errata ERR053377: Use Cases for Different Message Buffer ConfigurationsThis article discusses the different use cases and configuration of the errata "ERR053377: FlexCAN: Message Buffer (MB) and Enhanced RX FIFO Filter Element (ERFFEL) Memory Corruption" Videos NXP Channel Sounding technology interfacing with Google Pixel 10 This is a demo showing the MCX W72 LOC board interacting with Google Pixel 10 phone using channel sounding Exploring Bluetooth Channel Sounding on FRDM-MCXW72 - Part 1: In this video, you will see step‑by‑step how Bluetooth® Channel Sounding works using NXP’s Rate2 distance‑estimation solution. Performing the demonstration includes a computer with VS Code, the MCUXpresso extension and toolchains installed, a FRDM‑MCXW72 development board and a smartphone running the BLE Hero application. Exploring Bluetooth Channel Sounding on FRM-MCXW72 - Part 2:  Concluding the demonstration of Bluetooth® Channel Sounding, part two of this presentation continues with a brief review of the testing setup and walks you through running board‑to‑board measurements
查看全文
S32K Sound Mixer Hi all, Recently, we completed S32K Sound Mixer reference code and demo, and glad to share this demo at here. Some key feature of this demo:  - Demo HW based on S32K344/S32K148 + audio codec SGTL5000 + QSPI flash MX25L6433.  - Demo SW based on S32K3 RTD RTM 2.0.0 and S32K1 RTD RTM 1.0.0.  - Demo provided 2 kinds of sound mixing algorithm realization code, and corresponding audio materials and codec SGTL5000 driver.  - Demo showed how to programming QSPI flash and its AHB accessing via audio storage and playing process.  - Demo used mono audio as source for processing, and output stereo audio (I2S format) via SAI HW FIFO combine (Line_Mux) function with nearly no extra cost. HMI/Cluster apps need multiple audio sources (usually warning sounds) be played simultaneously, which brings sound mixing ability requirement. However, S32K1/3 lack of this HW/SW feature support. With the demand from local key customer, and considering potential customer requirements, we planned to enable a SW sound mixer with scheduled peripherals, to enhance the S32K family audio mixing ability. It shall be easy of using/porting on S32K1/3, and use QSPI flash (AHB mode read) to store the music. Attachment the Sound Mixer package includes 2 sound mixing examples based on S32K344 EVB and S32K148 T-Box RDB, and some slides to introduce this implementation and quick start guide.  Thanks and welcome any comment from you. Best Regards, Shuailin Li Re: S32K Sound Mixer Hi @zyc0211 , Please sign-in your NXP website account, and see below place: Shuailin_0-1701068284626.png Shuailin_1-1701068308597.png Shuailin_2-1701068382263.png Shuailin_3-1701068447957.png Shuailin_4-1701068501893.png Shuailin_5-1701068526449.png FYI. If you still can not obtain the RTD 2.0.0 driver, please contact corresponding NXP FAE/DFAE to get the resources. Regards, Shuailin 回复: S32K Sound Mixer Hello, where is the download connection for S32K3 RTD RTM2.0? The S32K3 RTD 4.4 I installed cannot open the project
查看全文
BugBusters_Milestone_1 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 用于控制我们的机器人的简单的网络界面。它包含用于移动的按钮和用于机器人输出的控制台。 (在 “我的视频” 中查看) 2017 年 Linux 嵌入式挑战赛
查看全文
MHW-N1921 数字高效交流/直流谐振电源 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 谐振交流/直流电源在高功率输出时具有卓越的效率。TEA1916 是一种数字控制器,可简化谐振 LLC 设计的复杂性并提供轻松的调节。它是非常流行的 TEA1716 的继承者,用于许多谐振开关模式电源,例如PC 和电视,但 TEA1916 实际上非常适合任何大于 75W 的电源,例如医疗、工业和服务器电源。TEA1916 采用新的数字逐周期架构(Vcap 控制)来实现低功率负载下的新型操作。通过采用精确控制的突发模式操作,可以提高低输出功率下的效率。TEA1916 在待机或关机状态下也能实现极低的功耗;这是区别于竞争对手的一个关键性能参数。为了获得最高效率,TEA1916 与 NXP 的 TEA1995 同步整流器配合使用效果极佳。 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 谐振交流/直流电源在高功率输出时具有卓越的效率。TEA1916 是一种数字控制器,可简化谐振 LLC 设计的复杂性并提供轻松的调节。它是非常流行的 TEA1716 的继承者,用于许多谐振开关模式电源,例如PC 和电视,但 TEA1916 实际上非常适合任何大于 75W 的电源,例如医疗、工业和服务器电源。TEA1916 采用新的数字逐周期架构(Vcap 控制)来实现低功率负载下的新型操作。通过采用精确控制的突发模式操作,可以提高低输出功率下的效率。TEA1916 在待机或关机状态下也能实现极低的功耗;这是区别于竞争对手的一个关键性能参数。为了获得最高效率,TEA1916 与 NXP 的 TEA1995 同步整流器配合使用效果极佳。 安全移动 | 医疗保健和可穿戴设备
查看全文
NXP FTF Connects-オーランド-2016年9月22日 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> デザイン、ソフトウェア、サービス ハンズオン・ワークショップ:新しいLPC54114電力効率の高いMCUを使用した、常時稼働市場向けの組み込みソリューションによる設計  DES-N2084 およびDES-N1956ハンズオン・ワークショップ:Kinetisマイクロコントローラ向けFreeRTOSソリューション  DES-N1960 ハンズオン・ワークショップ Kinetis Enablement  ハンズオン・ワークショップ:KinetisによるIoT One Edge Node at a Timeの保護 DES-N1931 i.MX 6QuadPlusおよび i.MX 6DualPlusアプリケーションプロセッサ-視覚的に美しいグラフィックス中心のアプリケーションのためのパフォーマンス層マルチコア  DES-N1940 i.MX 8 グラフィックスアーキテクチャ   Kinetis®マイクロコントローラ・セキュリティ・テクノロジ  リニアテクノロジー:実証済み&最新のQorIQシリーズ・プロセッサに対応するスケーラブルな電源ソリューション  ロジック・デバイス:NXPの革新的なロジック・ソリューションによる電力、スペース、コストの節約の実例のケーススタディ Micron Technology:NXPマイクロプロセッサのメモリの選択肢  Security 101: QorIQ®プロセッサのセキュリティ・アクセラレーションの概要  TQ-Systems: モジュラー・アプローチで設計を高速化および最適化する方法  USB Type-C の概要  スマートホーム&ビル ® Bluetooth Smart Mesh:シンプルで使いやすい低電力ワイヤレスネットワークプロトコル ハンズオンワークショップ:ルーティング、境界ルーター、セキュリティ、低電力、コミッショニングに関する上級スレッド®スタッククラス  ハンズオンワークショップ:NFCペアリングを使用して、タップするだけで複数のBluetooth®およびWi-Fi®デバイスを接続  ユースケースに適したNFCソリューションの選び方 インサイト&イノベーション LPCマイクロコントローラのポートフォリオ、イネーブルメントの概要とロードマップ  INS-N1819 センサのディープダイブデモとデータ収集技術  セキュアなモバイル、ヘルスケア、ウェアラブル MHW-N1990 最新のシングルチップシステムモジュール技術で究極の小型化とカスタマイズを実現  MHW-N2009 ハンズオンワークショップ Hexiwear.pdfでIoTおよびウェアラブルアプリケーションを即座に開発  MHW-N1917 ワイヤレス充電でそのコードを切ってくれる!  スマートマシナリー&インダストリアルオートメーション SMI-N1948 ハンズオン・ワークショップ - Kinetisモータ Suite.pdf  スマートネットワーク NET-N1865 QorIQ LS1012A入門 - 世界最小・低消費電力の64ビットProcessor.pdf 
查看全文
KDS での KSDK と Processor Expert のサポートを使用した新しい USB プロジェクトの作成 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> KSDKファンの皆さん、こんにちは。   ご存知かもしれませんが、KSDKはKinetisマイクロコントローラの包括的なソフトウェアサポートを提供し、アプリケーション開発を加速します。ハードウェアabstraccionレイヤーとペリフェラルドライバーを提供するだけでなく、Processor Expertにも対応できます。   以下は、KSDK と Processor Expert のサポートを使用して新しいプロジェクトを作成する方法の例です。   これは、KSDK ドライバーまたはプロセッサ エキスパート サポートを使用してアプリケーション コードを追加する準備ができている簡単な USB HID の例を示しています。   これがお役に立てば幸いです。   よろしくお願いします。   アイザック・アビラ 全般 Re:KDSでKSDKとProcessor Expertのサポートを使用して新しいUSBプロジェクトを作成する <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> この関数「USB_Class_HID_Send_Data()」はどのように機能しますか? この関数を使用したときに、Aなどの単語を送信し続けます。 AではなくAだけを送信する方法。 Re:KDSでKSDKとProcessor Expertのサポートを使用して新しいUSBプロジェクトを作成する <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 私はこのガイドが示しているものと似たようなことを達成しようとしていますが、あまり役に立たないほど十分に異なります。TWR-K21F120M を使用しており、OS なしで Processor Expert コンポーネントを使用して USB MSD を実装する必要があります。これを達成するために私に示せるリソースはありますか?
查看全文
APF-SNT-T1360 - 南京、深セン <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> このセッションでは、ハードウェアとソフトウェアの互換性を確保しながら、QorIQ T2081とT1040の通信プロセッサ・ファミリ間で移行する方法について説明します。このセッションでは、これらのプロセッサ間での移行と、これらのプロセッサの共通ボードの設計中に存在するハードウェア、ソフトウェア、およびボード レベルの考慮事項についても説明します。 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> このセッションでは、ハードウェアとソフトウェアの互換性を確保しながら、QorIQ T2081とT1040の通信プロセッサ・ファミリ間で移行する方法について説明します。このセッションでは、これらのプロセッサ間での移行と、これらのプロセッサの共通ボードの設計中に存在するハードウェア、ソフトウェア、およびボード レベルの考慮事項についても説明します。
查看全文
Introducing eRPC This tutorial is introducing the eRPC (embedded remote procedure call) open-source project. The eRPC (Embedded Remote Procedure Call) is a Remote Procedure Call (RPC) system created by NXP. An RPC is a mechanism used to invoke a software routine on a remote system using a simple local function call. The remote system may be any CPU connected by an arbitrary communications channel: a server across a network, another CPU core in a multicore system, and so on. To the client, it is just like calling a function in a library built into the application. The only difference is any latency or unreliability introduced by the communications channel. Important links:  Everything related to the eRPC development is placed GitHub - eRPC base. The eRPC development is placed GitHub - eRPC development.  The eRPC releases are placed GitHub - eRPC Releases. The eRPC documentation is placed Github - eRPC wiki  The eRPC as Python Package on pypi  The eRPC is supporting multicore and multiprocessor types of applications.  Where to find eRPC examples Plenty of eRPC multicore and multiprocessor examples can be found in NXP MCUXpressoSDK packages. Visit https://mcuxpresso.nxp.com to configure, build and download these packages. To get the board list with multicore support (eRPC included) use filtering based on Middleware and search for 'multicore' string. Once the selected package with the multicore middleware is downloaded, see /boards/ /multicore_examples for eRPC multicore examples (RPMsg_Lite or Messaging Unit transports used) or /boards/ /multiprocessor_examples for eRPC multiprocessor examples (UART or SPI transports used). eRPC examples use the 'erpc_' name prefix. Another way of getting NXP MCUXpressoSDK eRPC multicore and multiprocessor examples is using the mcux-sdk Github repo. Follow the description how to use the West tool to clone and update the mcuxsdk repo in readme Overview section. Once done the armgcc eRPC examples can be found in mcuxsdk/examples/ /multicore_examples or in mcuxsdk/examples/ /multiprocessor_examples folders. You can use the evkmimxrt1170 as the board_name for instance. Similar to MCUXpressoSDK packages the eRPC examples use the 'erpc_' name prefix. Re: Introducing eRPC Hello Kunal, it seems your question is addressed here: Need Help-Step by Step procedure to implement eRPC in iMx6sx ? · Issue #5 · EmbeddedRPC/erpc-imx-demos · GitHub  Re: Introducing eRPC HI [email protected]‌, I don't know about official usage of eRPC on MPC5748G. Just the remind: eRPC depends on program language, OS, transport layer. There are not board specific files. So if there is used Freertos and C language you almost win, you need just port transport you want to use (if it is not already). Re: Introducing eRPC Hi Dusan,                    Has eRPC been ported to NXP MPC5748G ? Is there any example code I can reference? Best Regards, Alex Re: Introducing eRPC Hi [email protected], i didn't have big experience in this area. Recently we had to add some mutexes when multiple erpc calls were called from multiple taks. But i like your idea.  I quickly looked into source code. You need to specify your usecase. But i think it is imx Linux vs Mcore using RPSMG. In this case i think you can add mutexes as we did (which will serialize eRPC calls. you would need add them somewhere in performRequest function). The creating endpoints for each thread sounds good to me, but i see more issues which has to be solved. The smaller solution could looks like: transport init function will initialize more endpoints (based on number of tasks), eRPC rpmsg send/receive function on client side change to use unused undepoint to send and same endpoint for receive messages, eRPC rpmsg receive function on server need wait for message on all endpoints. I don't know if it is simple task or more complicated for you. But i am affraid that without modification to code you will be not able to have multithread calls. Re: Introducing eRPC Hi Dusan, I am working with Chandini here at Cubic. I just wanted to get extra info about eRPC when called from multiple threads. At the moment we are using a single end point and using this for one off calls that complete before making the next call. Now we'd potentially like to make multiple calls from multiple threads so we're wondering the best way to do this. In fact with my lack of knowledge here we've tried making other calls concurrently, well we didn't realise we were doing this until there was an issue. Now we see comms failure error codes coming back from the eRPC. Can a single end point be used for this i.e. should this be thread safe on the client side? If not should we use a separate end point for each thread, or should we be doing something else? Regards Lee Re: Introducing eRPC Hi [email protected]‌, Thank you to let us know. It is funny, i read about this today because of another project :smileygrin: Re: Introducing eRPC Hi Dusan, Thanks for the quick response. I could able to achieve better performance(response in microsec) in TCP by disabling the Nagel's algorithm using the below API call on both client and server socket connection. int result = setsockopt(sock,            /* socket affected */                         IPPROTO_TCP,     /* set option at TCP level */                         TCP_NODELAY,     /* name of option */                         (char *) &flag,  /* the cast is historical cruft */                         sizeof(int));    /* length of option value */ Reference : TCP_NODELAY: 2018 Best Practices for TCP Optimization | ExtraHop  Thanks, Sasidharan. Re: Introducing eRPC Hi [email protected]‌, Maybe you can ask guys on github (in same topic, or create new one). There are at least two guys who where doing something with TCP: github: GitHub - EmbeddedRPC/erpc: Embedded RPC  thread1:Server with TCP Transport handling multiple connections · Issue #32 · EmbeddedRPC/erpc · GitHub  thread2:TCP Example client / server code · Issue #39 · EmbeddedRPC/erpc · GitHub  Personaly i found this, but i don't know if this is your case and if it will help: linux - Low latency TCP settings on Ubuntu  Re: Introducing eRPC Hi Dusan, I want to port eRPC over TCP socket. I ran your example test code(test_arrays) over virtual serial(inside linux) and the response time taken for serial is less than 1ms. When I ran the same example code over TCP, the response time is taken for TCP is around 90ms. Is there a way to reduce the latency and increase the performance over TCP as like as serial? Thanks, Sasidharan. Re: Introducing eRPC Hi, Dusan. It helped. By the way it was mentioned in example in header file. The function call from A9 works fine and M4 returns data. But now the issue is when M4 calls function. The error is appears in A9 "Waiting MU transmit buffer empty timeout! ugh, imx_mu_rpmsg_send() failed: -5".  After this error data function call doesn't work in another side too: "rpmsg_multiept rpmsg0: virtqueue_add_outbuf failed: -5" What should I check? Thank you for your help. Re: Introducing eRPC Hi Vadim, Generally yes you need two tasks. One for client and one for server. Issue is also that output from erpc_arbitrated_client_init you have to put as a parameter to init server.  Re: Introducing eRPC Hi Dusan, Marek, community. I've made several applications with eRPC, M4(client)-A9(server) or M4(server)-A9(client) works fine, but I want to use client/server appl on each side. But now it doesn't work or function from one side only executes 1 time and appl hangs. I want to check the general structure of the code. What I do wrong? Should I use 2 separate FreeRTOS tasks for client and server on M4? M4 . . erpc_transport_t transport = erpc_transport_rpmsg_lite_rtos_remote_init(.....); erpc_mbf_t message_buffer_factory = erpc_mbf_rpmsg_init(transport); erpc_server_init(transport, message_buffer_factory); erpc_add_service_to_server(create_TEST_service()); erpc_arbitrated_client_init(transport, message_buffer_factory); while (true) { erpc_server_poll(); function1(....); } A9 . . erpc_transport_t transport = erpc_transport_rpmsg_linux_init(......); erpc_mbf_t message_buffer_factory = erpc_mbf_dynamic_init(); erpc_server_init(transport, message_buffer_factory); erpc_add_service_to_server(create_TEST_service()); erpc_arbitrated_client_init(transport, message_buffer_factory); while (true) { erpc_server_poll(); function2(....); } Re: Introducing eRPC Hi vadimfilippenko, if you are stilll interested in using python version you can look into this thread adding MPU patch to my kernel - I cannot see the new module · Issue #2 · EmbeddedRPC/erpc-imx-demos · GitHub . At least last two messages from mhanuel26 should be interesting for you because he was able to use python application. Re: Introducing eRPC Dusan, Marek, finally I successfully started modified eRPC example. But I use C on Linux side and erpc 1.5.0 with 6x parameters rpmsg init function in M4 (Dusan tips at github concerning 6th parameter). Thank you for help. Be ready for new questions) Re: Introducing eRPC You need to run M4 app befor the python app. Re: Introducing eRPC Hi Vadim, Please post here: ls /sys/class/rpmsg it looks like the nameservice was not sent from the M4 (is M4 running with the right firmware?). Because of this, a folder with dynamically announced channel from M4 was not created and therefore python cannot create rpmsg  transport... Please check your M4 core print-outs. Regards, Marek Re: Introducing eRPC Hi Vadim,  as you see in other comments, i am trying to answer as soon as possible. But this week (and maybe next) i am busy.  But from what i see in error you should compare init function in transport.py - class RpmsgTransport And here erpc-imx-demos/sysfs.py at master · EmbeddedRPC/erpc-imx-demos · GitHub   - class RpmsgEndpoint Be sure that GitHub - EmbeddedRPC/erpc-imx-demos: eRPC demos for i.MX devices  is up to date and and subrepos are checkout on commits as they are aligned with erpc-imx-demos. Maybe mareknovak‌ can help better here what is wrong.  Looks like  if self.id == -1: raise Exception() is returning -1 Re: Introducing eRPC Could anybody help me with follow ussue?: I'm using use eRPC demo example from erpc-imx-demos on iMX6COM board. Starting demo application on M4 side: "Hardware initialized eRPC intialized MatrixMultiply service added" adding driver in linux: "root@imx6sxea-com:~# modprobe -v rpmsg_multiept insmod /lib/modules/4.1.15-2.0.3+geb0b90b/kernel/drivers/rpmsg/rpmsg_multiept.ko" (Here are not any feedback from the system that rpmsg channel was created and rpmsg folder under sys/class/rpmsg is empty) Starting appl demo on linux: Traceback (most recent call last): File "example.py", line 111, in transport = erpc.transport.RpmsgTransport() File "build/bdist.linux-armv7l/egg/erpc/transport.py", line 199, in __init__ File "build/bdist.linux-armv7l/egg/rpmsg/sysfs.py", line 116, in __init__ Exception Exception TypeError: 'an integer is required' in > ignored P.S. I've built M4 eRPC demo appl. using cmake and also eclipse. M4 rpmsg demo appl works fine. Re: Introducing eRPC Hi Vakul, sorry i miss your comment. Currently we don't have any cryptographic transport supported. But because of eRPC is modular, i think you can easily add this feature to your eRPC project. Re: Introducing eRPC Hi Can eRPC communication be protected using some cryptographic transport (e.g. TLS)? Regards Vakul Re: Introducing eRPC Hi Evgeny, currently we have no estimation for that. But i think you can write/use your own allocator by writing your own implementation of erpc_malloc/erpc_free functions. Re: Introducing eRPC Hi Dusan, Are there plans to add more static memory allocation to additional parts, such as generated equivalents of erpcMatrixMultiply_shim? Where every input argument gets dynamically allocated before filling it up with data from the codec and then freed after the function invocation? Something like passing pre-allocated memory (statically by user app) to the framework? Thanks, Evgeny Re: Introducing eRPC Hi Evgeny, this looks like MCUExpresso project files/IDE issue. Top layer of folder names should be virtual directories, which will be not presented there in future. In your package on your disk should eRPC have similar directory structure as on github. Github directory structure is preferred.  Re: Introducing eRPC Hi Dusan, I see that the erpc uses a lot of dynamic memory allocation at run-time. Is there a plan to make it more embedded friendly and add a static memory allocation scheme? EDIT: I am sorry for the first question, i do see the erpc_setup_mbf_static.cpp in the repository. The thing is that i am basing  my code on the examples provided in the MCUXpresso SDK - frdmk66f_multiprocessor_examples_erpc_server_matrix_multiply_spi & frdmk66f_multiprocessor_examples_erpc_client_matrix_multiply_spi. Which have a very different directories structure from the code in the repository.  So my question is, again, should the SDK examples directories structure should be used or the repositories? ANd why are they so different? Thanks, Evgeny  Re: Introducing eRPC Hi Evgeny, first of all: Are you using smac.erpc from develop branch (and app built from that branch)? For me is this version working.  Right now version of erpcgen app and rest of eRPC code is connected. That means if you want use newer erpcgen app you built from github, you should and have to copy github erpc_c/* files from github into your example. After than you can regenerate code with newer erpcgen app, update application (erpc init + transport) functions and everything else should work. Otherwise if you will not update erpc_c files you have to use provided erpcgen app. Look at the bottom of this page: Getting Started · EmbeddedRPC/erpc Wiki · GitHub  Should be pretty up to date for newer erpcgen version. I am not sure but on newest commit spi could get changed so you can use older implementation instead. Re: Introducing eRPC Hey Dusan, When i use the erpcgen.exe that i built, i get the same error on the smac.erpc example: error: file smac.erpc:135:5: syntax error, unexpected identifier, expecting '}' The directory structure that i was referring to is the erpc_c from the repository and: From the SDK example. Which directory structure is the "right" one? Would it be safe to use the newly generated files (by me) with the SDK example code? Thanks, Evgeny Re: Introducing eRPC Hi evgenyerlihman‌, Prefered code is always on github on develop branch. Once this code will meet our requirements for new release we will merge it into master branch and we will provide also binaries of application. These updates on develop branch are more often than releases of Kinetis SDK. If some existing eRPC transport will not met version with transport used in Kinetis SDK you can compare old eRPC transport with newer one, or look on file changes in git repository. Re: Introducing eRPC Hey dusancervenka-b51352, Thank you for the quick reply! I cloned the dev branch. I see that the erpc_c directory structure is way different than the example provided with the Kinetis SDK. Which one is preferable? Thanks, Evgeny Re: Introducing eRPC Hi evgenyerlihman‌, Actually we are doing updates more frequently. You need switch to develop branch. GitHub - EmbeddedRPC/erpc at develop. Last code update was yesterday. But you need build erpcgen application there. With that smac IDL should works.  Re: Introducing eRPC Hi dusancervenka-b51352, I am considering using the erpc framework for a new product i am working on, that uses multiple nxp kinetis devices. I see that last updates to erpc github were made 6 months ago. My question is, is it still being maintained/fixed/developed? I tried the example from github: erpcgen.exe smac.erpc And it failed to generate the cpp source code with an error. The erpcgen executable is from the SDK for MCUXpresso. Thanks, Evgeny Re: Introducing eRPC Hi Chandini, It is ok. I was on long holiday too. I hope you enjoyed it well.  I sent you email through community messaging system (private message). We can discuss details through emails. Basically you ned create fork on github, checkout to develop branch, apply your changes, create commit, create pull request. We will review your changes, suggest changes and merge to develop branch. Re: Introducing eRPC Hi Dusan , Very sorry for late response , i was on long holiday . came back now . spoke with my everyone here .  could you please send me your email id so that we will forward stuff for you . according to our company we cant put anything directly to your github . Thank you Chandini  Re: Introducing eRPC Hi Dusan , Sure , i will talk to my seniors and create pull request  . currently i am on holiday .Sorry for the late reply. Thank you Chandini Re: Introducing eRPC Hi Chandini. We are glad you have succeeded. If i can have one special proposal for you, could you send pull request on develop branch on eRPC github with your newly created transport layer (on develop branch). Maybe there will be some work to get it working with newer eRPC. But if you not want updated it i can do that  With pull request on github you will be valuable contributor always seen in contributor's history. I hope eRPC will be good solution for you. And we are always here/ or on github for you Re: Introducing eRPC Hi dusancervenka-b51352 , b50844 , novakma7   Finally got it working , now demo working fine with my c++ code in Linux . Thanks a lot guys for answering all my questions. Special thanks to Dusan  Thank you Chandini Re: Introducing eRPC HI Dusan , As i was busy in some other task , Yesterday i could not try anything . today i will try and let you know . I think i have to change my functions little bit and need to try . because till now i was passing just char* to my send and receive functions. Come back to you soon. Thank you Chandini Re: Introducing eRPC Hi Chandini, yes that is correct. I was outside of company, so i didn't know exact names for functions. Is it working for you? Re: Introducing eRPC Hi Dusan Thank you for your reply : write(fd, message->getBuffer(), message->getUsed()😞 I can see getused function in  erpc/message_buffer.h at 9e18d069aeae19a6e80a5e8783903bc63bd9b567 · EmbeddedRPC/erpc · GitHub  but could not find getbuffer function. I think i have to use below function to get my buffer ? is that right ? /*! * @brief This function returns pointer to buffer to read/write. * * @return Pointer to buffer to read/write. */ uint8_t *get() { return m_buf; } so my functions becomes like this: send :erpc_status_t send(MessageBuffer *message) { write(fd, message->get, message->getUsed())};  Thank you chandini Re: Introducing eRPC Hi chanidi, well you need do it in diferent way 😕 You have to use transport.h. It will not work if you will not use that.  Maybe you can use ioctl commands as i mentioned above: erpc_status_t receive(MessageBuffer *message) {int fd = open("/dev/rpmsg_ept1024.1", O_RDWR);} send :erpc_status_t send(MessageBuffer *message) { write(fd, message->getBuffer(), message->getUsed())}; read: erpc_status_t receive(MessageBuffer *message){size_t size = read(fd, message->getBuffer(), 500); message->setUsed(size)}; novakma7 Can you confirm steps? Re: Introducing eRPC Dusan , Marek Ya i am referring those files as well , but i am using trasport.h to create my transport layer. but facing argument miss-match  problem send and receive functions in transport.h , take Messagebuffer as argument,          virtual erpc_status_t receive(MessageBuffer *message) = 0;          virtual erpc_status_t send(MessageBuffer *message) = 0; As per example.py i have created my RpmsgEndpoint class which need below arguments       RpmsgEndpoint::receive(int maxlen)       RpmsgEndpoint::send(char *buffer,int dst) As per my understanding, we are just need to read and write /dev/rpmsg_ept1024.1 device from Linux .   So i think instead of using transport.h , i think should i need to create my own transport.h version ,? Thank you guys Chandini Re: Introducing eRPC You are welcome. You can get inspirations in /erpc-imx-demos/middleware/erpc/transport/ folder. There is several transports. Re: Introducing eRPC Thanks a lot Dusan for quick reply , i will continue in the same path then and come back to u shortly .  Re: Introducing eRPC Hi Chandini. You are right. That are correct steps. You need create your class which is inheriting class from transport.h Re: Introducing eRPC Hi Marek I have question again . Currently my working status  : i got RpmsgEndpoint class in c++ I am working on how to make my client application working now. Python  example.py in erpc-imx-demos/MPU/example_erpc at master · EmbeddedRPC/erpc-imx-demos · GitHub  call  RpmsgTransport which inherited from Transport class. Question i have is , shall i use transport.h which is inside /erpc-imx-demos/middleware/erpc/erpc_c/infra  to make my application work. So that i can create my RpmsgTransport class and call it my client application . Am i thinking correctly ?  Thank you in advance Chandini Re: Introducing eRPC Yes, you are right. All the Python does are just IO operations on the files (read/write). This is doable in any language, including C/C++. Python was selected to show how it can be done due to its popularity in Linux user-space, but you can certainly port it to C. I think we are on the same wavelenght now, Good luck! Regards, Marek Re: Introducing eRPC Hi Marek Thank you for your reply , it cleared few of my doubts. We are not planning to use freeRTOS on both side. Our plan is   M4- FreeRTOS ----This we have it in your Demo A7-Linux -----Your Demo got python code , to make use of kernel RPMSG implemenation   All we need is instead of python either C or C++. I think  we can port  python code to C or C++ , easily right ? Thank you Chandini Re: Introducing eRPC Hi Chandini Indavara Basavaraju, RPMSg-Lite is implementation of RPMsg protocol and is intended only for the M4 side running FreeRTOS or baremetal. On the Linux/A7 side, you should be fine with the RPMsg implementation in kernel. (like here: GitHub - EmbeddedRPC/erpc-imx-demos: eRPC demos for i.MX devices  ) Or are you planning to run FreeRTOS on both M4 and A7 cores? In that case it would work, but this is not a standard use-case. It would require you to create a porting layer for the A core and to make FreeRTOS run there.  I hope this gives you some direction, Marek Re: Introducing eRPC Hi Marek Some how i have missed your message , sorry for that thanks a lot . i will try your new version soon. Could you please answer my last question regarding RPMSG transport layer ? Thank you  Chandini Re: Introducing eRPC Hi, i understand you.  You need create new one (and with pull request on github you can add it to our repository if you want). On Linux side you can use /dev/ttyRPMSG (if it is present in system).   for example create new transport here erpc_c/transports with: init can looks like:  int fd = open("/dev/ttyRPMSG", O_RDWR); send : write(fd, buffer, buffer_size); read: size_t size = read(fd, buffer, expected size); If there is no device named like this, you can be inspired from python code. RPMSG is not my cup of tea. I don't know how it should be used on Linux. I will forward your question to Marek. Re: Introducing eRPC Hi Dusan , Marek What i am planning : use rpmsg-lite on both M4(freertos) and A7(Linux) What i need: RPMSG C warrper (under erpc_c/setup) which can be use on both M4 and A7 side RPMSG Transport Layer (under erpc_c/transports) which can be use on both M4 and A7 side Questions i have: Could please tell me , Do you have any transport layer for that ?    or Do we need to refer rpmsg-python and write similar like that ?  Any suggestions will be so helpful Thank you guys Chandini Re: Introducing eRPC Hi, i am not sure if we have what you need (c transport for Linux side). But it should be easy to create new one. You can read and write from/to /dev/ttyRPMSG (if it is present in system). for example: init can looks like:  int fd = open("/dev/ttyRPMSG", O_RDWR); send : write(fd, buffer, buffer_size); read: size_t size = read(fd, buffer, expected size); mareknovak can brings more sun into this issue. Re: Introducing eRPC Hi Dusan , thank you for letting me know about update. I thiink now i am ok with erpc what i have shortly , once i got rpmsg Client application working then i can update erpc version as well. I was started looking rpmsg-lite , that got M4 platform files . i wonder do have anything for A7 platform ? or any information will be so helpful. my main aim is to get Client  Application using C with RPMSg as Transport layer Thank you Chandini Re: Introducing eRPC I am happy that you are progressing independently with your issue (for us it means it is not too much complicated for developers). Also mareknovak already updated his imx demo application inside the repository as he mentioned in few comments above. Your next step can be used that version because it is using new rpc features Re: Introducing eRPC Thank you for reply Dusan  that was the information i was looking for, i have created C wrapper for TCP  , after couple of fixes in erpc,  it works fine . My next step is to replace TCP layer with rpmsg . Thank you again Chandini Re: Introducing eRPC Hi Chandini Indavara Basavaraju, I have just updated the GitHub - EmbeddedRPC/erpc-imx-demos: eRPC demos for i.MX devices  repository to use eRPC 1.4.0 and RPMSg-Lite 1.1.0. You can download a pre-built erpcgen application, which is used for code generation here: Release v1.4 · EmbeddedRPC/erpc · GitHub  in the downloads section, just choose your architecture. Then you invoke it like this: ./erpcgen -gpy nameOfInterfaceDefinitionLanguageFile.erpc, this will generate Python serialization and deserialization shim code for you. If you omit -gpy or specify -gc, you will get C shim code. The ser/des shim code was also update in the latest commit in the erpc-imx-demos repository, so feel free to use it. Feel free to submit your changes in form of a pull-request, Regards and thank you for using eRPC & RPMsg-Lite! Marek Re: Introducing eRPC Hi, we don't have currently example on github repository. But we have C(c++) test there. If you are familiar with Linux or Mac you can use that as a example. Other options are as described above: 1. Download sdk for supported board -> multicore/multiprocessor c/python examples. 2. Read this article: Getting Started · EmbeddedRPC/erpc Wiki · GitHub  Re: Introducing eRPC Hi Dusan Could you please tell me , do u have any client application c example instead of python .? or Do you guys are planning to write one ?it will be so useful and helpful, if you have one already. Thank you in advance Chandini Re: Introducing eRPC Finally i got it working , thank a lot for you help   Dusan sorry i could not find attach option to attach my patch . so pasted below. From 7a5b152524a3c82b5bced4a72ed396f21860b666 Mon Sep 17 00:00:00 2001 Date: Mon, 8 May 2017 11:33:05 +0100 Subject: [PATCH] fix to run eRPC_demo --- erpc_c/infra/transport.h | 4 +- erpc_c/setup/erpc_server_setup.cpp | 36 ++++- erpc_c/setup/erpc_server_setup.h | 2 +- erpc_c/setup/erpc_setup_rpmsg_lite_rtos_remote.cpp | 54 +++++++ erpc_c/setup/erpc_transport_setup.h | 18 ++- erpc_c/transports/rpmsg_lite_rtos_transport.cpp | 158 ++++++++++++++++++ erpc_c/transports/rpmsg_lite_rtos_transport.h | 177 +++++++++++++++++++++ erpc_c/transports/rpmsg_rtos_transport.h | 147 +++++++++++++++++ erpc_python/erpc/transport.py | 21 +++ 9 files changed, 602 insertions(+), 15 deletions(-) create mode 100644 erpc_c/setup/erpc_setup_rpmsg_lite_rtos_remote.cpp create mode 100644 erpc_c/transports/rpmsg_lite_rtos_transport.cpp create mode 100644 erpc_c/transports/rpmsg_lite_rtos_transport.h create mode 100644 erpc_c/transports/rpmsg_rtos_transport.h diff --git a/erpc_c/infra/transport.h b/erpc_c/infra/transport.h index eb7ec71..fd4862a 100644 --- a/erpc_c/infra/transport.h +++ b/erpc_c/infra/transport.h @@ -48,7 +48,7 @@ //////////////////////////////////////////////////////////////////////////////// namespace erpc { - +class MessageBuffer; /*! * @brief Abstract interface for transport layer. * @@ -89,7 +89,7 @@ public: * * @return based on send implementation. */ - virtual erpc_status_t send(MessageBuffer *message) = 0; + virtual erpc_status_t send(const MessageBuffer *message) = 0; /*! * @brief Poll for an incoming message. diff --git a/erpc_c/setup/erpc_server_setup.cpp b/erpc_c/setup/erpc_server_setup.cpp index 51fa799..5cd4346 100644 --- a/erpc_c/setup/erpc_server_setup.cpp +++ b/erpc_c/setup/erpc_server_setup.cpp @@ -33,8 +33,10 @@ #include "basic_codec.h" #include "manually_constructed.h" #include "simple_server.h" -#include +#include "message_buffer.h" +#include "erpc_config_internal.h" #include +#include #if !(__embedded_cplusplus) using namespace std; @@ -43,6 +45,29 @@ using namespace std; using namespace erpc; //////////////////////////////////////////////////////////////////////////////// +// Classes +//////////////////////////////////////////////////////////////////////////////// + +class BasicMessageBufferFactory : public MessageBufferFactory +{ +public: + virtual MessageBuffer create() + { + uint8_t *buf = new (nothrow) uint8_t[ERPC_DEFAULT_BUFFER_SIZE]; + return MessageBuffer(buf, ERPC_DEFAULT_BUFFER_SIZE); + } + + virtual void dispose(MessageBuffer *buf) + { + assert(buf); + if (*buf) + { + delete[] buf->get(); + } + } +}; + +//////////////////////////////////////////////////////////////////////////////// // Variables //////////////////////////////////////////////////////////////////////////////// @@ -50,29 +75,32 @@ using namespace erpc; static ManuallyConstructed s_server; SimpleServer *g_server; +static ManuallyConstructed s_msgFactory; static ManuallyConstructed s_codecFactory; //////////////////////////////////////////////////////////////////////////////// // Code //////////////////////////////////////////////////////////////////////////////// -void erpc_server_init(erpc_transport_t transport, erpc_mbf_t message_buffer_factory) +void erpc_server_init(erpc_transport_t transport) { // Init factories. + s_msgFactory.construct(); s_codecFactory.construct(); // Init server with the provided transport. s_server.construct(); s_server->setTransport(reinterpret_cast (transport)); + s_server->setMessageBufferFactory(s_msgFactory); s_server->setCodecFactory(s_codecFactory); - s_server->setMessageBufferFactory(reinterpret_cast (message_buffer_factory)); g_server = s_server; } - void erpc_server_deinit() { + s_msgFactory.destroy(); s_codecFactory.destroy(); s_server.destroy(); + } void erpc_add_service_to_server(void *service) diff --git a/erpc_c/setup/erpc_server_setup.h b/erpc_c/setup/erpc_server_setup.h index 8e6a6ef..e4e9eaa 100644 --- a/erpc_c/setup/erpc_server_setup.h +++ b/erpc_c/setup/erpc_server_setup.h @@ -60,7 +60,7 @@ extern "C" { * * This function initializes server with all components necessary for running server. */ -void erpc_server_init(erpc_transport_t transport, erpc_mbf_t message_buffer_factory); +void erpc_server_init(erpc_transport_t transport); /*! * @brief This function de-initializes server. diff --git a/erpc_c/setup/erpc_setup_rpmsg_lite_rtos_remote.cpp b/erpc_c/setup/erpc_setup_rpmsg_lite_rtos_remote.cpp new file mode 100644 index 0000000..b480d42 --- /dev/null +++ b/erpc_c/setup/erpc_setup_rpmsg_lite_rtos_remote.cpp @@ -0,0 +1,54 @@ + /* + * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "manually_constructed.h" +#include "rpmsg_lite_rtos_transport.h" +#include "erpc_transport_setup.h" + +using namespace erpc; + +//////////////////////////////////////////////////////////////////////////////// +// Variables +//////////////////////////////////////////////////////////////////////////////// + +static ManuallyConstructed s_transport; + +//////////////////////////////////////////////////////////////////////////////// +// Code +//////////////////////////////////////////////////////////////////////////////// + +erpc_transport_t erpc_transport_rpmsg_lite_rtos_remote_init( + unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, void (*ready_cb)(void), bool send_nameservice) +{ + s_transport.construct(); + s_transport->init(src_addr, dst_addr, start_address, rpmsg_link_id, ready_cb, send_nameservice); + return reinterpret_cast (s_transport.get()); +} + + diff --git a/erpc_c/setup/erpc_transport_setup.h b/erpc_c/setup/erpc_transport_setup.h index 798d92f..6c3959e 100644 --- a/erpc_c/setup/erpc_transport_setup.h +++ b/erpc_c/setup/erpc_transport_setup.h @@ -34,6 +34,7 @@ #include "erpc_version.h" #include +#include /*! * @addtogroup transport_setup @@ -48,7 +49,7 @@ //! @brief Opaque transport object type. typedef struct ErpcTransport *erpc_transport_t; //! @brief Ready callback object type for RPMsg-Lite transport. -typedef void (*rpmsg_ready_cb)(void); +//typedef void (*rpmsg_ready_cb)(void); //////////////////////////////////////////////////////////////////////////////// // API @@ -106,21 +107,21 @@ erpc_transport_t erpc_transport_rpmsg_lite_master_init(unsigned long src_addr, /*! * @brief Create an RPMsg-Lite zero copy transport. */ -erpc_transport_t erpc_transport_rpmsg_lite_zc_master_init(unsigned long src_addr, - unsigned long dst_addr, - int rpmsg_link_id); +//erpc_transport_t erpc_transport_rpmsg_lite_zc_master_init(unsigned long src_addr, +// unsigned long dst_addr, +// int rpmsg_link_id); /*! * @brief Create an RPMsg-Lite transport. */ erpc_transport_t erpc_transport_rpmsg_lite_remote_init( - unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, rpmsg_ready_cb ready); + unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, void (*ready_cb)(void), bool send_nameservice); /*! * @brief Create an RPMsg-Lite zero copy transport. */ -erpc_transport_t erpc_transport_rpmsg_lite_zc_remote_init( - unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, rpmsg_ready_cb ready); +//erpc_transport_t erpc_transport_rpmsg_lite_zc_remote_init( +// unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, rpmsg_ready_cb ready); /*! * @brief Create an RPMsg-Lite RTOS transport. @@ -133,7 +134,8 @@ erpc_transport_t erpc_transport_rpmsg_lite_rtos_master_init(unsigned long src_ad * @brief Create an RPMsg-Lite RTOS transport. */ erpc_transport_t erpc_transport_rpmsg_lite_rtos_remote_init( - unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, rpmsg_ready_cb ready); + unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, void (*ready_cb)(void), bool send_nameservice); + //@} diff --git a/erpc_c/transports/rpmsg_lite_rtos_transport.cpp b/erpc_c/transports/rpmsg_lite_rtos_transport.cpp new file mode 100644 index 0000000..e04ae91 --- /dev/null +++ b/erpc_c/transports/rpmsg_lite_rtos_transport.cpp @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "rpmsg_lite_rtos_transport.h" +#include + +#if !(__embedded_cplusplus) +using namespace std; +#endif + +using namespace erpc; + +//////////////////////////////////////////////////////////////////////////////// +// Variables +//////////////////////////////////////////////////////////////////////////////// +uint8_t RPMsgRTOSTransport::s_initialized = 0; +struct rpmsg_lite_instance *RPMsgRTOSTransport::s_rpmsg; + +//////////////////////////////////////////////////////////////////////////////// +// Code +//////////////////////////////////////////////////////////////////////////////// + +RPMsgRTOSTransport::RPMsgRTOSTransport() +: Transport() +, m_dst_addr(0) +{ +} + +RPMsgRTOSTransport::~RPMsgRTOSTransport() +{ + rpmsg_lite_deinit(s_rpmsg); + s_initialized = 0; +} + +erpc_status_t RPMsgRTOSTransport::init( + unsigned long src_addr, unsigned long dst_addr, void *base_address, unsigned long length, int rpmsg_link_id) +{ + if (!s_initialized) + { + s_rpmsg = rpmsg_lite_master_init(base_address, length, rpmsg_link_id, RL_NO_FLAGS); + s_initialized = 1; + } + + m_rpmsg_queue = rpmsg_queue_create(s_rpmsg); + m_rpmsg_ept = rpmsg_lite_create_ept(s_rpmsg, src_addr, rpmsg_queue_rx_cb, m_rpmsg_queue); + + m_dst_addr = dst_addr; + return m_rpmsg_ept == RL_NULL ? kErpcStatus_InitFailed : kErpcStatus_Success; +} + +erpc_status_t RPMsgRTOSTransport::init( + unsigned long src_addr, unsigned long dst_addr, void *base_address, int rpmsg_link_id, void (*ready_cb)(void), bool send_nameservice) +{ + if (!s_initialized) + { + s_rpmsg = rpmsg_lite_remote_init(base_address, rpmsg_link_id, RL_NO_FLAGS); + + /* Signal the other core we are ready */ + if (ready_cb != NULL) + { + ready_cb(); + } + + while (!rpmsg_lite_is_link_up(s_rpmsg)) + { + } + + s_initialized = 1; + } + + m_rpmsg_queue = rpmsg_queue_create(s_rpmsg); + m_rpmsg_ept = rpmsg_lite_create_ept(s_rpmsg, src_addr, rpmsg_queue_rx_cb, m_rpmsg_queue); + + if(send_nameservice) + { + rpmsg_ns_announce(s_rpmsg, m_rpmsg_ept, + "rpmsg-openamp-demo-channel", + 0); + } + + m_dst_addr = dst_addr; + return m_rpmsg_ept == RL_NULL ? kErpcStatus_InitFailed : kErpcStatus_Success; +} + +erpc_status_t RPMsgRTOSTransport::receive(MessageBuffer *message) +{ + int ret_val = rpmsg_queue_recv(s_rpmsg, m_rpmsg_queue, &m_dst_addr, (char *)message->get(), kRpmsgMessageBufferSize, + NULL, RL_BLOCK); + return ret_val != RL_SUCCESS ? kErpcStatus_ReceiveFailed : kErpcStatus_Success; +} + +erpc_status_t RPMsgRTOSTransport::send(const MessageBuffer *message) +{ + int ret_val = + rpmsg_lite_send(s_rpmsg, m_rpmsg_ept, m_dst_addr, (char *)message->get(), message->getUsed(), RL_BLOCK); + return ret_val != RL_SUCCESS ? kErpcStatus_SendFailed : kErpcStatus_Success; +} + +MessageBuffer RPMsgMessageBufferFactory::create() +{ + uint8_t idx = 0; + while (((m_freeBufferBitmap & idx) == 0) && (idx < kInitCountMessageBuffers)) + { + idx++; + } + + assert(idx < kInitCountMessageBuffers); + + m_freeBufferBitmap &= ~(1 << idx); + + uint8_t *buf; + buf = m_buffers[idx]; + + assert(NULL != buf); + return MessageBuffer(buf, kRpmsgMessageBufferSize); +} + +void RPMsgMessageBufferFactory::dispose(MessageBuffer *buf) +{ + assert(buf); + uint8_t *tmp = buf->get(); + + if (tmp) + { + uint8_t idx = 0; + while ((tmp != m_buffers[idx]) && (idx < kInitCountMessageBuffers)) + { + ++idx; + } + m_freeBufferBitmap |= 1 << idx; + } +} diff --git a/erpc_c/transports/rpmsg_lite_rtos_transport.h b/erpc_c/transports/rpmsg_lite_rtos_transport.h new file mode 100644 index 0000000..f1aec8a --- /dev/null +++ b/erpc_c/transports/rpmsg_lite_rtos_transport.h @@ -0,0 +1,177 @@ +/* + * Copyright (c) 2015-2016, Freescale Semiconductor, Inc. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _EMBEDDED_RPC__RPMSG_LITE_RTOS_TRANSPORT_H_ +#define _EMBEDDED_RPC__RPMSG_LITE_RTOS_TRANSPORT_H_ + +#include "transport.h" +#include "message_buffer.h" +#include "rpmsg_lite.h" +#include "rpmsg_queue.h" +#include "rpmsg_ns.h" + +/*! + * @addtogroup rpmsg_lite_rtos_transport + * @{ + * @file + */ + +//////////////////////////////////////////////////////////////////////////////// +// Definitions +//////////////////////////////////////////////////////////////////////////////// + +enum +{ + kRpmsgMessageBufferSize = RPMSG_BUFFER_SIZE, + kInitCountMessageBuffers = 2, +}; + +//////////////////////////////////////////////////////////////////////////////// +// Classes +//////////////////////////////////////////////////////////////////////////////// + +namespace erpc +{ +/*! + * @brief Transport that uses RPMsg RTOS API for interprocessor messaging. + * + * @ingroup rpmsg_lite_rtos_transport + */ +class RPMsgRTOSTransport : public Transport +{ +public: + /*! + * @brief Constructor. + * + * This function initializes object attributes. + */ + RPMsgRTOSTransport(); + + /*! + * @brief RPMsgRTOSTransport destructor + */ + virtual ~RPMsgRTOSTransport(); + + /*! + * @brief This function call RPMsg rtos init function - as RPMsg master + * + * @Param[in] src_addr Source address. + * @Param[in] dst_addr Destination address. + * @Param[in] base_address RPMsg base address in the shared memory. + * @Param[in] length RPMsg shared memory region length. + * @Param[in] rpmsg_link_id Selection between what cores the communication will occur. + * + * @retval kErpcStatus_Success When rpmsg init function was executed successfully. + * @retval kErpcStatus_InitFailed When rpmsg init function wasn't executed successfully. + */ + virtual erpc_status_t init( + unsigned long src_addr, unsigned long dst_addr, void *base_address, unsigned long length, int rpmsg_link_id); + + /*! + * @brief This function call RPMsg rtos init function - as RPMsg remote + * + * @Param[in] src_addr Source address. + * @Param[in] dst_addr Destination address. + * @Param[in] base_address RPMsg base address in the shared memory. + * @Param[in] rpmsg_link_id Selection between what cores the communication will occur. + * @Param[in] ready_cb Callback called after RPMsg init is done and the core is ready. + * @Param[in] send_nameservice If true, RPMsg master notified by nameservice. + * + * @retval kErpcStatus_Success When rpmsg init function was executed successfully. + * @retval kErpcStatus_InitFailed When rpmsg init function wasn't executed successfully. + */ + virtual erpc_status_t init( + unsigned long src_addr, unsigned long dst_addr, void *base_address, int rpmsg_link_id, void (*ready_cb)(void), bool send_nameservice); + + /*! + * @brief Store incoming message to message buffer. + * + * In loop while no message come. + * + * @Param[in] message Message buffer, to which will be stored incoming message. + * + * @retval kErpcStatus_ReceiveFailed Failed to receive message buffer. + * @retval kErpcStatus_Success Successfully received all data. + */ + virtual erpc_status_t receive(MessageBuffer *message); + + /*! + * @brief Function to send prepared message. + * + * @Param[in] message Pass message buffer to send. + * + * @retval kErpcStatus_SendFailed Failed to send message buffer. + * @retval kErpcStatus_Success Successfully sent all data. + */ + virtual erpc_status_t send(const MessageBuffer *message); + +protected: + /* Remote device */ + struct remote_device *m_rdev; /*!< Device which represent the second core. */ + struct rpmsg_channel *m_app_rp_chnl; /*!< Represent connection between two device (two cores). */ + unsigned long m_dst_addr; /*!< Destination address used by rpmsg. */ + rpmsg_queue_handle m_rpmsg_queue; /*!< Handle of RPMsg queue. */ + struct rpmsg_lite_endpoint *m_rpmsg_ept; /*!< Pointer to RPMsg Lite Endpoint structure. */ + + static struct rpmsg_lite_instance *s_rpmsg; /*!< Pointer to instance of RPMSG lite. */ + static uint8_t s_initialized; /*!< Represent information if the rpmsg-lite was initialized. */ +}; + +class RPMsgMessageBufferFactory : public MessageBufferFactory +{ + uint8_t m_freeBufferBitmap; + uint8_t m_buffers[kInitCountMessageBuffers][kRpmsgMessageBufferSize]; + +public: + /*! + * @brief Constructor. + */ + RPMsgMessageBufferFactory() + : m_freeBufferBitmap(0xFF) + { + } + /*! + * @brief RPMsgMessageBufferFactory destructor + */ + virtual ~RPMsgMessageBufferFactory() {} + /*! + * @brief This function create message buffer used for communication between devices. + */ + virtual MessageBuffer create(); + /*! + * @brief This function dispose message buffer used for communication between devices. + */ + virtual void dispose(MessageBuffer *buf); +}; + +} // namespace erpc + +/*! @} */ + +#endif // _EMBEDDED_RPC__RPMSG_LITE_RTOS_TRANSPORT_H_ diff --git a/erpc_c/transports/rpmsg_rtos_transport.h b/erpc_c/transports/rpmsg_rtos_transport.h new file mode 100644 index 0000000..ad1d229 --- /dev/null +++ b/erpc_c/transports/rpmsg_rtos_transport.h @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _EMBEDDED_RPC__RPMSG_RTOS_TRANSPORT_H_ +#define _EMBEDDED_RPC__RPMSG_RTOS_TRANSPORT_H_ + +#include "transport.h" +#include "message_buffer.h" + +extern "C" { +#include "rpmsg.h" +#include "rpmsg_rtos.h" +#include "rpmsg.h" +} + +/*! + * @addtogroup rpmsg_rtos_transport + * @{ + * @file + */ + +//////////////////////////////////////////////////////////////////////////////// +// Definitions +//////////////////////////////////////////////////////////////////////////////// + +enum +{ + kRpmsgMessageBufferSize = RPMSG_BUFFER_SIZE, +}; + +//////////////////////////////////////////////////////////////////////////////// +// Classes +//////////////////////////////////////////////////////////////////////////////// + +namespace erpc +{ +/*! + * @brief Transport that uses RPMsg RTOS API for interprocessor messaging. + * + * @ingroup rpmsg_rtos_transport + */ +class RPMsgRTOSTransport : public Transport +{ +public: + /*! + * @brief Constructor. + * + * This function initializes object attributes. + */ + RPMsgRTOSTransport(); + + /*! + * @brief RPMsgRTOSTransport destructor + */ + virtual ~RPMsgRTOSTransport(); + + /*! + * @brief This function call rpmsg rtos init function. + * + * @Param[in] dev_id Device id number. + * @Param[in] role Device role number. + * + * @retval kErpcStatus_Success When rpmsg init function was executed successfully. + * @retval kErpcStatus_InitFailed When rpmsg init function wasn't executed successfully. + */ + virtual erpc_status_t init(int dev_id, int role); + + /*! + * @brief Store incoming message to message buffer. + * + * In loop while no message come. + * + * @Param[in] message Message buffer, to which will be stored incoming message. + * + * @retval kErpcStatus_ReceiveFailed Failed to receive message buffer. + * @retval kErpcStatus_Success Successfully received all data. + */ + virtual erpc_status_t receive(MessageBuffer *message); + + /*! + * @brief Function to send prepared message. + * + * @Param[in] message Pass message buffer to send. + * + * @retval kErpcStatus_SendFailed Failed to send message buffer. + * @retval kErpcStatus_Success Successfully sent all data. + */ + virtual erpc_status_t send(const MessageBuffer *message); + +protected: + /* Remote device */ + static struct remote_device *m_rdev; /*!< Device which represent the second core. */ + static struct rpmsg_channel *m_app_rp_chnl; /*!< Represent connection between two device (two cores). */ +}; + +class RPMsgMessageBufferFactory : public MessageBufferFactory +{ +public: + /*! + * @brief Constructor. + */ + RPMsgMessageBufferFactory() {} + /*! + * @brief RPMsgMessageBufferFactory destructor + */ + virtual ~RPMsgMessageBufferFactory() {} + /*! + * @brief This function create message buffer used for communication between devices. + */ + virtual MessageBuffer create(); + /*! + * @brief This function dispose message buffer used for communication between devices. + */ + virtual void dispose(MessageBuffer *buf); +}; + +} // namespace erpc + +/*! @} */ + +#endif // _EMBEDDED_RPC__RPMSG_RTOS_TRANSPORT_H_ diff --git a/erpc_python/erpc/transport.py b/erpc_python/erpc/transport.py index 0765e9f..c335943 100644 --- a/erpc_python/erpc/transport.py +++ b/erpc_python/erpc/transport.py @@ -31,6 +31,8 @@ import struct import serial +from rpmsg.sysfs import RpmsgEndpoint +import time import socket import threading from .crc16 import crc16 @@ -107,6 +109,25 @@ class SerialTransport(FramedTransport): class ConnectionClosed(Exception): pass +class RpmsgTransport(Transport): + def __init__(self): + self.ept = RpmsgEndpoint( + RpmsgEndpoint.rpmsg_openamp_channel, + RpmsgEndpoint.LOCAL_DEFAULT_ADDRESS, + RpmsgEndpoint.Types.DATAGRAM) + + def send(self, message): + self.ept.send(message, RpmsgEndpoint.REMOTE_DEFAULT_ADDRESS) + + def receive(self): + while True: + ret = self.ept.recv(2048) + if len(ret[1]) != 0: + return ret[1] + else: + time.sleep(0.001) + return ret[1] + class TCPTransport(FramedTransport): def __init__(self, host, port, isServer): super(TCPTransport, self).__init__() -- 2.7.4 Re: Introducing eRPC Thank you Dusan . once i got my demo working , i will create pull request .. Thanks again for your reply , i got python files . i will run demo and come back to u shortly . Re: Introducing eRPC Hi, great work  If you want you can create pull request for imx demo repository to fix it. mareknovak can review it and merge it to the repository. To generate python code: As other application you can do in command line "erpcgen --help (-h should work too)". python -gpy idl_file -> gpy means generate python. Re: Introducing eRPC That's cool, i can continue to work in the same stable version until update .  with couples of fixes my MCU demo build and run properly now ..Thanks for your information Re: Introducing eRPC Hi Dusan I did fix and now i got MCU demo working properly ... Thanks for pointing out me a stable version .. Could you please tell me How to generate python code using erpcgen tool ..  ? Thank you Chandini Re: Introducing eRPC Hi, not sooner than tomorrow. But i can't promise that it will be tomorrow. My colleague mareknovak is not in work today. But it should be soon. Re: Introducing eRPC Could you please tell me , when are you going to update ?  Re: Introducing eRPC Hi thanks for you interest. Then it looks like the erpc generated files were generated with different erpcgen then on commit Marek provided (our mistake). Best solution looks like we need updated that demo with latests stable erpc and erpcgen version. You can try this from master branch GitHub - EmbeddedRPC/erpc: Embedded RPC (and there is erpcgen prebuilt 1.4.0). But i don't know how much changes you need to do. Or you can wait for our update. mareknovak Re: Introducing eRPC Hi Dusan I was using  same eRPC library one which u refereed  Steps i followed are below: Clone  erpc-imx-demos including sub module(which clone eRPC GitHub - MarekNovakNXP/erpc at 232afb209f0a0cfceb25a1be11879f7d1934e065  ) 1. git clone --recursive https://github.com/EmbeddedRPC/erpc-imx-demos.git 2. go to erpc-imx-demos/middleware/erpc folder and build erpcgen like this: installed required packages flex/bison and boost make eprc make eprcgen sudo make install successfully got erpcgen  3. Tried create my own output files using same erpc_matrix_multiply.erpc like this : erpcgen -I erpc-imx-demos/MCU/example_erpc/service -o test/erpc-imx-demos/MCU/example_erpc/service erpc_matrix_multiply.erpc successfully got below files: erpc_matrix_multiply.h erpc_matrix_multiply_server.cpp erpc_matrix_multiply_server.h erpc_matrix_multiply_client.cpp 4. Tried to build  MCU/example_erpc/build/armgcc/imx7d_sdb_m4/build_all.sh failed with error : /home/basavarajuc/test/erpc-imx-demos/MCU/example_erpc/service/erpc_matrix_multiply_server.cpp: In function 'void* create_MatrixMultiplyService_service()': /home/basavarajuc/test/erpc-imx-demos/MCU/example_erpc/service/erpc_matrix_multiply_server.cpp:168:56: error: invalid new-expression of abstract class type 'MatrixMultiplyService_service' return new (nothrow) MatrixMultiplyService_service(); Sorry for asking again , just to clarify my understanding . 1.if i am using eRPC library from GitHub - MarekNovakNXP/erpc at 232afb209f0a0cfceb25a1be11879f7d1934e065 then Do i need to update demo ? to run demo successfully  2. Could you please tell me  output files from erpc-imx-demos/MCU/example_erpc/service at master · EmbeddedRPC/erpc-imx-demos · GitHub  are generated by which erpcgen version ? So that i can use old erpcgen shortly to create my own files  Thanks a lot . and sorry for disturbance  Chandini   Re: Introducing eRPC Hi and thanks for your comment.  Example you mentioned is an older version than your erpcgen build. mareknovak also created his fork of official eRPC repository due to some minor changes which were not present in an official release at that time. If you click on eRPC reference from erpc-imx-demos repository from middleware folder, you will be redirect to his eRPC repository. You need build erpcgen from that version. We want update demo in the future.  Hope i helped you. If you have any concerns don't hesitate and ask us.  Re: Introducing eRPC Hi Sorry if i am asking basic question. I am trying to understand how to use erpcgen tool from NXP. I successfully ran example demo , with reference : https://github.com/EmbeddedRPC/erpc-imx-demos My next approach  was build erpcgen  and create my own output files using same erpc_matrix_multiply.erpc and run same demo again so i get familiar to use erpcgen tool. i got output files but even though i am using same erpc_matrix_multiply.erpc my files different than example files the changes are : Output files in example demo says (erpc_matrix_multiply_server.h): erpc_status_t erpcMatrixMultiply_shim(erpc::Codec * in, erpc::Codec * out, uint32_t sequence); my files(erpc_matrix_multiply_server.h): erpc_status_t erpcMatrixMultiply_shim(erpc::Codec * codec, uint32_t sequence); why files are different , Am i missing any config ? Do i need to manually edit erpc_matrix_multiply_server.h & erpc_matrix_multiply_server.cpp Thank you in advance Chandini
查看全文
Porting Micro-ROS on Frdm-MCXN947 1. Overview The MCXN947 chip is a highly integrated microcontroller featuring robust processing capabilities, extensive peripheral support, and advanced security features. It is suitable for a wide range of complex applications. The NXP FRDM-MCXN947 board is a low-cost design and evaluation board based on the MCXN947 device. NXP provides a comprehensive set of tools and software support for the MCXN947, including hardware evaluation boards, an integrated development environment (IDE), example applications, and drivers. Micro-ROS is an embedded version of ROS 2 specifically designed to operate on embedded systems, enabling real-time control and communication for robotics and embedded devices. It extends the powerful features of ROS 2 to resource-constrained embedded platforms like microcontrollers and embedded systems. The introduction of Micro-ROS facilitates tighter integration between embedded systems and the ROS 2 ecosystem, enabling advanced robotic automation and control. This document explores the process of porting Micro-ROS to the MCXN947 board.‌ Harry_Zhang_0-1733195688906.png This document explores the process of porting Micro-ROS to the MCXN947 board. Hardware Environment:     FRDM-MCXN947 Software Environment:     Ubuntu 22.04     IDE:MCUXpresso IDE v11.9.0     SDK:SDK Builder | MCUXpresso SDK Builder (nxp.com) 2. ROS 2 Architecture Before delving into the Micro-ROS porting process, let us briefly introduce the new ROS 2 architecture. This is necessary because Micro-ROS heavily leverages ROS 2's abstraction layer source code in its design and implementation. Compared to its predecessor ROS 1, ROS 2 employs a distinct communication mechanism, most notably adopting the DDS (Data Distribution Service) protocol for communication and node discovery. ROS 1, by contrast, relies on the XML-RPC protocol and requires the master node to launch before other nodes can join. ROS 1's limited support for embedded devices stems from the XML-RPC mechanism, which introduces significant software dependencies in these environments. To address this issue, projects like rosserial developed lightweight communication protocols tailored for MCU-to-PC master node communication. ROS 2, on the other hand, integrates the industry-proven DDS protocol, which has demonstrated its stability in domains like military, aerospace, and financial systems. It is important to note that DDS is a standard protocol with various implementations, such as Cyclone DDS (Eclipse), Fast DDS, and Micro XRCE-DDS (eProsima). To ensure that upper-layer ROS 2 code remains unaffected by different DDS implementations, ROS 2 defines a series of abstract layer interfaces, such as RCL (ROS Client Library) and RMW (ROS Middleware). These DDS implementations provide a uniform RMW interface. On top of RMW is the RCL, implemented in C, which supports various programming languages, including C++, Python, and Java. Thus, successfully porting ROS 2 to a real-time operating system (RTOS) hinges on the RTOS supporting a specific DDS implementation and its corresponding RMW interface. Only then can upper-layer RCL and ROS application code run without modification. ROS 2 comprises RCL (ROS Client Library), RMW (ROS Middleware Interface), and DDS (Data Distribution Service). Porting ROS 2 to a new platform essentially involves creating a compatible RMW-DDS combination, leaving the RCL layer unaltered. Micro-ROS provides such an RMW-DDS combination. Specifically, Micro-ROS employs Micro XRCE-DDS (a DDS standard designed for extremely resource-constrained environments) with a corresponding RMW implementation. This enables Micro-ROS to be compatible with ROS 2's architecture while efficiently running on resource-limited embedded devices. Thus, porting Micro-ROS to different hardware platforms fundamentally involves interfacing communication protocols like UART (Universal Asynchronous Receiver-Transmitter) and UDP (User Datagram Protocol) with the Micro-ROS RMW-DDS combination. This process ensures effective communication between Micro-ROS and other nodes or external systems while maintaining the lightweight and efficient characteristics suitable for embedded devices. Harry_Zhang_1-1733196001201.png From the above introduction, we can see that MicroROS transplantation mainly has two parts: Connect UART/UDP communication and clock to implement the 5 functions in default_transport.cpp. Folder DDS+RMW+RCL generates libmicroros.a static library. 3. Micro-ROS Static Library Toolchain and Environment Configuration 3.1 Micro-ROS Static Library Toolchain and Environment Configuration First, install ROS 2 on Ubuntu 22.04 LTS and run the following commands: sudo apt update&&sudo apt install locales sudo locale-gen en_US en_US.UTF-8 sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 export LANG=en_US.UTF-8 sudo apt update && sudo apt install curl gnupg lsb-release sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg (1) sudo apt update: Updates the system’s package list to fetch the latest package information. (2) sudo apt install locales: Installs the locales package, which provides tools for managing and configuring localization. (3) sudo locale-gen en_US en_US.UTF-8: Generates the localization settings for US English, including UTF-8 encoding. (4) sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8: Updates the system’s localization settings to use UTF-8 encoding for US English. (5) export LANG=en_US.UTF-8: Sets the current terminal’s language encoding to US English UTF-8. (6) sudo apt install curl gnupg lsb-release: Installs additional tools (curl for network requests, gnupg for encryption, lsb-release for distribution information). (7) sudo curl: Downloads the ROS public key for verifying package integrity. 3.2 Installing ROS on Ubuntu Set up and build the Micro-ROS development environment with the following commands: sudo apt update && sudo apt upgrade && sudo apt install ros-humble-desktop source /opt/ros/humble/setup.bash && echo “source /opt/ros/humble/setup.bash” >>~/.bashrc source /opt/ros/$ROS_DISTRO/setup.bash mkdir uros_ws && cd uros_ws git clone -b iron https://github.com/micro-ROS/micro_ros_setup.git src/micro_ros_setup rosdep update && rosdep install --from-paths src --ignore-src -y colcon build source install/local_setup.bash ros2 run micro_ros_setup create_firmware_ws.sh generate_lib (1) Update the software and install ROS (Robot Operating System) (2) Set and save the configuration of the ROS environment. (3) These two commands create a new directory uros_ws (workspace), and then switch to this directory. (4) Clone the project named micro_ros_setup from the GitHub repository and place it in the src directory of the workspace. (5) These two commands are used to install the dependencies required by the project. (6) This command uses the colcon build system to compile and install the project. Colcon is a general-purpose build tool suitable for multiple programming languages and platforms. (7) create_firmware_ws.sh: This is the name of the executable file to be run. It might be a script that creates a firmware workspace. The purpose of this command is to run the create_firmware_ws.sh script in the micro_ros_setup package and pass the parameter generate_lib to generate a firmware workspace containing the Micro-ROS library. This step requires downloading a large amount of source code from github. After failure, the next generation will prompt that the firmware already exists and you need to rm this folder. If the following picture appears, it proves that the code download is successful. Harry_Zhang_2-1733196354824.png 4. Generating the Micro-ROS Static Library If the toolchain and environment setup are successful, you should have five folders in your workspace: build, firmware, install, log, and src. Harry_Zhang_3-1733196629781.png The firmware folder contains the Micro-ROS workspace. 4.1 Configure the toolchain.cmake file according to the target processor Enter the fireware directory. The colcon.meta and toolchain.cmake inside are the configuration files we need to specify to generate the static library. Colcon.meta describes the configuration of our micro-ros, and toolchain.cmake describes the microcontroller platform. We can open MCUXpresso to find MCXN947 related configuration. and create toolchain.cmake. set(CMAKE_SYSTEM_NAME Generic) set(CMAKE_CROSSCOMPILING 1) set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) # SET HERE THE PATH TO YOUR C99 AND C++ COMPILERS set(PIX /opt/gcc-arm-none-eabi-10.3-2021.10/bin) set(CMAKE_C_COMPILER ${PIX}/arm-none-eabi-gcc) set(CMAKE_CXX_COMPILER ${PIX}/arm-none-eabi-g++) set(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "") set(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "") # SET HERE YOUR BUILDING FLAGS set(FLAGS "-O2 -ffunction-sections -fdata-sections -fno-exceptions -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -nostdlib -mthumb --param max-inline-insns-single=500 -D'RCUTILS_LOG_MIN_SEVERITY=RCUTILS_LOG_MIN_SEVERITY_NONE'" CACHE STRING "" FORCE) set(CMAKE_C_FLAGS_INIT "-std=c11 ${FLAGS} -DCLOCK_MONOTONIC=0 -D'__attribute__(x)='" CACHE STRING "" FORCE) set(CMAKE_CXX_FLAGS_INIT "-std=c++11 ${FLAGS} -fno-rtti -DCLOCK_MONOTONIC=0 -D'__attribute__(x)='" CACHE STRING "" FORCE) set(__BIG_ENDIAN__ 0) The above is how cmake is written. Among them, "-mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard": These options specify the architecture and floating point unit characteristics of the target processor. We can view the architecture and floating point unit characteristics of the MCXN947's target processor. Harry_Zhang_4-1733196734969.png We can open MCUXpresso IDE, open a MCXN947 project, and check mcpu=cortex-m33 -mfpu=fpv5-sp-d16 mfloat-abi=hard in All options in settings->MCU Linker. Therefore, the MCXN947 series is an M33 core. We need to change -mcpu=cortex-m7 to -mcpu=cortex-m33, and basically no other changes are needed. From this we can also see that a series of static libraries produced should be universal! 4.2 Configure the colcon.meta file according to Micro-ROS requirements The other file created sets the Micro-ROS library configurations. To set the transport layer type, here we want a custom transport layer, the configuration “-DUCLIENT_PROFILE_CUSTOM_TRANSPORT=ON” is set to “ON” and the configuration “-DRMW_UXRCE_TRANSPORT=custom” is set to “custom”. The other interesting settings are under the “rmw_microxrcedds” section. Here we can set the maximum number of nodes (1), publisher (5), subscribers (5), services (1) and clients (1) that should be supported, as well as the maximum message history (4) used for a reliable QoC mode. A more detailed description of all settings under this section, can be found in the eProsima Micro XRCE-DDS GitHub. An example configuration, the one I used, is shown below: touch colcon.meta { "names": { "tracetools": { "cmake-args": [ "-DTRACETOOLS_DISABLED=ON", "-DTRACETOOLS_STATUS_CHECKING_TOOL=OFF" ] }, "rosidl_typesupport": { "cmake-args": [ "-DROSIDL_TYPESUPPORT_SINGLE_TYPESUPPORT=ON" ] }, "rcl": { "cmake-args": [ "-DBUILD_TESTING=OFF", "-DRCL_COMMAND_LINE_ENABLED=OFF", "-DRCL_LOGGING_ENABLED=OFF" ] }, "rcutils": { "cmake-args": [ "-DENABLE_TESTING=OFF", "-DRCUTILS_NO_FILESYSTEM=ON", "-DRCUTILS_NO_THREAD_SUPPORT=ON", "-DRCUTILS_NO_64_ATOMIC=ON", "-DRCUTILS_AVOID_DYNAMIC_ALLOCATION=ON" ] }, "microxrcedds_client": { "cmake-args": [ "-DUCLIENT_PIC=OFF", "-DUCLIENT_PROFILE_UDP=OFF", "-DUCLIENT_PROFILE_TCP=OFF", "-DUCLIENT_PROFILE_DISCOVERY=OFF", "-DUCLIENT_PROFILE_SERIAL=OFF", "-UCLIENT_PROFILE_STREAM_FRAMING=ON", "-DUCLIENT_PROFILE_CUSTOM_TRANSPORT=ON", "-DUCLIENT_PROFILE_SHARED_MEMORY=ON", "-DUCLIENT_SHARED_MEMORY_MAX_ENTITIES=20" ] }, "rmw_microxrcedds": { "cmake-args": [ "-DRMW_UXRCE_MAX_NODES=5", "-DRMW_UXRCE_MAX_PUBLISHERS=6", "-DRMW_UXRCE_MAX_SUBSCRIPTIONS=4", "-DRMW_UXRCE_MAX_SERVICES=6", "-DRMW_UXRCE_MAX_CLIENTS=1", "-DRMW_UXRCE_MAX_HISTORY=4", "-DRMW_UXRCE_TRANSPORT=custom" ] } } } 4.3 Building the Micro-ROS Static Library Run the following commands: source install/local_setup.bash ros2 run micro_ros_setup build_firmware.sh $(pwd)/firmware/toolchain.cmake $(pwd)/firmware/colcon.meta If the static library is successfully generated, you will see libmicroros.a in the firmware/build file. Harry_Zhang_5-1733197118503.png 5. Integrating and Testing the Static Library Locally 5.1 Adding the Generated Micro-ros Static Library to the Local Project Harry_Zhang_6-1733197148946.png (1) Create a folder named bsp_include. Harry_Zhang_7-1733197224655.png (2) Add all files from the include directory into your project under bsp_include. (3) Add all paths in the include file to the include path. Harry_Zhang_8-1733197237901.png (4) Add the generated libmicroros.a static library to the project, for example, add it to bsp_include. Harry_Zhang_9-1733197313200.png (5) Add the libmicrorots.a static library and name path to Libraries(-l) and Library search path(-L). 5.2  Implementing the Serial Communication Interface Functions To port Micro-ROS to an MCU, you must provide transport layer functionalities for reading and writing through the communication interface. The required transport functions are defined as follows: rmw_ret_t rmw_uros_set_custom_transport( bool framing, void * args, open_custom_func open_cb, close_custom_func close_cb, write_custom_func write_cb, read_custom_func read_cb); ​ Through this structure, we can see that the communication interface function group mainly includes open, close, write, and read. open: This function is responsible for initializing (opening) peripheral devices used by the transport layer. This function is empty if the peripheral is initialized elsewhere and before the Micro-ROS function is called. close: This function is responsible for deinitializing (turning off) peripherals used by the transport layer. Because there is no need to deinitialize the function. This function is also empty. write: This function is responsible for writing data (bytes) on the peripheral device. The number of bytes to be written and the bytes themselves are given as parameters "len" and "buf" respectively. read: This function is responsible for reading data (bytes) from the peripheral device. The number of bytes to read is specified in the function parameter "len" and bytes should be returned via the function parameter "buf". bool transport_close(struct uxrCustomTransport * transport) { return true; } bool transport_open(struct uxrCustomTransport * transport) { return true; } size_t transport_write(struct uxrCustomTransport* transport, const uint8_t * buf, size_t len, uint8_t * err) { LPUART_WriteBlocking(DEMO_LPUART, buf, len); return len; } size_t transport_read(struct uxrCustomTransport* transport, uint8_t* buf, size_t len, int timeout, uint8_t* err) { LPUART_ReadBlocking(DEMO_LPUART, buf, len); return len; } Additionally, you need to implement a function to provide the system’s clock time. This clock does not have to provide real-time or world time, but rather elapsed time since startup or similar. For example: int clock_gettime(clock_t unused, struct timespec *tp) { (void)unused; IRTC_GetDatetime(RTC, &datetimeGet); tp->tv_sec = datetimeGet.second; tp->tv_nsec = (long)(datetimeGet.second) * 1000000; return 0; } 5.3 Testing To run Micro-ROS in practice, the setup includes two components: 1. A client running on the MCU. 2. An agent running on the host PC. Basic Micro-ROS Client (MCU) Below are the minimal steps and code needed to create and run a Micro-ROS client. These instructions are based on the Micro-ROS documentation for node creation. //Required global variables rcl_allocator_t allocator; rclc_support_t support; rcl_node_t node; rclc_executor_t executor; rmw_ret_t error; //Set Communication functions rmw_uros_set_custom_transport( true, NULL, rtt_transport_open, rtt_transport_close, rtt_transport_write, rtt_transport_read ); //Set Allocation functions (Optional) rcl_allocator_t allocator = rcutils_get_zero_initialized_allocator(); allocator.allocate = rtt_allocate; allocator.deallocate = rtt_deallocate; allocator.reallocate = rtt_reallocate; allocator.zero_allocate = rtt_zero_allocate; (void)!rcutils_set_default_allocator(&allocator); //Get allocator allocator = rcl_get_default_allocator(); //Create init_options error = rclc_support_init(&support, 0, NULL, &allocator); //Create node error = rclc_node_init_default(&node, "uROS_Terminal", "", &support); //Create executor error = rclc_executor_init(&executor, &support.context, 1, &allocator); //Call the executor periodically e.g. in the while(1) loop or a thread: while(1) { error = rclc_executor_spin_some(&executor, RCL_MS_TO_NS(100)); } ​ Setting up the Micro-ROS Agent (PC) The agent establishes an interface between the Micro-ROS client on the MCU and ROS 2 on the host PC. To set up the agent: # Go to the Micro-ROS workspace folder cd microros_ws # Source ROS 2 source /opt/ros/humble/setup.bash # Source local packages source install/local_setup.bash # Create Agent ros2 run micro_ros_setup create_agent_ws.sh # Build Agent ros2 run micro_ros_setup build_agent.sh # Possible ROS Update sudo rosdep init rosdep update  After successfully building the Micro ROS agent, the following bash command starts/runs the agent: # Go to the Micro-ROS workspace folder cd microros_ws # Source ROS 2 source /opt/ros/humble/setup.bash # Source local packages source install/local_setup.bash # Run Agent (serial connection) ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyACM0 Of these bash commands, the last one is the one that actually starts the Micro-ROS agent. It takes several parameters, the first is the type of connection to use, in this case a serial connection. Then there are two parameters that only apply to serial connections: "--dev/ttyACM0", which sets the serial interface to be used (to list all serial interfaces in linux, you can use the following bash command: "dmesg | grep tty".) After starting the Micro-ROS agent, the MCU can connect to the host PC via the serial interface and reset to establish a new connection. If the following Micro-ROS agent terminal output: Harry_Zhang_10-1733198156377.png This proves the success of transplanting Micro-Ros On Frdm-mcxm947.
查看全文
LS1043ARDB - How to update DPAA1 FMan microcode (ucode) image on SD card Follow these steps to update the DPAA1 FMan ucode image on the SD card.  Obtaining DPAA1 FMan ucode image Clone the qoriq-fm-ucode repository. $ git clone https://github.com/NXP/qoriq-fm-ucode.git $ cd qoriq-fm-ucode $ git checkout LSDK- . For example, $ git checkout LSDK-19.06 The prebuilt FMan ucode images, fsl_fman_ucode_ls1043_r1.1_ .bin , are at qoriq-fm-ucode/. In the binary file, ls1043_r1.1 refers to the LS1043A silicon revision 1.1. See qoriq-fm-ucode/readme for a description of the ucode version numbers. SD card start block number for DPAA1 FMan ucode image Image  SD card start block number DPAA1 FMan ucode image 0x04800 = 18432 Refer Flash layout for new boot flow with TF-A for complete listing of the SD card start block numbers for all LSDK firmware images. Programming DPAA1 FMan ucode image to SD card Option 1: Load image on SD card plugged into Linux host via dd command Plug the SD card into the Linux host. Run the following command on the Linux host: $ sudo dd if=fsl_fman_ucode_ls1043_r1.1_ .bin  of=/dev/sdX bs=512 seek=18432 conv=fsync Use the command cat /proc/partitions to see a list of devices and their sizes to make sure that the correct device names have been chosen. The SDHC storage drive in the Linux PC is detected as /dev/sdX, where X is a letter such as a, b, c. Make sure to choose the correct device name, because data on this device will be replaced. If your Linux host machine supports read/write SDHC card directly without an extra SDHC card reader device, the device name of SDHC card is typically mmcblk0.                                                   Remove the SD card from the Linux host machine. Plug the SD card into LS1043ARDB and boot the board to Ubuntu using the SD card. You can boot the board using the SD card either by: setting the switches: SW3[1:8] = 10110011, SW4 [1:8] =00100000 , SW5 [1:8] = 00100010, or boot switching to SD card => cpld reset sd In boot log, you’ll see: Board: LS1043ARDB, boot from SD You can check the following code line in the boot log to confirm that the DPAA1 FMan ucode image on the SD card is updated. Fman1: Uploading microcode version 106.4.18 If U-Boot does not find LSDK on the SD card, it will boot TinyDistro from lsdk_linux_arm64_tiny.itb stored on the SD card. Option 2: Load image on SD card plugged into board from the TFTP server Boot LS1043ARDB from NOR flash. Ensure that the switches are set to boot the board from NOR bank 0. For booting from NOR bank 0, switch settings are as follows: SW3[1:8] = 10110011 SW4[1:8] = 00010010 SW5[1:8] = 10100010 Boot from NOR bank 0: => cpld reset For LS1043ARDB, in boot log, you'll see: Board: LS1043ARDB, boot from vBank 0 Set up Ethernet connection When board boots up, U-Boot prints a list of enabled Ethernet interfaces. FM1@DTSEC1, FM1@DTSEC2, FM1@DTSEC3 [PRIME], FM1@DTSEC4, FM1@DTSEC5 Set server IP address to the IP address of the host machine on which you have configured the TFTP server.  => setenv serverip Set ethact and ethprime as the Ethernet interface connected to the TFTP server. See LS1043ARDB Ethernet and FMC port mapping for the mapping of Ethernet port names appearing on the chassis front panel with the port names in U-Boot and Linux.                        => setenv ethprime For example: => setenv ethprime FM1@DTSEC4 => setenv ethact For example: => setenv ethact FM1@DTSEC4 Set IP address of the board. You can set a static IP address or, if the board can connect to a dhcp server, you can use the dhcp command.  Static IP address assignment: => setenv ipaddr => setenv netmask Dynamic IP address assignment: => dhcp Save the settings. => saveenv Check the connection between the board and the TFTP server. => ping $serverip Using FM1@DTSEC4 device host 192.168.1.1 is alive Load FMan ucode image from the TFTP server Flash the FMan ucode image: => tftp 0xa0000000 fsl_fman_ucode_ls1043_r1.1_ .bin Program the FMan ucode image to SD card: => mmc write 0xa0000000 0x04800  Address  0x04800 is the SD card block number for the FMan ucode image.  ReferFlash layout for new boot flow with TF-A for the complete flash memory layout. Here, blk_cnt refers to number of blocks in SD card that need to be written as per the file size. For example, when you load FMan ucode from the TFTP server, if the bytes transferred is 37560 (92b8 hex), then blk_cnt is calculated as "37560/512 = 73 (49 hex)" + "few sectors for rounding up so that last block is not missed". So, if you round up by 5 (5 hex) sectors, for this example, mmc write command will be: => mmc write 0xa0000000 0x04800 4E You can boot the board using the SD card either by: setting the switches: SW3[1:8] = 10110011, SW4 [1:8] =00100000 , SW5 [1:8] = 00100010, or boot switching to SD card => cpld reset sd In boot log, you’ll see: Board: LS1043ARDB, boot from SD You can check the following code line in the boot log to confirm that the DPAA1 FMan ucode image on the SD card is updated. Fman1: Uploading microcode version 106.4.18 If U-Boot does not find LSDK on the SD card, it will boot TinyDistro from lsdk_linux_arm64_tiny.itb stored on the SD card. QorIQ LS1 Devices Re: LS1043ARDB - How to update DPAA1 FMan microcode (ucode) image on SD card I think it will be good to have also a section where you show how we write the sd card from u-boot in case we do not have a card reader on the host
查看全文
[S32K324 / 定制板] HSE 固件已安装 (0x4039C028=1) 但初始化失败 (0x4038C107=0) 大家好, 我正在寻求有关 S32K324 定制板上 HSE 固件初始化无法完成的问题的建议。 1. 开发环境 MCU:S32K324(定制板) HSE固件:s32k3x4_hse_fw_1.5.0_2.55.0_pb250130.bin.pink 调试器:S32DS + T32 (Trace32) 2. 进度和状态登记册 已成功在 UTEST 区域 (0x1B000000) 中编程 HSE FW 使用标志。 已将粉色图像二进制文件下载到闪存中。 执行上电复位(POR)后,状态寄存器如下: 0x4039C028 (HSE GPR): 0x01 (安装已确认) 0x4038C107 (HSE_STATUS_INIT_OK): 0x00 (启动过程中停止) 3. 问题 我想请教各位专家以下问题: 我首先应该检查什么? 由于安装成功但初始化失败,是否有任何特定的寄存器(例如,故障状态)或硬件信号需要检查以找出确切的原因? 自定义板环境是否会影响初始化失败? 由于我使用的是定制板,我怀疑硬件差异(例如,初始晶振频率)或主核心(M7)的早期时钟(PLL)配置代码可能会干扰 HSE 启动序列。如果这是一个已知问题,能否指导我推荐的启动顺序(例如,在进行任何时钟设置之前轮询 INIT_OK 标志)或可能的解决方案? 任何线索都将对我们大有帮助。感谢您的支持! Re: [S32K324 / Custom Board] HSE FW Installed (0x4039C028=1) but Init Failed (0x4038C107=0) 您好, 非常感谢您提供的清晰指导。 首先,我使用演示应用程序进行固件安装,然后在系统启动状态下转储 MU 和 HSE GPR 寄存器值。如果这些注册地址有任何错误,请告知我。 结果如下: 1. MU0 寄存器(基地址:0x4038C000) 화면 캡처 2026-06-25 094427.png 화면 캡처 2026-06-25 095601.png 화면 캡처 2026-06-25 095727.png   화면 캡처 2026-06-25 095747.png   2. HSE GPR 寄存器(基地址:0x4039C000) 화면 캡처 2026-06-25 094944.png   请您审核一下这些数值好吗?我非常希望您能提供专业意见,帮我判断这些是否表明存在具体的错误原因,例如时钟配置冲突或固件认证失败。 再次感谢您的时间和支持! Re: [S32K324 / Custom Board] HSE FW Installed (0x4039C028=1) but Init Failed (0x4038C107=0) 请问您能否提供以下信息? MU寄存器、FSR、GSR等: HSE GPR3: Re: [S32K324 / Custom Board] HSE FW Installed (0x4039C028=1) but Init Failed (0x4038C107=0) 谢谢。但我需要看到 HSE 核心处于 WFI 状态时的屏幕截图,而不是 RESET 后立即显示的屏幕截图。
查看全文
KeilとIARデュアルコアによるMCXN 947の設定とデバッグ こんにちは、NXPさん。 KeilとIARにおけるMCXN947のデュアルコア構成とデバッグに関するアプリケーションノートが見つかりません。 この資料を提供していただくことで、私たちを支援していただけると幸いです。 ありがとうございました。 MCX N Re: Keil and IAR dual core configure and debug for MCXN 947 こんにちは、 @jimmyli さん、 申し訳ありませんが、KeilまたはIARにおけるMCXN947のデュアルコア構成およびデバッグに関するANは提供しておりません。 ただし、NXPは、KeilおよびIARでデュアルコアMCXN947プロジェクトをセットアップ、構成、デバッグするのに役立つ公式リソースをいくつか提供しています。 1. NXPのMCUXpresso SDKには、MCXN9xxプラットフォーム上でアプリケーションを構築およびデバッグする方法を示すIARプロジェクトの例(hello_world、TrustZoneなど)が含まれています。 これらの例は、IAR Embedded Workbench の正しいプロジェクト構造、ビルド設定、およびデバッグ手順を示しています。 IARを使用したデモアプリケーションの実行 — MCUXpresso SDKドキュメント 2. デュアルコアのリファレンスコードはGitHubで公開されています NXPは、MCXN947向けのオープンソースのデュアルコア通信サンプルをGitHubで提供しています。 これらのリポジトリには、core0とcore1の両方の構成、およびIARとKeilのコンパイラサポートが含まれており、デュアルコアプロジェクトの設定の参考として役立ちます。 dm-dual-core-i2c-communication-on-mcxn947/dm_dual_core_i2c_MASTER/device/system_MCXN947_cm33_core0.h at main · nxp-appcodehub/dm-dual-core-i2c-communication-on-mcxn947 · GitHub Keil/IAR 用の SDK zip パッケージは、 SDK Builderからも入手できます。お客様参考資料として、デュアルコアの例を多数掲載しています。 SDK Builderの使用方法、およびデモプロジェクトをIAR/KEILにインポートする方法については、以下のドキュメントを参照してください。 SDK Builder — MCUXpresso SDK ドキュメント お役に立てれば幸いです。 BR セレステ Re: Keil and IAR dual core configure and debug for MCXN 947 こんにちは、セレステさん。 それを得る。 どうもありがとうございました。 ところで、KeilとIARでデュアルコアプロジェクトを開発する方法について説明したドキュメントがあればいいなと思っています。プロジェクト構成の詳細、コンパイル方法、デバッグ方法、結合バイナリの生成とダウンロード方法などを示すドキュメントです。これは、mcxn947 によってお客様がプロジェクトを理解し、開発するのに非常に役立ちます。 再度、感謝します。              Re: Keil and IAR dual core configure and debug for MCXN 947 こんにちは、 @jimmyli さん、 ご提案ありがとうございます。社内チームに伝え、そのようなドキュメントを公開することを検討します。 BR セレステ Re: Keil and IAR dual core configure and debug for MCXN 947 こんにちは、セレステさん。 ありがとう。
查看全文
CAAMのパフォーマンス こんにちは、 添付のプロジェクト例(SDK 25.06.00 CAAM サンプルから派生したもの)では、CRC のみを計算して CAAM のパフォーマンスを測定したいと考えています。実際、サンプルを実行してみたところ、すぐに動作が遅すぎると感じました。これを実現するために、私はDWT->CYCCNTレジスタを使用します。 ソフトウェアによる実装とも比較してみました。 RT1170-EVKBで実行したところ、以下の結果が得られました。 Screenshot_2026-03-21_18-25-56.png   最初の計算がCAAMのようなアクセラレータにとって既に遅すぎるように思えるなら(ソフトウェア実装よりもさらに遅い)、2番目の計算はとんでもないものだ。 何が問題なのですか?SDKのバグかもしれません。 よろしくお願いいたします 最大 Re: CAAM performaces こんにちは@Kan_Li ご返信ありがとうございます。 残念ながら、あなたの回答はまさに私が抱いていた懸念を裏付けるものでした。添付されたプロジェクトファイルは、返信前に開かれることすらなかったようです。 私がこう言う理由は非常に単純かつ客観的です。プロジェクトは既にCAAM_CRC()を使用しているからです。それは私が見落としていた理論上の可能性でも、試すのを忘れていた代替手段でもありません。添付の例に既に示されており、私の測定結果ではまさにその経路が最も悪い結果を示しました。 Screenshot_2026-03-24_09-20-48.png 念のためもう一度明確にしておきますが、私はドライバの使い方に関する一般的な質問を投稿したわけではありません。NXPのサポート担当者が直接ビルド、実行、動作確認ができるように、SDKのサンプルを基にした完全なプロジェクトを作成し、添付しました。 同じCRCの計算結果を比較しました。 ソフトウェアにおいて CAAMと共に そして結果はまさに私が報告している問題点そのものでした。ハードウェアアクセラレータとしては、測定された性能が予想外に悪く、テストしたケースの一つでは、ソフトウェア実装よりも著しく劣っていました。 それが問題なのです。 「CAAM_CRC() を試してみる」ということではありません。 それは既に済んでいます。 お客様がすぐに実行できるプロジェクトを添付する場合、通常はフォーラムのストレージ容量、ネットワーク帯域幅、または誰かの時間を無駄にしないためです。なぜなら、お客様はサポートが問題を実践形式で再現することを期待しているからであり、特にプロジェクトがその目的のために既に最小化されている場合はなおさらである。 添付された再現プロジェクトが回答前に実際に検証されるという考えに、私は過信しすぎているのかもしれない。もしそうなら、それは私の責任です。 しかし、完全な再現手順が添付された技術的な投稿に対して、このようなレベルの対応しかされないのであれば、多くのユーザーが受けるサポートの質について不満を漏らすのも当然と言えるでしょう。 それでは、誤解の余地が全くないような形で質問を言い換えてみましょう。 添付のプロジェクトは既にCAAM_CRC()を使用しています。 DWT->CYCCNTを用いてサイクル数を計測しました。 同じターゲットに対して、ソフトウェアCRCとCAAM CRCを比較しました。 CAAMの性能は予想よりも悪く、あるケースではソフトウェアと比べて非常に大きな差で劣っていた。 これらの事実を踏まえ、NXP社には以下のいずれかを実施していただきたい。 添付のプロジェクトを使用して結果を再現してください。 オーバーヘッドがどこから発生するのか説明してください。 これがSDK/ドライバーの問題であるかどうかを明記してください。 または、これらの業績数値は予想値であることを明確に述べる。 添付の例自体によって既に矛盾している提案よりも、具体的な技術分析の方がはるかにありがたいです。 よろしくお願いします、 マックス Re: CAAM performaces こんにちは、 @mastupristi さん。 SDKのサンプルでは、CRCの初期化、更新、および終了の各関数が別々に使用されています。ドライバには、代わりに使用できるワンタイムのCAAM_CRC()関数があり、そちらの方が高速であるはずです。CAAM_CRC() を使ってみて、違いが出るかどうか確認してください。 すてきな一日を、 カン ------------------------------------------------------------------------------- 注記: この投稿があなたの質問への回答になっている場合は、「正解としてマーク」ボタンをクリックしてください。ありがとう! - 最後の投稿から7週間はThreadをフォローしますが、それ以降の返信は無視されます。 後日、関連する質問がある場合は、新しいThreadを作成し、閉じられたThreadを参照してください。 ------------------------------------------------------------------------------- Re: CAAM performaces こんにちは、 @mastupristi さん。 ごめんなさい、私のミスです!CRCエンディアンに関する別のプロジェクトを拝見しました。私のプロジェクトビューでは、あなたのプロジェクトが非常に似通っており、main() 関数もほぼ同じです。見落としてしまい申し訳ありません。   異なるCRC入力データ長であなたのプロジェクトをテストしたところ、CRC処理対象のデータが十分に長い場合(例えば、テストで使用したデータ長の2倍)、CRC初期化、更新、終了に基づくハードウェア計算はソフトウェア実装よりも優れていることがわかりました。しかし、CAAM_CRC()は常にテストで最悪のケースでした。現在、この問題について社内で調査しており、詳細が分かり次第お知らせします。 2026-03-24_19-04-07.png お待ちいただきありがとうございます! すてきな一日を、 カン ------------------------------------------------------------------------------- 注記: この投稿があなたの質問への回答になっている場合は、「正解としてマーク」ボタンをクリックしてください。ありがとう! - 最後の投稿から7週間はThreadをフォローしますが、それ以降の返信は無視されます。 後日、関連する質問がある場合は、新しいThreadを作成し、閉じられたThreadを参照してください。 ------------------------------------------------------------------------------- Re: CAAM performaces こんにちは、 @mastupristi さん。 どうやら私のボードに何か問題があるようです。別のRT1170EVKBボードを使ってみたところ、以下の結果になりました。 2026-03-25_18-57-37.png 別のボードで再度試すことはできますか? すてきな一日を、 カン ------------------------------------------------------------------------------- 注記: この投稿があなたの質問への回答になっている場合は、「正解としてマーク」ボタンをクリックしてください。ありがとう! - 最後の投稿から7週間はThreadをフォローしますが、それ以降の返信は無視されます。 後日、関連する質問がある場合は、新しいThreadを作成し、閉じられたThreadを参照してください。 ------------------------------------------------------------------------------- Re: CAAM performaces こんにちは@Kan_Li 3つのボードと合計4つのテストにおいて、非常に異なる行動と非常に異なる数値が見られることに懸念を抱いています。 ここで一つ覚えておいていただきたいのは、CAAMはMCUの内部ペリフェラルであり、MCU内部のRAMと相互作用するということです。取締役会の外部コンポーネントのうち、現実的に考えて、CAAMにこれほど重大かつ一貫性のない影響を与える可能性のあるものは何だろうか? 現段階では、根本的な問題は実はMCU側にあるのではないかと検討するのは妥当と思われる。 これが私のEVKに搭載されているものです rt1176.png また、3回のテストで得られた数値は、具体的にどのような条件下で得られたものなのか、詳しく教えていただけますでしょうか?特に: どのボードが使用されたか、 どのMCUが搭載されていたか、 また、設定や条件に関して、他に何か関連する違いがあったかどうかも確認した。 最も重要なのは、私の数字とあなたの数字の差をどのように説明するのかということです。 現時点では、さらなるテストに使用できる他の基板がありません。 よろしくお願いします。 最大   Re: CAAM performaces こんにちは、 @mastupristi さん、 私のデバイスはMIMXRT1176DVMAA/0P94B/CTAS2152Aで、あなたのものと同じです。私のテストでは、あなたのコードのデバッグ前にフラッシュメモリで実行中のプログラムが起動しないように、ブートモードをシリアルダウンロードモードに設定し、SRAMであなたのコードを実行しました。あなたも同じようにしましたか?あなたのボード間で結果を共有していただけますか? よろしくお願いいたします。 カン Re: CAAM performaces こんにちは@Kan_Li 「アプリケーションをRAMにリンクする」を試してみました(プロジェクトを添付)。 Screenshot_2026-04-14_09-28-09.png この設定で、以下の結果が得られました。 mastupristi_0-1776151857026.png ご覧のとおり、状況は大幅に改善されていますが、本当に驚くべきことは、CAAMを使用した最初のCRC計算にかかる時間が、ソフトウェア版と同じであるということです。 CAAM(CAAM_CRC())を使用した最新のCRC計算には3億3700万サイクルかかります(以前は14億2200万サイクルかかっていたので、わずか4分の1に減っただけです)。 このマイクロコントローラを搭載した別のEVKBを借りることができました mastupristi_2-1776152915756.png 以下のような結果が得られました。 mastupristi_1-1776152680926.png つまり、ソフトウェアの実装は両方のボードで全く同じように動作するということです。それは驚くべきことではない。むしろ、私が予想していた通りだ。 最初のCAAMはわずかに時間がかかるだけであるのに対し、2回目のCAAMは大幅に短い時間(2億5200万サイクル)で完了する。 注意点として、憶測を立てる前に、コードを確認して、「第一」と「第二」のソフトウェアとハードウェアの意味を理解してください。 以下に概要を示します。 SW CRC32 iSCSI SW CRC16 CCITT HW (CAAM) CRC32 iSCSI (初期化、更新、最終処理を個別に呼び出し) HW (CAAM) CRC16 CCITT (CAAM_CRC() を呼び出し中) これは私にとって多くの疑問を抱かせる。 特に4位の成績に見られるこの一貫性のなさは、非常に懸念される。何が原因ですか? このアクセラレータは、ソフトウェアによる実装と比較して、全く処理速度を向上させていないようだ。本当にそうなのでしょうか?それとも私が何か見落としているのでしょうか? よろしくお願いします。 最大 Re: CAAM performaces こんにちは、 @mastupristi さん。 4番目の検査結果については現在も社内で確認中です。新たな情報が入り次第、ご連絡いたします。 他のテストでは、ソフトウェア/ハードウェア別にデータをさらに計算しましたか?コア上で動作するソフトウェアはキャッシュからある程度の恩恵を受けるが、データ量が増えると、その差が顕著になる。 よろしくお願いいたします。 カン Re: CAAM performaces こんにちは、 @mastupristi さん。 内部の後。議論の結果、問題の原因はDCACHEの無効化であることが判明しました。 このプロジェクトではキャッシュのライトスルー("CACHE_MODE_WRITE_THROUGH=1") 設定を使用しており、マクロ("CAAM_OUT_INVALIDATE") も有効になっているため、DCACHE 無効化機能によって機能のパフォーマンスが低下します。これは、主にミドルウェアにおけるデータ整合性の問題を回避するために、SDKのサンプルに実装されています。ERR050396(下記参照)のため、TCMは書き込みには使用できません。 以下は、その関数の測定値です。 Kan_Li_0-1779782204663.png Kan_Li_1-1779782204669.png Kan_Li_2-1779782204657.png この例では「出力」はキャッシュ不可能な領域に配置されているため、その特定の関数における無効化は不要です。 /*! @brief CRC の出力バッファ。*/ uint8_t AT_NONCACHEABLE_SECTION(crc_output[4U]); DCACHE無効化が削除されると、次のようになります。 Kan_Li_3-1779782204733.png 最高最適化(-O3)を有効にした場合: Kan_Li_4-1779782205151.png データアクセス制限とCAAM構成構造の処理を考慮すると、この場合、800MHzでDTCM内のデータを使用してITCMから実行される最適化されたソフトウェア実装は、CAAMよりも高速になる可能性があります。ソフトウェア計算が頻繁に中断されるかどうかは、ペイロードのサイズとアプリケーション全体のコンセプトによって決まると言えるでしょう。 よろしくお願いいたします。 カン
查看全文
IMX8mp gstreamer vpuenc_h264 プロファイルとレベルを設定 当社では、カスタムボード上にIMX8mpを搭載し、NXP Yocto Hardknottをベースプラットフォームとして使用しています。 ハードウェアH264エンコーダーであるvpuenc_h264プラグインを使用して、カメラストリームをH264/MP4に圧縮/エンコードしています。 基本的な例としては、次のようなものがあります。 gst-launch-1.0-v videotestsrc num-buffers=100 !video/x-raw、幅=720、高さ=576、フレームレート=25/1 !vpuenc_h264 !video/x-h264,profile=main !h264parse !mp4mux fragment-duration=10 !filesink location=/tmp/Video1.mp4 しかし、vpuenc_h264 は profile= および level= ストリームパラメータを無視するようです。imx-gst1.0-plugin を見てみるとコードには、H264プロファイルを設定する機能がないようです。 GStreamerのパラメータを使用してH264ハードウェアエンコーダのプロファイルを設定する機能はありますか? インターネットで、この設定をVPUのハードウェアレジスタにハードコーディングする必要があることを示唆する情報を見かけたのですが、実際はどうなのでしょうか? 代替案(コミュニティ?)があることに気付いた。gstreamer1.0-plugins-imxこのプラグインはプロファイルとレベルをサポートしているようです。これは、NXP fsl-nxp-bsp-hardknott Yoctoビルドのソフトウェアモジュール/カーネルでは使用できないということでしょうか? Re: IMX8mp gstreamer vpuenc_h264 set profile and level 裏付けとなるご意見をありがとうございます。 私も同様に、v4l2-ctl -d /dev/video1 --all がこれらのエンコーダーパラメータに関して誤解を招くような表示をしており、変更可能であるかのように誤って示唆し、「high」がデフォルトのプロファイルであるかのように見せかけているのを目にしました。 Re: IMX8mp gstreamer vpuenc_h264 set profile and level はい、ご指摘ありがとうございます。 NXPの公式ドキュメントは通常入手困難なため、インターネット検索やコードの確認を通して私が収集した情報を他のユーザー向けに以下にまとめました。 H264エンコーディングプロファイルは、vpu_wrapper内でBaselineにハードコーディングされています。例えばこれをMainlineに変更すると(vpu_wrapperを再構築する)、H264ストリームがMainlineとしてマークされます。実際の圧縮率が異なるかどうかは分かりません。 レベルは、ビデオの解像度に基づいてvpu_wrapperによって設定されます。このレベルをH264ストリームにタグ付けする以外に、何か影響があるかどうかは分かりません。どうやら、vpu_wrapperの古いバージョンには、このレベルを誤って設定するバグがあったようです。 ビットレートを指定しない場合、少なくともgstreamerのvpuenc_h264レベルでは、結果として得られるストリームのビットレートは非常に低くなり、したがって非常に低品質になります(少なくとも私たちのビデオストリーム(通常は静止画で、時折動きがある)の場合)。ビットレートを設定しない場合、H264エンコーダーは私が知らない何らかの可変ビットレートアルゴリズムを使用することになります。 NXPへのフィードバック: H264エンコーダーのプロファイル、レベル、ビットレートに関するドキュメントが必要であり、おそらく「i.MX Linuxリファレンスマニュアル」または他の場所に記載されているでしょう。 NXPのgstreamer vpuenc_h264コードは、gst-inspect-1.0でモジュールに関する情報を一覧表示する際に、この点について言及すべきです。なぜなら、多くのエンドユーザーがこのレベルで作業を行うからです。 Re: IMX8mp gstreamer vpuenc_h264 set profile and level こんにちは、 @TerryBarnaby1 さん。 お元気でお過ごしでしょうか。   関連情報については、下記のスレッドをご覧ください。 https://community.nxp.com/t5/ i-MX-プロセッサ/Encoding-H-264-amp-H-265-using-vpu-wrapper-h/mp/1347610   この情報がお役に立てば幸いです。   ありがとう、よろしく。 ドゥルヴィット・ヴァサヴァダ Re: IMX8mp gstreamer vpuenc_h264 set profile and level 同様に、デバイスはforce_key_frame ( V4L2_BUF_FLAG_KEYFRAME )が使用可能であると誤って宣伝しているようですが、実際には、私がそれを送信してもVPUによって完全に無視されているようです。
查看全文
如何通过 UART 接收不同长度的数据? 嘿 ! 我使用的是 s32k144 评估板,我使用 UART_PAL 库使用 MODBUS 协议通过 UART 接收数据。我在 while 循环中使用了 thenon 阻塞 uart_receivedata() API,并使用回调检查接收事件和接收数据。 在我确定要接收的数据长度之前,一切都很正常,但当要接收的数据长度不固定,而且每次都不一样时,我该怎么办呢? 我看到了许多相同的主题,但没有一个主题提供了绝对的解决方案,我请求您指导我一个正确的解决方案,如果可能的话,请提供相同的代码/屏幕截图。 我附上了一张截图,在开关语句中,不同情况下接收数据的长度是不确定的。 Adarshnanda_0-1683700959540.png 请@Robin_Shen为我们提供解决方案。 此致, 阿达尔什 Re: How to receive data of varying length over UART? 你好,我想问一下你们是否解决了在 485 上接收变长数据的问题。我目前也遇到了同样的问题,但一直无法解决。 Re: How to receive data of varying length over UART? 本指南中还缺少一样东西,但@Robin_Shen发送的链接中却有。我也会把它写在这里。 6.在 LPUART_DRV_StartReceiveDataUsingInt() 函数中,启用 CTRL[IDLE]。 harivignesh_1-1746257780938.png 非常感谢@Adarshnanda制作这份指南! Re: How to receive data of varying length over UART? HI 我正在尝试通过 LPC804 的 UART 接收数据,并使用 mcuxpresso ide,请问谁能提供代码并告诉我接收数据的步骤。 Re: How to receive data of varying length over UART? 嘿,@Robin_Shen、 我查看了该主题,它对我很有效。唯一令人困惑的是,该主题中有些答案与通过 DMA 接收数据有关,有些则与通过中断接收数据有关。 如果想使用 INTERRUPTS 实现 UART_IDLE_LINE_RECEIVE,让我总结一下需要遵循的步骤。 请注意,我们需要添加 LPUART 驱动程序。 1.在 LPUART_DRV_INIT 函数中,必须配置外设寄存器,以启用 IDLE LINE INTERRUPT& 设置 IDLE 标志设置前接收的空闲字符数。你应该看看参考手册。我已将其配置为 8 个空闲字符& ,在此附上截图。 Adarshnanda_0-1684475336590.png 2.在 LPUART_DRV_IRQHandler 中,必须检查 IDLE_LINE_DETECT 标志是否设置& ,如果设置了,则调用 LPUART_DRV_RxIdleCallback 函数(默认情况下没有,用户需要定义)。请注意 - 需要在启动 IRQ_Handler 时调用此函数。 Adarshnanda_1-1684475537665.png 3.在文件 - (callbacks.h) 的枚举 - uart_event_t 中,定义一个事件 UART_EVENT_IDLE_DETECT。 Adarshnanda_2-1684475649321.png 4.定义 LPUART_DRV_RxIdleCallback& 并提供其函数原型。 Adarshnanda_3-1684475819016.png 5.之后,您就可以在应用程序中使用它了。 Adarshnanda_4-1684475984634.png 谢谢@Robin_Shen & 我希望这对其他人有所帮助。 此致, 阿达尔什 Re: How to receive data of varying length over UART? 你好,阿达什、 很抱歉,最近的 S32K1 SDK/RTD 驱动程序没有实现空闲检测功能。您是否参考过S32K144 LPUART IDLE 线路中断配置中的讨论? 您需要更改 SDK 驱动程序,才能获得 LPUART 空闲线中断。 祝好, Robin ------------------------------------------------------------------------------- 注: - 如果本帖回答了您的问题,请点击"Mark Correct" 按钮。谢谢! - 我们会在最后一次发帖后的 7 周内跟踪主题,之后的回复将被忽略 如果您以后有相关问题,请另开新主题,并参考已关闭的主题。 ------------------------------------------------------------------------------- Re: How to receive data of varying length over UART? 7。调用 LPUART_DRV_GetReceiveStatus 函数来计算接收的长度,调用 LPUART_DRV_AbortReceivingData 函数以在处理第一帧后重新开始接收数据,这样接收缓冲区从 0 开始。 企业微信截图_17737263769503.png 这是我添加的内容。现在调试成功了。感谢专家们分享之前的内容。谢谢大家。
查看全文
i.MX 93 データシートに FlexSPI クロックモード 0x2 の最大周波数情報が記載されていない こんにちは、 i.MX 93 用の FlexSPI FPGA インターフェイス アプリケーションを計画しており、可能なスループットを検討しています。QSPI 用の SD3 と eMMC 用の SD1 を提供するモジュールを使用しています。DQS ラインはすでに eMMC インターフェースで使用されているため、正しく理解していれば、クロック モード FlexSPIn_MCR0[RXCLKSRC] = 0x0 および 0x2 に制限されます。リファレンスマニュアルではモード 0x1 と同様の「中」速度が提案されていますが、データシートにはモード 0x2 の最大周波数仕様が記載されていません。 データシートでモード 0x2 が省略されている理由は何ですか?モード 0x1 と同様の速度が期待できますか?DQS ピンが他の用途に多重化されている場合、モード 0x1 は使用できないと思いますか? よろしくお願いします フランク Re: i.MX 93 No max frequency info for FlexSPI clocking mode 0x2 in datasheet こんにちは@FvM お元気でお過ごしのことと思います。 FlexSPI インターフェースに関する詳細情報については、リファレンス・マニュアルの表 195 を参照してください。 Manuel_Salas_0-1770662918630.png Manuel_Salas_1-1770663139258.png よろしくお願いいたします。 サラス。 Re: i.MX 93 No max frequency info for FlexSPI clocking mode 0x2 in datasheet こんにちは@FvM 心の中で尋ねました。 残念ながら、デバイスの特性評価によりループバック信号に信号整合性の問題があり、動作を保証できないことが判明したため、RXCLKsrc=2 オプションはデータシートから削除されました。 RM 内のオプションに関する記述は削除されます。 よろしくお願いいたします。 サラス。 Re: i.MX 93 No max frequency info for FlexSPI clocking mode 0x2 in datasheet こんにちは@Manuel_Salas 、 回答ありがとうございます。 FlexSPI リファレンス マニュアルのセクションを認識しています。問題は、データシートのパラグラフ4.12.9 FlexSPI タイミング パラメータでモード 0、1、3 のみが指定されており、モード 2 については何も言及されていないことです。具体的には、公称モードでのモード 2 (SCK 出力および SCK パッドからのループバック) DDR タイミング パラメータを求めています。これらはモード 1 と等しいと想定してよいですか? 私のアプリケーションでは SD1_STROBE ピンが eMMC インターフェイスによって占有されているため、モード 1 または 3 を使用できません。それでも、私は QSPI FPGA インターフェースで最大のスループットを達成しようとしています。 よろしく フランク Re: i.MX 93 No max frequency info for FlexSPI clocking mode 0x2 in datasheet こんにちは@Manuel_Salas 、 RXCLKsrc=2 の問題についてオープンにご報告いただき、誠にありがとうございます。DQSピンが使用できないため、弊社のアプリケーションは66MHz SDR/33MHz DDRクロック速度に制限されていると承知しております。 よろしくお願いします フランク
查看全文
センサ Fusion ライブラリ 7.0 の更新はありますか? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> やあ、マイク   新しい 7.0 が開発中であり、KSDK をサポートするとおっしゃっていましたね?新しいリリースに関する最新情報はありますか?フュージョンセンサと KSDK を使用した新しいプロジェクトを開始しようとしています。   よろしくお願いします。   海州 センサ・フュージョン Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 一般的に、サンプル プロジェクトは少なくなりますが、このスペースと NXP ブログでの説明は増える可能性があります。 KSDK の例の 1 つをベース ボード上のセンサを使用するように変換するのは、実に簡単です。main() 関数を見ると、実際に変更する必要があるのは 2 つだけであることがわかります。 main() の先頭にある I2Cdrv の定義。IDE を使用して I2C_S_DRIVER_BLOCKING の定義を見つけると、issdk_hal.h の定義に戻ります。その値をfrdm_k64f.hで定義されたI2Cポートまでたどります。または frdm_k22f (プロジェクトによって異なります)。ベース ボードの I2C バスは同じファイル内の別の場所にあります。それを指すように I2Cdrv を変更します。 main() の適切な installSensor 関数で、I2C アドレスをベース ボード上のセンサのアドレスに変更します。 それで大丈夫でしょう。V7.00 では、トップレベルの機能に対してオブジェクト指向のアプローチを採用しようとしました。考えてみれば、あなたのシナリオでは、I2C バスとデバイス アドレスを変更したいと考えていました。これらは上記の 2 つの変更に直接対応しています。 よろしくお願いいたします。 Mike Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、Mike さん。サンプル コードはすべて現在シールド開発ボードに依存しているようです。 NXP は、v5 と同じように、シールドを使用しない例 (つまり、K22F の場合はオンボードの FXOS8700 のみを使用する) を導入する予定ですか? よろしくお願いします。 Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> はい、それです。 Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、Mikeさん V5.00のToolboxを削除した後、新しいものをインストールできます。 確認したいのですが、新しいバージョンは 2016 年 8 月 3 日にビルドされた V6.00 ですか? ありがとうございます クリスティ Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Christie さん、新しいツールボックスをインストールする前に、古いツールボックスを削除することをお勧めします。これは、表示されているメッセージとは無関係であり、単に無視することができます (とにかく実行してください)。 Mike Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、Mikeさん Windows 7 に Fusion ツールキットをインストールしようとしています。ダウンロードすると、「Sensor-Fusion-V7-Setup.msi の発行元を確認できませんでした」というエラーが表示されます。 どうすれば直せるか教えていただけますか? Fusion v5 のツールキットを削除する必要がありますか? ありがとうございます クリスティ Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> マーク、 約 10 分後に新しいトピックを確認してください。私があなたをカバーします。 Mike Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、Mikeさん ベアメタルオプションもあることを期待していましたが、見つかりませんでした。RTOSを選択しないと、SDK_2.0_FRDM-K22F\boards\frdmk22f_agm01\issdk_examples\algorithmsにセンサーフュージョンディレクトリが作成されません。(歩数計のみ参照)。ベアメタルオプションはありますか?それとも何か見逃しているのでしょうか? よろしくお願いします! Mark Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> センサー フュージョン ライブラリのバージョン 7.00 は、今朝から kex.nxp.com で入手可能です。「SDKのビルド」ボタンを選択し、「新しい構成」を選択します。ボード -> Kinetis のプルダウンメニューから FRDM-K64F または FRDM-K22F を選択します。KSDK 構成を作成するときは、「ISSDK」と「FreeRTOS」の両方のチェックボックスをオンにしてください。そこからの指示に従ってください。 このスペースでの以前の投稿で述べたように、バージョン 7.00 はバージョン 5.00 からの大きな変更です。このリリースは引き続き nxp.com/sensorfusion で入手できます。本日中に、センサ Fusion Toolbox for Windows の新しいバージョンもその Web ページに掲載される予定です。バージョン 7.00 ライブラリで使用する場合はこれが必要になります。磁気パケット形式は 5.00 から変更され、新しい GUI には加速度センサの精密調整機能が追加されました。 7.00 のユーザー マニュアルは、以前のリリースに比べて大幅に拡張されています。また、付録として、方向と磁気較正のトピックに関する私の人気のブログ投稿もいくつか含まれています。 Mike Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> マーク様へ 当社の評価ボードはすべてデフォルトで I2C に設定されていますが、評価ボード BRKT-STBC-AGM01 (FXAS21002 および FXOS8700 を含む) は、以下のアプリケーション ノートに従って SPI モードに変換できます。 http://cache.nxp.com/files/analog/doc/app_note/AN5167.pdf?pspll=1 よろしくお願いいたします クリティ Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、マイクさん。素早い対応ありがとうございます! FXOS8700とFXAS21002の両方を使用する際に、SPIインターフェースをサポートする評価ボードはありますか?お客様がSPIパスを試すことに決めた場合、動作確認済みのハードウェアとファームウェアから始めるのが良いでしょう。 よろしくお願いいたします。 Mark Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> マーク、 いい質問ですね。順番に説明します。 A1: FRDM-STBC-AGM01 は、部品を I2C モードで使用するように設計されています。いいえ。 A2: いいえ、回避策は実装されていません。そして、あなたは何も見逃していません。I2C バス上に他のセンサーやトラフィックがあるのかを制御することはできないため (いずれも問題を引き起こす可能性があります)、影響を受けることになります。オーバーサンプリング時に外れ値のサンプルを拒否するだけで、ドライバ レベルで多少の改善が得られる可能性があります (例: 4 つの FIFO サンプルのうち最も一貫性のある 3 つを保持する)。現時点ではその機能は実装していません。 A3: SPI の方がエネルギー効率が高いのは同意しますが、PCB が若干複雑になるという欠点があります。7.0 の電源オプションをテストする場合、電力をカットする際の I2C プルアップ抵抗がすぐに制限事項になります。 ご参考までに、今週 (おそらく明日か木曜日) には、K64F および K22F 用の 7.00 に kex.nxp.com 経由でアクセスできるようになると思います。KSDK ビルダーで ISSDK オプションを必ずチェックしてください。 Mike Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、マイクさん。SF 7.0 を楽しみにしています!いくつかのすばらしい新機能!いくつかの質問: Q1. SPIはFRDM-STBC-AGM01で動作しますか?データシートには、「FXOS8700CQ は、CS_B ピンがデアサートされている (ロジック ハイ) ときに MISO ピンをトライ ステートにしません。そのため、バス上に複数のスレーブ デバイスが存在するとバスの競合が発生する可能性があります。」と記載されており、MISO は FXAS21002 の MISO ピンに接続されているため、質問します。 Q2. SF 5.0 と 7.0 の両方に、エラッタ E2: I 2C/AFE カップリングからのノイズに対する回避策が組み込まれていますか。磁気データが読み取られるタイミングと内部で変換が行われるタイミングの間に同期がないようです。I2C トランザクションを開始するにはデータ準備割り込みが使用されますか?それとも何か見逃しているのでしょうか? Q3. I2Cトランザクションには時間がかかるようですが、センサーデータを素早く読み取ることができ、プロセッサを低電力モードに早く切り替えて次の割り込みを待つことができるため、SPIを使用する方が良いと思います。低消費電力とプロセッサ スループットの最適化に関して、FXOS8700 と FXAS21002 の両方を使用する場合、SPI と I2C のどちらを使用するかについて、どのような見解をお持ちですか。 よろしくお願いします! Mark Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> やあ、マイク アップデートありがとうございます!プレビューとユーザーガイドは非常に役立ちます!ありがとう! 海州 Re: Any update on Sensor Fusion library 7.0? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 海州、 チェックインしていただきありがとうございます。数週間遅れてしまいました。新しい日程は8月上旬だと聞きました。前回の投稿で述べたように、私たちは Kinetis Expert エコシステムに統合されています。この環境での最初のリリースでは、FRDM-K64F と FRDM-K22F がサポートされます。融合コード自体はプラットフォームに依存しませんが、これまでこれら 2 つのプラットフォームでのみテストされている SPI/I2C アクセス ライブラリに依存しています。SO、センサ フュージョンは、KEX ではこれら 2 つのボードのオプションとしてのみ表示されます。 ユーザー ガイドのプレビューを投稿して、皆さんや他のユーザーが今後の予定を確認できるようにします。フィードバックは大歓迎です。 Mike
查看全文
i.MX 91 - LPDDR4 内存兼容性指南 本文档的目的是为选择 i.MX 91 系列处理器支持的兼容 LPDDR4 内存设备提供扩展指导。在所有情况下,强烈建议遵循恩智浦硬件开发者指南中针对特定 SoC 概述的动态随机存取存储器(DRAM)布局指南。 二进制密度(例如 1 GB、2 GB、4 GB)的内存设备是首选,因为它们通过与系统寻址方案保持一致并降低软件复杂性来简化内存管理。 LPDDR4 - 最大支持密度 SoC 最大数据总线宽度 最大密度 假定内存组织 说明 i.MX 91 (i.MX 91xx) 16 位 16GB / (2GB) 具有 17 行地址的单列单通道设备(R0-R16) 1, 2, 3 LPDDR4 - 经过验证的存储器列表 验证过程是一项持续性工作--预计将定期更新表格。 SoC 密度 内存供应商 经过验证的内存部件编号 说明 i.MX 91 16GB / (2GB) 美光 MT53E1G16D1FW-046 AAT:A MT53E1G16D1ZW-046 AAT:C 5 2 Gb/(256 MB) Winbond W66BP6NBHAHJ 4 8GB / (1GB) 南亚 NT6AN512M16AV-J1I   4 Gb/(512 MB) 南亚 NT6AN256M16AV-J1I 4 8GB / (1GB) ISSI IS43LQ16512B-046BLI 4 12GB / (1.5GB) 美光 MT53E768M16D1ZW-046 4 16GB / (2GB) 智能存储器 IMAG16L4KBBG 4 2 Gb/(256 MB) 南亚 NT6AN128M16AV-J1 4 4 Gb/(512 MB) 联合信息中心 SCB11N4G160BF-04ZI 4 4 Gb/(512 MB) ISSI IS43LQ16256B-053BLI 4 4 Gb/(512 MB) Winbond W66CP6RBHAHJ 4 Note: This device supports operation with LPDDR4 memories only. LPDDR4x operation is not supported. Dual‑mode memories that support both LPDDR4 and LPDDR4x are allowed as long as the device can operate in LPDDR4 mode, including using LPDDR4 I/O voltage levels and initialization sequences. 注意:某些内存供应商的 LPDDR4 设备可能不支持低速运行,此外,DQ ODT 可能未处于活动状态,这可能会影响这些速度下的信号完整性。如果在用例中计划低速运行,请向内存供应商咨询内存设备的配置方面和可能的自定义,以确保功能正确。 注 1: 这些数字完全基于DDR控制器和DDR PHY的IP文档、为将其集成到SoC而选择的实现参数设置、SoC参考手册以及JEDEC标准 JESD209-4B(LPDDR4)。因此,除非另有说明,否则它们没有经过验证,也不能保证存储器供应商提供的 SoC 具有特定的密度和/或所需的内部结构。如果客户选择使用最大密度,并将其用于预期用途,则风险自负。 注 2: 不支持任何密度的字节模式 LPDDR4 设备(在两个芯片之间内部分配 x16 通道,每个 x8),因此,这些数字仅适用于内部组织 x16 的设备(在 JEDEC 规范中称为 " 标准 ")。 注 3: SoC 还支持双列单通道设备,因此,使用具有 16 行地址(R0-R15)的双列单通道设备也可以实现 16GB/2GB 的密度。 注 4: 该内存部件号没有经过 JEDEC 的全面验证,但通过了所有功能测试项目。 注 5: 该内存部件号不推荐用于新设计,已被新部件号取代
查看全文