Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
Release Announcement - GUI Guider v1.1 The latest version of GUI Guider was recently released by NXP. If you are unfamiliar with GUI Guider it is a graphical development tool for creating UIs on supported NXP microcontrollers. The tool allows you to create a UI, test the UI along with various levels of events all within a simulation environment, and then deploy the UI application directly to the NXP development board or generate the code for use in MCUXpresso IDE. GUI Guider is designed specifically for use with LVGL, an open-source graphics library, that is available within the MCUXpresso SDK.   This release of GUI Guider features: New Development Tool capabilities Menu shortcut and keyboard control New states: FOCUSED, EDITED, DISABLED Frame rate customization Screen transition configuration Parent / children widgets Callback function setting for animation image VGLite enablement Header path auto-config New or improved Widgets BMP and SVG assets 3D animation for PNG HW Acceleration capabilities Initial support for VGLite on RT1170 and RT595 New Device Target Supported i.MX RT1170 i.MX RT595 New release of GUI Guider v1.1, the user-friendly graphical user interface development tool from NXP that enables the rapid development of high quality displays with the open-source LVGL graphics library.
View full article
示例 S32K144 FlexCAN TX/RX/Error ISR 测试 S32DS2.2 本演示应用程序的目的是向您展示如何使用配置为灵活数据速率的FlexCAN模块,通过S32 SDK API进行操作。 - 在第一部分,应用程序将设置板载时钟、引脚及其他系统功能,例如SBC(如果该板将此模块用作CAN收发器)。 - 然后,它将配置FlexCAN模块的功能,例如FD、比特率和消息缓冲区 - 应用程序将等待在配置的消息缓冲区中接收帧,或等待按下两个按钮中的一个以触发事件,该事件将触发向接收方发送帧。 - 按下板1的SW3按钮将触发CAN传输,导致板2上的红色LED灯闪烁。 - 按下板1的SW2按钮将触发CAN传输,导致板2上的绿色LED灯闪烁。 - 此演示应用程序需要两块板,一块配置为主板,另一块配置为从板(请参阅应用程序代码中的MASTER/SLAVE定义) ,或使用CAN工具连接单块板。 - 事件和错误回调已安装,callback_test变量指示事件进入: bit0 .. 接收完成 bit1 .. 发送完成 bit2 .. 错误中断标志设置 bit3 .. 总线关闭中断标志设置 - 要进入总线关闭状态,只需将CANH与GND短接,并使用SW1或SW2发送消息,FlexCAN进入总线关闭状态(错误事件),蓝色LED亮起。 此外,TX MB 也已中止。移除短路连接,然后正常发送消息,蓝色LED熄灭。 ------------------------------------------------------------------------------ * 测试硬件:S32K144EVB-Q100 * MCU:FS32K1441 0N57U * 编译器:S32DS.ARM.2.2 * SDK 版本:S32SDK_S32K1xx_RTM_3.0.3 * 调试器:Lauterbach、OpenSDA * 目标:internal_FLASH
View full article
示例 S32K144 FlexCAN Pretended Networking STOP 模式测试 S32DS.ARM.2.2 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ******************************************************************************** 详细说明: 本示例展示了如何使用 FlexCAN 0 的虚拟网络模式, 使 FlexCAN 模块能从 STOP 模式唤醒 MCU。  已启用超时唤醒和匹配事件唤醒功能。  此外,引脚中断也可用于退出 STOP 模式。  具体来说,按下 SW3 按钮后,MCU 将进入 STOP 模式。  当发生以下任一情况时,MCU 将退出 STOP 模式:  - 8 秒内无 CAN 消息传入(CAN PN 超时事件)  - 收到标准 ID 为 0x554 或 0x555 的消息(CAN PN 匹配事件)  - 按下 SW2 按钮(PTC12 中断)  - 在运行模式下,蓝色 LED 会进行调光,且不同唤醒事件对应的调光速率不同  ------------------------------------------------------------------------------  测试硬件:S32K144 EVB-Q100  MCU:FS32K144UAVLL 0N57U  Fsys:160MHz  调试器:Lauterbach, OpenSDA  目标:internal_FLASH ******************************************************************************** 概述
View full article
工信部(中国)加强了 FRDM-KW38 和 KW36 的认证 中国的认证要求(工信部 [2002]353 号)显然计划(2022 年 12 月底)进一步加强(工信部 2021 年 1 月 27 日发布: 《关于 2400MHz、5100MHz 和 5800MHz 频段无线电管理有关事项的通知》)。 需要对 KW38 和 KW36 进行修改寄存器,以便以可接受的裕度满足新的中国要求: PA_RAMP_SEL值必须设置为0x02h (2us),而不是 0x01h (1us 默认值) 修改 SW:nxp_xcvr_common_config.c 中的 XCVR_TX_DIG_PA_CTRL_PA_RAMP_SEL( 2 ) 所有详细信息均在附件中。 注意:此 SW 修改仅适用于中国国家。 BLE软件 千瓦 KW35 | 36
View full article
[Beginner's Guide] How to Build Yocto Linux BSP - i.MX FRDM Board Edition (Japanese Blog) This guide will show you how to build Yocto Linux using the i.MX FRDM board as a base. This article uses the FRDM-IMX93 as an example, but the same procedure can be used to build on other i.MX FRDM boards. The Yocto Linux BSP is described using "Linux 6.12.49_2.2.0 ( Yocto 5.2 “Walnascar” )" as an example. Q: What is an i.MX FRDM board? A: The i.MX FRDM board is a development board designed to be more affordable and compact compared to NXP's full-featured EVK board, with fewer features. Its purpose is to allow for easy basic evaluation and prototyping. 1. Environment & Preparation 1.1. environment Major items Minor item Content remarks Document - IMX_YOCTO_PROJECT_USERS_GUIDE.pdf (This is the primary method used. It describes the procedure for building the BSP .) i.MX Linux ® Release Notes (You can view a list of support features.) i.MX Porting Guide (Summary of points to note when actually implementing) Download general Yocto Linux documentation here. Hardware FRDM board FRDM-IMX8MPLUS FRDM-IMX91S FRDM-IMX91 FRDM-IMX93 FRDM-IMX95 This chapter will use the FRDM-IMX93 as a basis for explanation. Try PC Ubuntu environment ・VMWare/Virtual Box etc. (on Windows) Native Linux one of the following Recommended: Ubuntu 22.04 or later SD card + reader/writer 16GB or more recommended   Hardware (Option) MIPI-Camera (Option) BSP-compatible MIPI camera (See i.MX Linux ® Release Notes) A USB camera can be used as an alternative (though this may result in latency). Display (Option) Display   USB Device (Option) USB mouse, USB memory stick   Headphone (Option) 3.5mm earphones Earphones with a microphone (such as the earphones that came with older iPhones) are better. Software Yocto environment Linux BSP (This time, we used Linux 6.12.49_2.2.0 ( Yocto 5.2 “Walnascar” )) This article explains the installation process, including how to install the software. 1.2. Legend Legend for the Command Prompt =>           u-bootプロンプト $            BSPがインストールされているLinux PCのプロンプト 2. Host machine Ubuntu 22.04 Desktop is recommended. For practical use, a host machine with at least 8 threads and 16GB of RAM is recommended for a reasonably comfortable experience. The required storage will vary depending on the target recipe, but it will be around 50GB for small projects and 500GB for larger ones. 2.1. Packages required for Yocto Please install the necessary packages using the following steps. $ sudo apt-get install build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3- jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xzutils zstd efitools curl Note: In addition to the information in IMX_YOCTO_PROJECT_USERS_GUIDE.pdf, curl has been added. 2.2. Configuring the swap file Here's an example of setting up a 32GB swap file. $ sudo fallocate -l 32G /swapfile $ sudo chmod 600 /swapfile $ sudo mkswap /swapfile $ sudo swapon /swapfile Note: If /swapfile already exists, the command on the first line will fail. If you want to change the size, execute the following and then run the command above again. $ sudo swapoff /swapfile $ sudo rm /swapfile To automatically mount the swap file when the host machine starts up, add the following line to /etc/fstab : /swapfile none swap sw 0 0 3. Yocto Linux BSP From the Embedded Linux for i.MX Applications Processors section on nxp.jp, select the required Linux BSP version and obtain the i.MX Yocto Project User's Guide. Create the image following the steps in "4 Yocto Project Setup" of the i.MX Yocto Project User's Guide (IMXLXYOCTOUG). This document is written assuming the following settings are used to generate the image. DISTRO = fsl-imx-xwayland MACHINE = imx93-11x11-lpddr4x-frdm 3.1. Setting up and building Yocto BSP For host machine setup, please refer to 2. Host Machine. 3.1.1. Installing the repo utility $ mkdir ~/bin $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo 3.1.2. Add the repository to your PATH Add the following line to $HOME/.bashrc : export PATH=~/bin:$PATH 3.1.3. Git Setup $ git config --global user.name "Your Name" $ git config --global user.email "Your Email" $ git config --list 3.1.4. Yocto BSP Setup $ mkdir imx-yocto-bsp $ cd imx-yocto-bsp $ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-walnascar -m imx-6.12.49-2.2.0.xml $ repo sync 3.1.5. Set build target, build $ MACHINE=imx93-11x11-lpddr4x-frdm DISTRO=fsl-imx-xwayland source ./imx-setup-release.sh -b build $ bitbake imx-image-full *Once the build is complete, a Linux image will be generated. * For instructions on how to write the generated image, please refer to steps 1 and 2 of the Start Guide for your specific FRDM board. FRDM-IMX8MPLUS Start Guide FRDM-IMX91 Start Guide FRDM-IMX91S Start Guide FRDM-IMX93 Start Guide FRDM-IMX95 Start Guide Note: If you want to build a Linux BSP for other FRDM boards, replace the " MACHINE= " part of the command above with the following name. imx8mp-lpddr4-frdm (FRDM-IMX8MPLUS) imx91-11x11-lpddr4-frdm (FRDM-IMX91) imx91-11x11-lpddr4-frdm-imx91s (FRDM-IMX91S) imx93-11x11-lpddr4x-frdm (FRDM-IMX93) imx95-15x15-lpddr4x-frdm (FRDM-IMX95) Note: For graphics functionality, you can also select the distribution using the " DISTRO = " part of the command above. fsl-imx-wayland (Wayland) fsl-imx-xwayland (Not compatible with X11 apps that use Wayland & X11 *EGL) Note: The setup using the imx-setup-release.sh script should only be done once per project. Doing so on an existing project will generate new files such as conf/local.conf , and your previous settings will be lost. If you wish to reuse an existing project... 3.3.1. See "Resuming work from an existing build directory". Note: Depending on the host machine's specifications, the build process may take several tens of hours. Also, expect it to consume 400-500GB of storage. Note: When building on a multi-core, multi-threaded host machine, swapping occurs if there is insufficient memory for the number of threads. Limiting the number of threads is covered in section 3.4.2. See Limiting the number of threads that run during the build process. Note: In the initial state of Ubuntu 22.04, swap may not be configured, which can cause extreme slowness or crashes. The swap file configuration is as follows: 2.2. Please refer to the section on configuring swap files. *The following information is for reference only. 3.2. Building and Installing the Toolchain You can build and install toolchains such as cross-compilers. By using the scripts generated here, you can avoid problems that often occur during cross-compilation, such as not being able to find include files or libraries to link. 3.2.1. Toolchain build $ bitbake imx-image-full -c populate_sdk 3.2.2. install $ tmp/deploy/sdk/fsl-imx-xwayland-glibc-x86_64-imx-image-full-armv8a-imx93-11x11-lpddr4x-pf0900-evk-toolchain-6.12-walnascar.sh We will not explain how to use the toolchain here. 3.3. Frequently used Yocto bitbake commands and settings 3.3.1. Resume work from the existing build directory. $ cd /path/to/imx-yocto-bsp $ source ./setup-environment build Note: The paths and directories mentioned here are from section 3.1.4. Yocto BSP setup, 3.1.5. The build target settings were configured during the build process. Below, we will give some command examples using linux-imx as an example. You can do the same thing for each package by changing " linux-imx " to a different package name. 3.3.2. Rebuilding the package $ bitbake -c compile linux-imx -f $ bitbake -c install linux-imx $ bitbake -c deploy linux-imx If you do not include the note -f , the steps may be skipped. Note - Some packages may show an error when deploying using `-c deploy` , but in most cases this is simply because the `do_deploy` command is not available, so you can ignore the error. 3.3.3. Deleting Packages If an error occurs with a package that shouldn't normally happen, try deleting the package using the following command and trying again. This may resolve the error. (This is because packages may be corrupted during download, or junk data may remain if the build process is terminated prematurely.) $ bitbake -c cleansstate linux-imx Note: The extracted source code will be deleted, so please be careful if you have any files you are currently editing. 3.3.4. Package Extraction If you only want to extract the package and do not want to compile it yet $ bitbake -c patch linux-imx 3.3.5. Apply changes to the config file. If you want to change a config file (such as arch/arm64/configs/imx_v8_defconfig ) and have those changes reflected: $ bitbake -c configure linux-imx $ bitbake -c compile linux-imx -f 3.3.6. Run linux-imx menuconfig When changing the build options for the Linux kernel $ bitbake -c menuconfig linux-imx A window like this will pop up, so make the necessary changes and save. (Use the arrow keys to select the item and the spacebar to confirm.) For tips on building, please also refer to the following article. Yocto Linux BSP Build Tips - i.MX 8M Plus Edition ========================= We are currently unable to respond to comments left in the "Comment" section of this post. We apologize for the inconvenience, but please refer to " Technical Questions to NXP - How to Contact Us( Japanese Blog) " when making an inquiry. (If you are already an NXP distributor or have a relationship with NXP, you may ask your representative directly.) This guide will show you how to build a Linux BSP using the FRDM (Freedom) board, which allows you to start using embedded Linux in a compact and affordable way. This article uses the FRDM-IMX93 as an example, but the same procedure can be used to build on other i.MX FRDM boards. The Yocto Linux BSP is described using "Linux 6.12.49_2.2.0 (Yocto 5.0.4)" as an example. i.MX Processors SW | Downloads Japanese Blog
View full article
Compiling L5.4.3_1.0.0 BSP On Ubuntu 180.4 LTS We will cross compile L5.4.3_1.0.0 on ubuntu18.04 LTS platform in three steps. 1. Installing Ubuntu 18.04 to vmplayer14 & Configuring Ubuntu 18.04 LTS 2. Compiling L5.4.3_1.0.0 BSP According to Steps in i.MX_Yocto_Project_User's_Guide.pdf 3. Handling tensorflow-lite compilation errors. --BEGIN No.1 Installing Ubuntu 18.04 to vmplayer14 & Configuring Ubuntu 18.04 LTS 1. Install 18.04 on vmplayer After installation is done, root user should be set at first. # sudo passwd root Then follow these steps to configuration ubuntu 18.04 for environment of compiliation --Changing sources of ubuntu 18.04 mirror If you are Chinese users, you can do the step, which can improve your system performance. # sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak # sudo geit /etc/apt/source.list Comment I.MX customers outside China do not need to modify Ubuntu source list, or can modify it to local mirror site of Ubuntu 18.04, which can improve the speed of software upgrade. Delet all sources and copy following lines here, Then save it and exit Update ubuntu source deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse Then running these 2 commands to update sources and packages # sudo apt-get update # sudo apt-get upgrade 2. Installing packages for compiliation Packages For Compiling BSP # sudo apt-get install flex bison gperf build-essential zlib1g-dev lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev tofrodos python-markdown libxml2-utils xsltproc # sudo apt-get install uuid-dev:i386 liblzo2-dev:i386 gcc-multilib g++-multilib subversion openssh-server openssh-client uuid uuid-dev zlib1g-dev liblz-dev lzop  liblzo2-2 liblzo2-dev git-core curl # sudo apt-get install u-boot-tools mtd-utils android-tools-fsutils openjdk-8-jdk device-tree-compiler aptitude libcurl4-openssl-dev nss-updatedb # sudo apt-get install chrpath texinfo gawk cpio diffstat No.2 Compiling L5.4.3_1.0.0 BSP According to Steps in i.MX_Yocto_Project_User's_Guide.pdf          The detailed BSP compilation steps are given in i.MX_Yocto_Project_User's_Guide.pdf. Here are just some tips and simple steps. For Chinese customers, the system may not respond when the repo init or repo sync command is executed after obtaining the repo script. Detailed description is below: (1)Getting repo script # mkdir ~/bin (this step may not be needed if the bin folder already exists) # curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo # chmod a+x ~/bin/repo # export PATH=~/bin:$PATH (2)Getting Yocto source # mkdir imx-yocto-bsp # cd imx-yocto-bsp # repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.3-1.0.0.xml # repo sync          After running repo init or repo sync, you may encounter a situation where there is no progress for a long time, and repo sync stops there without any prompt. This may be caused by googlesource site being inaccessible.          At this time, you can modify the googlesource URL to the URL of Tsinghua University. # gedit ./repo          Changing REPO_URL = 'https://gerrit.googlesource.com/git-repo'          To be:                    REPO_URL = 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'          Save and exit. Then run “repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.3-1.0.0.xml”. or repo sync No.3 Handling tensorflow-lite compilation errors       If you encounter a tensorflow-lite compilation error during the compilation process, the following processing methods may be helpful to you. Cause Analysis:          Compiling tensorflow-lite requires three steps: fetching packages, configuring environment, and compiling code.          During the configuring environment, the following 8 software packages need to be downloaded. If any of the 8 files are not successfully downloaded, an error will be reported and compilation will be terminated.          ①9f48e814419e.tar.gz          ②38ebac7b059e84692f53e5938f97a9943c120d98.zip          ③release-1.8.0.tar.gz          ④389ec3f906f018661a5308458d623d01f96d7b23.tar.gz          ⑤master.zip          ⑥816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz          ⑦1f5eae5d6a135ff6811724f6c57f911d1f46bb15.tar.gz          ⑧fft.tgz          If you encounter this problem, you can refer to the following methods to solve it. Open the file with editor: ~/imx-yocto-bsp/build-xwayland/tmp/work/aarch64-poky-linux/tensorflow-lite/1.13.2-r0/git/tensorflow/lite/tools/make/download_dependencies.sh URLs EIGEN_URL="https://bitbucket.org/eigen/eigen/get/9f48e814419e.tar.gz" GEMMLOWP_URL="https://github.com/google/gemmlowp/archive/38ebac7b059e84692f53e5938f97a9943c120d98.zip" GOOGLETEST_URL="https://github.com/google/googletest/archive/release-1.8.0.tar.gz" ABSL_URL="https://github.com/abseil/abseil-cpp/archive/389ec3f906f018661a5308458d623d01f96d7b23.tar.gz" NEON_2_SSE_URL="https://github.com/intel/ARM_NEON_2_x86_SSE/archive/master.zip" FARMHASH_URL="https://github.com/google/farmhash/archive/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz" FLATBUFFERS_URL="https://github.com/google/flatbuffers/archive/1f5eae5d6a135ff6811724f6c57f911d1f46bb15.tar.gz" FFT2D_URL="http://www.kurims.kyoto-u.ac.jp/~ooura/fft.tgz" Save and exit. [comment]     Don’t run “bitbake tensorflow-lite -c cleanall before you modify it”, otherwise files will be deleted.  Then try to compile tensorflow-lite like below: # bitbake tensorflow-lite -c compile   At the same time, we can open this directory and check if the following directories are created. If these 8 directories are successfully created, it means that links we modified are no problem.          After tensorflow-lite is successfully built, we can continue to compile full images. # bitbake imx-image-full --END NXP TIC team Weidong Sun 2020/3/30 i.MX 8 Family | i.MX 8QuadMax (8QM) | 8QuadPlus
View full article
用LPTMR定时器中断无法从VLPS到VLPR的唤醒问题 我在仿真调试的时候,程序进入VLPS后,LPTMR定时器设定10秒中断,定时器中断可以从VLPS到VLPR的正常唤醒。但是不仿真的时候,关电重新上电,程序从RUN进入VLPR,然后程序进入VLPS后,之后无法进入LPTMR定时器中断,也无法唤醒到VLPR模式,一直处在VLPS状态。 但是外部IO口中断从VLPS到VLPR可以正常唤醒,不管是在仿真模式还是不仿真的情况都可以从VLPS正常唤醒到VLPR。 难道不仿真的时候VLPS导致LPTMR定时器时钟关了,还是有其他的问题? VLPR用的慢速时钟源8M,分频后慢系统时钟为4M,FLASH时钟为1M,LPTMR定时器时钟源用的慢系统时钟4M分4096分频,10000计数大约10s中断一次。 主函数主函数 Run to VLPR函数Run to VLPR函数 VLPR to VLPS函数VLPR to VLPS函数 Re: 用LPTMR定时器中断无法从VLPS到VLPR的唤醒问题 问题已经解决,要提前设置使能VLPS模式下SIRC时钟,默认是关闭的,程序中增加一句宏定义就可以了 #define  SCG_ENABLE_SIRC_IN_VLPS  1 Re: 用LPTMR定时器中断无法从VLPS到VLPR的唤醒问题 这是我的源代码。不管是仿真还是断开下载器,在VLPR模式下LPTMR都正常工作。但是就是在VLPS模式下LPTMR无法唤醒到VLPR模式。用外部IO中断唤醒都正常。但是下载仿真时在VLPS模式LPTMR又可以唤醒到VLPR模式。我的初始化时钟就在Run_to_VLPR(void)函数中的scg_vlpr_configuration()函数中。 #include "include.h" /* 中断优先级组 */ #define NVIC_Group0 0x07 #define NVIC_Group1 0x06 #define NVIC_Group2 0x05 #define NVIC_Group3 0x04 #define NVIC_Group4 0x03 typedef enum _mode { eRun = 1, eStop = 2, eVLPR = 4, eVLPS = 16, eHSRun = 128 }eLowPowerMode; void delay(uint32_t cycles) { /* Delay function - do nothing for a number of cycles */ while(cycles--) { __asm("nop"); } } void error_trap (void) { while (1) { } } void disable_clock_monitors(void) { /* Disable Clock monitor for System Oscillator */ SCG->SOSCCSR &= ~(SCG_SOSCCSR_SOSCCM_MASK); /* Disable Clock monitor for System PLL */ SCG->SPLLCSR &= ~(SCG_SPLLCSR_SPLLCM_MASK); } void scg_vlps_configuration (void) { uint32_t tempSIRC = SCG->SIRCCSR; /* Disable in VLPS */ tempSIRC &= ~(SCG_SIRCCSR_SIRCLPEN_MASK | SCG_SIRCCSR_SIRCSTEN_MASK); #if SCG_ENABLE_SIRC_IN_VLPS /* Enable in VLPS */ tempSIRC |= SCG_SIRCCSR_SIRCLPEN_MASK | SCG_SIRCCSR_SIRCSTEN_MASK; #endif SCG->SIRCCSR = tempSIRC; } void scg_vlpr_configuration(void) { uint8_t tempRCM = RCM->SRIE; uint32_t temp; /* Check if core is not using SIRC */ if ((SCG->CSR & SCG_CSR_SCS_MASK) != SCG_CSR_SCS(2)) { /* Disable SIRC */ SCG->SIRCCSR &= ~SCG_SIRCCSR_SIRCEN_MASK; /* Wait until SIRC is disabled */ while (SCG->SIRCCSR & SCG_SIRCCSR_SIRCVLD_MASK) {} /* Enable SIRC in VLP modes */ SCG->SIRCCSR = SCG_SIRCCSR_SIRCSTEN_MASK #if SCG_ENABLE_SIRC_IN_VLPS | SCG_SIRCCSR_SIRCLPEN_MASK #endif ; /* Enable SIRC */ SCG->SIRCCSR |= SCG_SIRCCSR_SIRCEN_MASK; /* Wait until SIRC is enabled */ while (0 == (SCG->SIRCCSR & SCG_SIRCCSR_SIRCVLD_MASK)) {} temp = SCG_RCCR_DIVCORE(1) | /* Core clock is SIRC/8 = 4MHz */ SCG_RCCR_DIVBUS(0) | /* Bus clock is Core clock / 1 = 4MHz */ SCG_RCCR_DIVSLOW(3) | /* Flash clock is Core clock / 1 = 1MHz */ SCG_RCCR_SCS(2); /* Select SIRC as system clock */ SCG->RCCR = temp; /* Select SIRC as system clock */ /* Wait until SIRC is used as system clock */ while ((SCG->CSR & SCG_CSR_SCS_MASK) != SCG_CSR_SCS(2)) {} /* Configure SIRC as system clock in VLPR modes */ SCG->VCCR = SCG_VCCR_DIVCORE(1) | /* Core clock is SIRC/8 = 1MHz */ SCG_VCCR_DIVBUS(0) | /* Bus clock is Core clock / 1 = 1MHz */ SCG_VCCR_DIVSLOW(3) | /* Flash clock is Core clock / 1 = 1MHz */ SCG_VCCR_SCS(2); /* Select SIRC as system clock */ /* Disable FIRC and SPLL */ /* ?Configurable SIRC as system clock */ /* ?Configure all reset sources to be 'Reset' (not as Interrupt) via RCM_SRIE */ /* ?Program each reset source as interrupt via RCM_SRIE for a minimum delay time of 10 LPO */ RCM->SRIE &= 0; /* ?Disable FIRC */ SCG->FIRCCSR = SCG_FIRCCSR_FIRCREGOFF_MASK; /* ?Execute few nops to ensure an interval of 45 ns */ delay(10); while (0 != (SCG->FIRCCSR & SCG_FIRCCSR_FIRCVLD_MASK)) { }; /* ?Configure every reset source back to original intended reset configuration (Interrupt or Reset) via RCM_SRIE */ RCM->SRIE = tempRCM; /* Set SIRCDIV2 value to 1MHz (SIRC / 😎 */ SCG->SIRCDIV = SCG_SIRCDIV_SIRCDIV2(2); } } void scg_configure_freq_for_VLPR() { } void Run_to_VLPR(void) { /* Disable clock monitors on SCG module */ disable_clock_monitors(); /* Adjust SCG settings to meet maximum frequencies values */ scg_vlpr_configuration(); /* Allow very low power run mode */ SMC->PMPROT |= SMC_PMPROT_AVLP_MASK; /* Check if current mode is RUN mode */ if (eRun == SMC->PMSTAT) { /* This bit enables source and well biasing for the core logic, * this is useful to further reduce MCU power consumption */ PMC->REGSC |= PMC_REGSC_BIASEN_MASK; /* Move to VLPR mode */ SMC->PMCTRL = SMC_PMCTRL_RUNM(2); /* Wait for transition */ while (SMC->PMSTAT != eVLPR) {} } else { /* Error trap */ error_trap(); } } #define SCG_ENABLE_SIRC_IN_VLPS 1 void VLPR_to_VLPS (void) { uint32_t tempPMC_ctrl = SMC->PMCTRL; /* Disable FIRC and SPLL and configure VLPS */ scg_vlps_configuration(); /* Enable SLEEPDEEP bit in the Core * (Allow deep sleep modes) */ S32_SCB->SCR |= S32_SCB_SCR_SLEEPDEEP_MASK; /* Allow very low power run mode */ SMC->PMPROT |= SMC_PMPROT_AVLP_MASK; /* Select VLPS Mode */ tempPMC_ctrl &= ~SMC_PMCTRL_STOPM_MASK; tempPMC_ctrl |= SMC_PMCTRL_STOPM(2); SMC->PMCTRL = tempPMC_ctrl; /* Reduce power consumption */ PMC->REGSC |= PMC_REGSC_BIASEN_MASK #if (0 == SCG_ENABLE_SIRC_IN_VLPS) | PMC_REGSC_CLKBIASDIS_MASK #endif ; /* Check if current mode is VLPR mode */ if(eVLPR == SMC->PMSTAT) { STANDBY(); // Move to Stop mode // __asm("DSB"); // __asm("ISB"); /* Go to deep sleep mode */ // __asm("WFI"); } else { /* Error trap */ error_trap(); } /* Verify VLPSA bit is not set */ if (0 != (SMC->PMCTRL & SMC_PMCTRL_VLPSA_MASK)) { // error_trap(); } } #define KEY0_IO PTD5 void Key_Init(void) { /* 配置按键 内部上拉 下降沿触发中断 */ GPIO_ExtiInit(KEY0_IO, falling_up); /*优先级配置 抢占优先级1 子优先级2 越小优先级越高 抢占优先级可打断别的中断 */ NVIC_SetPriority(PORTD_IRQn,NVIC_EncodePriority(NVIC_GetPriorityGrouping(),1,2)); NVIC_EnableIRQ(PORTD_IRQn); //使能PORTD_IRQn的中断 } #define LED1_IO PTC17 //核心板LED #define LED2_IO PTC16 #define LED3_IO PTD15 //母板LED #define LED4_IO PTD16 void LED_Init(void) { GPIO_PinInit(LED1_IO,GPO,0); GPIO_PinInit(LED2_IO,GPO,0); GPIO_PinInit(LED3_IO,GPO,0); GPIO_PinInit(LED4_IO,GPO,0); } int main(void) { uint16 w1; uint16 wCnt=0; Run_to_VLPR(); NVIC_SetPriorityGrouping(NVIC_Group2); LPTMR_Init(5000); /* 优先级配置 抢占优先级1 子优先级2 越小优先级越高 抢占优先级可打断别的中断 */ NVIC_SetPriority(LPTMR0_IRQn,NVIC_EncodePriority(NVIC_GetPriorityGrouping(),1,2)); NVIC_EnableIRQ(LPTMR0_IRQn); //使能LPTMR0_IRQn的中断 Key_Init(); LED_Init(); while(1) { wCnt++; if(wCnt>=100){ wCnt=0; VLPR_to_VLPS(); } delay(0x00007fff); LED_Reverse(1); } // return 0; } Re: 用LPTMR定时器中断无法从VLPS到VLPR的唤醒问题 Hi@yankui666 MCU在进入低功耗的时候要断开调试器,否则MCU可能并不会成功进入低功耗模式 1.我没看到你初始化时钟的示例代码 2.请先初始化完成时钟,外设后再去执行RUN_TO_VLPR 3.先调通RUN模式下LPTMR再去排查
View full article
LS1046ARDB - 如何更新 SD 卡上的 U-Boot 二进制文件 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 本操作指南仅适用于 LSDK 18.09 及更早版本。对于 LSDK 18.12 及更新版本,请参考《Layerscape 软件开发套件 <版本> 文档》中的 “部署 TF-A 二进制文件” 部分。 请按照以下步骤更新 SD 卡上的 U-Boot 二进制文件。 前提条件 Linux 主机需安装 Ubuntu 18.04 64 位系统,用于编译 LSDK 18.06 或 LSDK 18.09 的 U-Boot 二进制文件。   编译 U-Boot 二进制文件 克隆 U-Boot 代码仓库: $ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot.git $ cd u-boot $ git checkout -b   LSDK- . For example, $ git checkout -b LSDK-18.09 LSDK-18.09  $ export ARCH=arm64 $ export CROSS_COMPILE=aarch64-linux-gnu- $ make distclean $ make ls1046ardb_sdcard_defconfig 如有需要,修改 U-Boot 文件。 $ make 如果 make 命令显示错误 “*** Your GCC is older than 6.0 and is not supported”,请确保使用 Ubuntu 18.04 64 位版本编译 LSDK 18.06 或 LSDK 18.09 的 U-Boot 二进制文件。        编译好的 U-Boot 镜像 u-boot-with-spl-pbl.bin 位于 u-boot/ 目录下。 你需要使用 u-boot-with-spl-pbl.bin,因为对于 SD 卡启动,ls104x 系列设备所采用的 bootloader 方式与 ls1088/ls2088/lx2160 系列设备不同。 U-Boot 二进制文件的 SD 卡起始块编号 图像 SD卡起始块号 U-Boot PBL 二进制文件 0x00008 = 8 有关所有 LSDK 固件镜像的 SD 卡起始块编号的完整列表,请参考 《带 PPA 的启动流程的闪存布局 ——LSDK 18.09》及更早版本。 U-Boot 二进制文件在 SD 卡上的起始块编号 将 SD 卡插入 Linux 主机。 在 Linux 主机上运行以下命令: $ sudo dd if=u-boot-with-spl-pbl.bin of=/dev/sdX bs=512 seek=8 conv=fsync 使用 cat /proc/partitions 命令查看设备列表及其大小, 以确保选择了正确的设备名称。 Linux 电脑中的 SDHC 存储驱动器被检测为 /dev/ sdX,其中 X 是一个字母,如 a、b、c。确保选择正确的设备名称, 因为此设备上的数据将被替换。 如果您的 Linux 主机支持直接读写 SDHC 卡,无需额外的 SDHC 卡读卡器设备,则 SDHC 卡的设备名称通常为 mmcblk0。              从 Linux 主机上移除 SD 卡。 将 SD 卡插入 LS1046ARDB 开发板,通过该 SD 卡启动开发板进入 Ubuntu 系统。你可以通过以下两种方式之一使用 SD 卡启动开发板: 设置开关:SW3 [1:8] = 01001110 且 SW5 [1:8] = 00100000;或者 切换至 SD 卡启动: => cpld reset sd 在启动日志中,您将看到: 主板:LS1046ARDB,从 SD 卡启动 如果 U-Boot 在 SD 卡上未找到 LSDK,它将从 SD 卡上存储的 lsdk_linux_arm64_tiny.itb 启动 TinyDistro。 QorIQ LS1设备
View full article
LS1046ARDB - How to update U-Boot binary on SD card This how-to topic is applicable only to LSDK 18.09 and older releases. For LSDK 18.12 and newer releases, refer Deploying TF-A binaries in Layerscape Software Development Kit  Documentation . Follow these steps to update U-Boot binary on the SD card.  Prerequisites  Ubuntu 18.04 64-bit should be installed on the Linux host machine for building LSDK 18.06 or LSDK 18.09 U-Boot binary.   Compiling U-Boot binary Clone the u-boot repository. $ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot.git $ cd u-boot $ git checkout -b   LSDK- . For example, $ git checkout -b LSDK-18.09 LSDK-18.09  $ export ARCH=arm64 $ export CROSS_COMPILE=aarch64-linux-gnu- $ make distclean $ make ls1046ardb_sdcard_defconfig If required, make changes to the U-Boot files. $ make If the make command shows the error "*** Your GCC is older than 6.0 and is not supported", ensure that you are using Ubuntu 18.04 64-bit version for building LSDK 18.06 or LSDK 18.09 U-Boot binary.         The compiled U-Boot image, u-boot-with-spl-pbl.bin, is available at u-boot/. You need to use u-boot-with-spl-pbl.bin because for SD boot, ls104x devices use different way for bootloader from ls1088/ls2088/lx2160 devices. SD card start block number for U-Boot binary Image  SD card start block number U-Boot PBL binary 0x00008 = 8 Refer the Flash layout for boot flow with PPA – LSDK 18.09 and older releases for a complete listing of the SD card start block numbers for all LSDK firmware images. Programming U-Boot binary to SD card Plug the SD card into the Linux host. Run the following command on the Linux host: $ sudo dd if=u-boot-with-spl-pbl.bin of=/dev/sdX bs=512 seek=8 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 LS1046ARDB 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] = 01001110 and SW5 [1:8] = 00100000, or boot switching to SD card: => cpld reset sd In boot log, you’ll see: Board: LS1046ARDB, boot from SD 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
View full article
HOWTO: Create a Blinking LED application project for S32G using S32 RTD No AUTOSAR This document shows the step-by-step process to create a simple blinking LED application for the S32G family using the S32 RTD non-AUTOSAR drivers. For this example used for the S32G-VNP-RDB2 EVB, connected via ethernet connection through S32 Debugger. Preparation Setup the software tools Install S32 Design Studio for S32 Platform Install the S32G development package and the S32 RTD AUTOSAR 4.4. Both of these are required for the S32 Configuration Tools. Launch S32 Design Studio for S32 Platform Procedure New S32DS Project OR Provide a name for the project, for example 'Blinking_LED_RTD_No_AUTOSAR'. The name must be entered with no space characters. Expand Family S32G2, Select S32G274A_Rev2 Cortex-M7 Click Next Now, uncheck the selection mark for other two cores.  Click '…' button next to SDKs Check box next to PlatformSDK_S32XX_2022_07_S32G274A_Rev2_M7_0. (or whichever latest SDK for the S32G is installed). Click OK Click Finish. Wait for project generation wizard to complete, then expand the project within the Project Explorer view to show the contents. To control the LED on the board, some configuration needs to be performed within the Pins Tool. There are several ways to do this. One simple way by double-click on the MEX file. By default, the Pins tool is then presented. For the Blinking LED example, one pin must be configured as output. The S32G-VNP-RDB2 EVB has an RGB LED for which each color is connect to a separate pin on the S32G-VNP-RDB2 EVB. For the blue LED the desired pin is PA_06. From the Peripheral Signals tab left to the Pins tool perspective layout, locate Open the Siul2_0 from the peripheral signals tab. And from the drop down menu select “gpio,6 PA_06” option as per shown in the following image. We are using PA_06 for the GPIO usage, so we are routing the SIUL2_0 GPIO signal to this pin. (This pin is also available for other modules like -FR, FTM, SPI_1) . The Direction required! menu will appear. Select Output then OK. In Routing Details view, notice a new line has been added and highlighted in yellow. Add ‘LED’ to the Label and Identifier columns for the PORTD 0 pin. Code Preview Go to Peripherals tool and add Siul2_Dio to enable LED blinking, it adjacent to the Blue LED on S32G-VNP-RDB2 EVB. Click on the Peripherals Tool icon from the Eclipse Perspective navigation bar. From the Components view, click on ‘Add a new configuration component…’ button from the Drivers category. This will bring up a list of all configuration components. Locate and then select the ‘Siul2_Dio’ component from the list and click OK. Do not worry about the warning message. It is only indicating that the driver is not already part of the current project. The associated driver package will be added automatically. Note: It may be necessary to change the selection at the top from ‘Present in the tool-chain project’ to ‘All’. The DIO driver provides services for reading and writing to/from DIO Channels. Also, select the Siul2_Port_1 tab and select the check mark against ‘Siul2 IP Port Development Error Detect’ option as below. The Gpio_Dio driver requires no further configuration. Click Save to store all changes to the .MEX file. Now the device configurations are complete and the RTD configuration code can be generated. Click ‘Update Code’ from the menu bar. To control the output pin which was just configured, some application code will need to be written. Return to the ‘C/C++’ perspective. If not already open, in the project window click the ‘>’ next to the ‘src’ folder to show the contents, then double click ‘main.c’ file to open it. This is where the application code will be added. Before the pin can be controlled, it needs to be initialized using the configuration information that was generated from the S32 Configuration tools. Initialize all pins using the Port driver by adding the following line: Insert the following line into main, after the comment 'Write your code here': /* Initialize all pins using the Port driver */ Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0); Now, add logic for the LED turn and off. To turn the pin on and off with some delays in-between to cause the LED to blink. Make the delays long enough to be perceptible. Add line to initialize variable uint8 i = 0; Change the code within the provided for loop, and add the following lines: //logic for blinking LED 10 times for (i=0; i<10; i++) {       Siul2_Dio_Ip_WritePin(LED_PORT, LED_PIN, 1U);       level = Siul2_Dio_Ip_ReadPin(LED_PORT, LED_PIN);       TestDelay(2000000);       Siul2_Dio_Ip_WritePin(LED_PORT, LED_PIN, 0U);       level = Siul2_Dio_Ip_ReadPin(LED_PORT, LED_PIN);       TestDelay(2000000); } return (0U); And add this line above the main() function to initialize the variable volatile uint8 level; Before the 'main' function, add a delay function as follows: void TestDelay(uint32 delay); void TestDelay(uint32 delay) {    static volatile uint32 DelayTimer = 0;    while (DelayTimer    {        DelayTimer++;    }    DelayTimer=0; } Update the includes lines at the top of the main.c file to include the headers for the drivers used in the application: Remove #include "Mcal.h" Add #include "Siul2_Port_Ip.h" #include "Siul2_Dio_Ip.h" Build 'Blinking_LED_RTD_No_AUTOSAR'. Select the project name in 'C/C++ Projects' view and then press 'Build'. After the build completes, check that there are no errors. Open Debug Configurations and select 'Blinking_LED_RTD_No_AUTOSAR_Debug_RAM'. Make sure to select the configuration which matches the build type performed, otherwise it may report an error if the build output doesn’t exist. Now, you need to Select the Interface (Ethernet or USB) by which the S32 Debug Probe is connected. If connected via USB and this option is selected for interface, then the COM port will be detected automatically (in the rare event where 2 or more S32 Debug Probes are connected via USB to the host PC, then it may be necessary to select which COM port is correct for the probe which is connected to the EVB) If connected via Ethernet, enter the IP address of the probe. See the S32 Debug Probe User Manual for ways to determine the IP address. Click Debug To see the LED blink, click ‘Resume'. This code as it will blink the LED times, you can make changes in for loop condition to blink it infinitely. Re: HOWTO: Create a Blinking LED application project for S32G using S32 RTD No AUTOSAR I'm attempting to use a S32G-VNP-RDB3 to evaluate the S32G3. I follow this HOWTO and what I see with a newly installed S32 DS matches fairly well until 13. First, I don't understand the "it adjacent to the Blue LED on S32G-VNP-RDB2 EVB." This section of the HOWTO seems to be working within the S32 DS so I don't understand the reference to a LED location of the evaluation board. Second, I don't see Siul2_Port_1 or Siul2_Dio shown from step 13b and beyond. I'm attempting to attach an image that shows what I see.
View full article
HDMI Audio Setting 1. Set up HDMI 2. Test raw audio 3. Make HDMI audio the default output 4. Encoded audio 1. Set up HDMI Set up your kernel to use HDMI adding the following code to bootargs on u-boot: video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 2. Test raw audio In order to test only raw audio, use the following command: aplay -D hw:1,0 Kaleidoscope.wav 3. Make HDMI audio the default output In order to configure audio output over HDMI, please, replace content of file ~/.asoundrc to the following one pcm.dmix_48000{      type dmix      ipc_key 5678293      ipc_key_add_uid yes      slave{           pcm "hw:1,0"           period_time 0           period_size 2048           buffer_size 24576           format S16_LE           rate 48000      } } pcm.!dsnoop_44100{      type dsnoop      ipc_key 5778293      ipc_key_add_uid yes      slave{           pcm "hw:0,0"           period_time 0           period_size 2048           buffer_size 24576           format S16_LE           rate 44100      } } pcm.!dsnoop_48000{      type dsnoop      ipc_key 5778293      ipc_key_add_uid yes      slave{           pcm "hw:1,0"           period_time 0           period_size 2048           buffer_size 24576           format S16_LE           rate 48000      } } pcm.asymed{      type asym      playback.pcm "dmix_48000"      capture.pcm "dsnoop_44100" } pcm.dsp0{      type plug      slave.pcm "asymed" } pcm.!default{      type plug      route_policy "average"      slave.pcm "asymed" } ctl.mixer0{      type hw      card 0 } This will configure alsa to use sound card hw:1,0. Please, pay attention to use the proper audio card name for your device. In order to see available sound cards on board: root@imx53qsb:~# aplay -l **** List of PLAYBACK Hardware Devices **** card 0: imx3stack [imx-3stack], device 0: SGTL5000 SGTL5000-0 []   Subdevices: 1/1   Subdevice #0: subdevice #0 card 1: imx3stackspdif [imx-3stack-spdif], device 0: IMX SPDIF mxc spdif-0 []   Subdevices: 1/1   Subdevice #0: subdevice #0 For detail on how to create asound.conf, please see alsa-lib configuration introduction. 4. Encoded audio For encoded (i.e. AC3, DTS) audio, you can use, for example, ac3dec, an utility provided by alsa-tools with the following command line: ac3dec -D hw:1,0 -C test.ac3 This would work for both HDMI audio and SPDIF audio. Double check your hardware and/or schematic in order to know which one to use. i.MX53 Multimedia Re: HDMI Audio Setting Dear Daiane Angolini, I created a new ticket through SR. Please check the below case from SR. [Case:00198948] How to configure the HDMI Audio as 24bit in i.MX6Q / Linux 3.14.52 Best Regards, Eric. Re: HDMI Audio Setting Could you, please, create a new ticket? Otherwise it might get off the radar Re: HDMI Audio Setting Dear Daiane Angolini, I want to know how to configure the HDMI Audio as 24bit in i.MX6Q / Linux 3.14.52. Please let me know how to do that. It's very helpful to me if you tell me how to confirm that in i.MX6Q Evaluation board. Actually I could confirm the below contents in the some documents. - HDMI Audio 24bit is supported in the i.MX6Q Reaference Manual   . Table 33-6. Data Arrangement in System Memory for L-PCM (24 bits) in Chapter 33   . - HDMI Audio 24bit is NOT supported in the i.MX6 Linux Reference Manual for Linux 3.14.52   . Chapter 15 On-Chip High Definition Multimedia Interface (HDMI) Driver   . Best Regards, Eric. Re: HDMI Audio Setting look for some pulseaudio conf file. Create a bbappend on your meta layer in order to add this by default on your image. (sorry, i don't know pulseaudio ) Re: HDMI Audio Setting i think the pulseaduio detect the output of audio, sometime is HDMI and sometime is the other, so i need to specify the HDMI as the default output, how to do ? Re: HDMI Audio Setting it looks like bad, i also stat up the daemon like what i said in mail list, i restart again with command "pulseaudio -D", the output of audio is not from HDMI except the "card 0: wm8962audio [wm8962-audio], device 0: HiFi wm8962-0 []" it's really strange, help... Re: HDMI Audio Setting Well, I think you make it work (by your comment on meta-freescale) Re: HDMI Audio Setting Hi,      There is not the command "pacmd", just "pactl". BTW, i use the YOCTO project of FSL community to build all, what is my next step about for your ask ? Re: HDMI Audio Setting ohhhhhhhhhhhh you´re right! the way to configure pulseaudio is different.... From my old emails, I got this command line: pacmd set-default-sink 1 Could you, please, give it a try and let us know the results? Re: HDMI Audio Setting good, it really works if i use the native app to play audio in IMX6QSD but there is no audio output from HDMI with the pulse audio server. the output of audio just is from the "wm8962audio" as bellow in my IMX6QSD, any advices about this ? i want to use pulse audio server to output in HDMI interface. root@imx6qsabresd:~# aplay -l **** List of PLAYBACK Hardware Devices **** card 0: wm8962audio [wm8962-audio], device 0: HiFi wm8962-0 []   Subdevices: 1/1   Subdevice #0: subdevice #0 card 1: imxhdmisoc [imx-hdmi-soc], device 0: IMX HDMI TX mxc-hdmi-soc-0 []   Subdevices: 0/1   Subdevice #0: subdevice #0 Re: HDMI Audio Setting Hello, Very beautiful guide, how to set default SPDIF audio card on Android ? Thanks
View full article
LS1046ARDB - SD カード上の U‑Boot バイナリを更新する方法 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> このハウツートピックは、LSDK 18.09 およびそれ以前のリリースにのみ適用されます。LSDK 18.12 以降のリリースについては、TF‑A バイナリのデプロイ を Layerscape Software Development Kit  ドキュメント で参照してください。 SDカード上のU-Bootバイナリを更新するには、次の手順に従ってください。 前提条件 LSDK 18.06 または LSDK 18.09 の U‑Boot バイナリをビルドするには、Linux ホストマシンに Ubuntu 18.04 64‑bit をインストールしておく必要があります。   U‑Boot バイナリのコンパイル u-boot リポジトリをクローンします。 $ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot.git $ cd u-boot $ git checkout -b   LSDK- . For example, $ git checkout -b LSDK-18.09 LSDK-18.09  $ export ARCH=arm64 $ export CROSS_COMPILE=aarch64-linux-gnu- $ make distclean $ make ls1046ardb_sdcard_defconfig 必要に応じて、U-Bootファイルに変更を加えてください。 $ make make コマンドで "*** Your GCC is older than 6.0 and is not supported" というエラーが表示された場合は、LSDK 18.06 または LSDK 18.09 の U‑Boot バイナリをビルドする際に Ubuntu 18.04 64‑bit を使用していることを確認してください。        コンパイル済みの U‑Boot イメージ u-boot-with-spl-pbl.bin は u-boot/ に生成されます。 SD ブートでは ls104x デバイスが ls1088/ls2088/lx2160 デバイスとは異なるブートローダ方式を採用しているため、u-boot-with-spl-pbl.bin を使用する必要があります。 U‑Boot バイナリの SD カード開始ブロック番号 イメージ SD カードの開始ブロック番号 U-Boot PBL バイナリ 0x00008 = 8 すべての LSDK ファームウェアイメージの SD カード開始ブロック番号の完全な一覧については、PPA – LSDK 18.09 およびそれ以前のリリースのブートフロー用フラッシュレイアウト を参照してください。 U‑Boot バイナリを SD カードに書き込む SD カードを Linux ホストに挿入します。 Linux ホストで次のコマンドを実行してください。 $ sudo dd if=u-boot-with-spl-pbl.bin of=/dev/sdX bs=512 seek=8 conv=fsync cat /proc/partitions コマンドを使用して、デバイスとそのサイズの一覧を表示します。 正しいデバイス名が選択されていることを確認してください。 Linux PC の SDHC ストレージドライブは /dev/sdX として検出されます。X は a、b、c などの文字です。必ず正しいデバイス名を選択してください。このデバイス上のデータは上書きされます。 Linux ホストマシンが追加の SDHC カードリーダーなしで SDHC カードの読み書きを直接サポートしている場合、そのデバイス名は通常 mmcblk0 になります。              LinuxホストマシンからSDカードを取り外してください。 SD カードを LS1046ARDB に挿入し、SD カードから Ubuntu を起動します。SD カードでボードを起動する方法は次のいずれかです。 スイッチの設定: SW3[1:8] = 01001110 および SW5 [1:8] = 00100000、または SD カードへのブート切り替え: => cpld reset sd ブートログには、次の内容が表示されます。 ボード: LS1046ARDB、SD から起動 U‑Boot が SD カード上で LSDK を検出できない場合、SD カードに保存された lsdk_linux_arm64_tiny.itb から TinyDistro を起動します。 QorIQ LS1デバイス
View full article
Example MCAL S32K312 MEM_InFls DS3.5 RTD300 *******************************************************************************  The purpose of this demo application is to present a usage of the MEM_InFls MCAL Driver for the S32K3xx MCU.  The example uses MEM_InFls driver to write 128 bytes to FLASH memory address  0x50_0000 .  ------------------------------------------------------------------------------ * Test HW: S32K3X2EVB-Q172 * MCU: S32K312 * Compiler: S32DS3.5 * SDK release: RTD 3.0.0 * Debugger: PE micro * Target: internal_FLASH ******************************************************************************** Results :-- Ram location where FLASH writing erase code is placed :-- I placed the code at 256 byte below the MAX address of the RAM size 0x20417DAA = 541162922 Size of RAM need to save the flashing routine, as per the MAP & linker file :-- 0x00407e64 - 0x00407e38 = 44 bytes  S32K3 FLASH Memory Terminology :--  
View full article
Regulatory Domain and Wi-Fi Tx Power Level Management in Linux (Country regulatory settings) Default init case By default, when no country regulatory setting is defined, we use WW (World Wide safe setting, meaning we only transmit on bands which are allowed worldwide, with the TX power compatible with all countries regulations)   Setting country 1/ When operating in AP mode: - we usually set country code (ex : country_code=JP) in hostapd.conf to define the country. - this country definition will be advertised to all connected STA if ieee80211d=1 is set in hostpad.conf - the country can also be set with "iw reg set" command   2/ When operating in STA mode - country code can be set with "iw reg set" command or in wpa_supplicant.conf (ex : country=jp) - once connected to the AP (with 80211d enabled), the STA will switch to the AP country setting (this behaviour can be disabled by adding country_ie_ignore=1 driver parameter)   Once country is set: - we will only transmit on channels allowed for that country - with country maximum TX power - we might use DFS feature on channels declared as DFS channels for that specific country   TX power settings   1/ By default, using Linux regulatory settings (/lib/firmware/regulatory.db, generated from db.txt) These settings define allowed channels, DFS flags and max TX power on a country basis See section "Regulatory db" further.   2/ Linux regulatory settings can be overwritten by: a. cntry_txpwr=0 and txpwrlimit_cfg=nxp/txpower.bin driver param (generated from txpower.conf (channel/MCS->txpower), see AN13009) Same setting for all countries (static). Using channels/flags from db.txt, and minimum TX power between db.txt and txpower.bin/rgpower.bin b. cntry_txpwr=1 (look for nxp/txpower_XX.bin files (generated from txpower.conf (channel/MCS->txpower), see AN13009) Need one txpower_XX.bin file for each country XX (dynamically loaded, for instance with iw reg set XX) Using channels/flags from db.txt, and minimum TX power between db.txt and txpower_XX.bin   cntry_txpwr txpwrlimit_cfg TX power limit Method 0 nxp/txpower.bin nxp/txpower.bin (static) V1 1 - nxp/txpower_XX.bin (dynamic) V1 cfg     We have default TX power tables, but customer can tune these TX power settings, based on their HW. Please refer to "AN13009 Wi-Fi Tx Power Management in Linux"       Regulatory db   Source https://wireless.wiki.kernel.org/en/developers/Regulatory/wireless-regdb   Wifi regulatory setting (allow channels, etc) are defined in db.txt, then converted to regulatory.db (store in /lib/firmware) We can get official db.txt from here, and build regulatory.db with below command   git clone git://git.kernel.org/pub/scm/linux/kernel/git/wens/wireless-regdb.git make   Kernel regulatory.db integrity is checked by the Linux kernel. Disabling REGDB signature check with the folllowing kernel config: CONFIG_EXPERT=y CONFIG_CFG80211_CERTIFICATION_ONUS=y # CONFIG_CFG80211_REQUIRE_SIGNED_REGDB is not set   Rebuilding kernel and flashing scp Image [email protected]:/run/media/mmcblk0p1/      iw reg command examples and other notes   root@imx8mqevk:~# iw reg get global country 00: DFS-UNSET         (2402 - 2472 @ 40), (N/A, 20), (N/A)         (2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, PASSIVE-SCAN         (2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, PASSIVE-SCAN         (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, PASSIVE-SCAN         (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, PASSIVE-SCAN         (5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, PASSIVE-SCAN         (5735 - 5835 @ 80), (N/A, 20), (N/A), PASSIVE-SCAN         (57240 - 63720 @ 2160), (N/A, 0), (N/A) root@imx8mqevk:~# iw reg get global country FR: DFS-ETSI         (2400 - 2483 @ 40), (N/A, 20), (N/A)         (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW         (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW         (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS         (5725 - 5875 @ 80), (N/A, 13), (N/A)         (57000 - 66000 @ 2160), (N/A, 40), (N/A) By default (if no country is set), we are using the world domain. this is the most restrictive. Then you can set the country (using driver module parameter, wpa_supplicant.conf, etc) or get the country automatically provided by the access point (80211d). This will update the regulatory domain, meaning the allowed channels, etc. You can check the country settings with "iw reg get" command. The regulatory domain has priority, compared to the channel list you would set in the wpa_supplicant.conf. OS LINUX Product: WiFi 88MW32X Product: WiFi 88W8801 Product: WiFi 88W8897 Product: WiFi 88W8987 Product: WiFi 88W8997 Product: WiFi 88X9098 Product: WiFi IW416 Product: WiFi IW6XX Product: WiFi RW6XX Protocol: Wi-Fi
View full article
ウェビナー:今すぐ登録して、i.MX RT1170で魅力的なIoTエクスペリエンスを作成する方法を学びましょう いつ: 9月14日火曜日の午前11時(東部標準時) 今すぐ登録するには、ここをクリックしてください。 ディスカッションのトピック 民生機器から産業機器へ、すでにパラダイムシフトが始まっています。スマートフォンでの日常的な体験は、私たちが使用する組み込み製品の基盤として、より高いパフォーマンス、より多くの接続性、および優れたユーザーエクスペリエンスに対する需要を後押ししています。 しかし、どうすれば製品を次のレベルに簡単に引き上げることができますか? NXPとCrank Softwareに参加して、NXP I.MX RT1170クロスオーバーMCUが作成に適した組み込みハードウェアであり、開発リスクの低減に役立つ理由と、魅力的なユーザーエクスペリエンスの開発が開発ワークフローの一部になることがどのように簡単になるかを学びます。 このセッションでは、次のことを学びます。 i.MX RT [1170] クロスオーバー・マイコンによる電力と性能の最適化について エンベデッドGUI開発が、開発とデザインの間のコラボレーション・エクスペリエンスになる仕組み Storyboardのラピッドデザインとイテレーションテクノロジーが開発中のUIデザインの変更をどのように受け入れるか ハードウェアの可能性を最大限に引き出すためにどのような統合機能が役立つか ストーリーボードのライブデモによるGUIアプリの開発のしやすさ
View full article
带 DMA 的 S32K358 RTD ICU 示例 德拉支持、 我的客户 Aptiv 正在寻找基于 DMA 的 ICU 处理。根据传入的上升沿,应在 mcl 驱动程序中配置 DMA 交易。在我们的 RTD ICU 用户手册中,自某些版本发布以来,我们发现了同样的说法: 3.6.1 带有 DMA 功能的 Icu 有关此功能 的提示将在下一版本中添加。 它在 RTD5.00 / 6.0.0 和 7.0.0 中 我们是否有工作示例向 Aptiv 演示如何使用该功能? 最好是 S32K358 RTD6.0.0,但如果有其他版本也可以。 顺祝商祺! 维克托 优先级:高 RTD 资料来源直接客户 Re: S32K358 RTD ICU Example with DMA 你好@viktorfellinger、 该功能有一些注意事项: - DMA 只支持 IcuMeasurementMode 为 ICU_MODE_SIGNAL_MEASUREMENT 或 ICU_MODE_TIMESTAMP。 - DMA 功能仅支持 eMios SAIC 模式下的 ICU_MODE_SIGNAL_MEASUREMENT。 - 只有部分 Emios 通道支持 DMA,您可以通过所附的 excel 找到这一点:RM 中的 S32K3xx_DMAMUX_map,就像这样: 在我的例子中,我使用 Emios_0,通道 1 来测量信号。 在 Icu: 在 Mcl 中,使用 DMA_TCD0 在 Rm: 在平台上: 我在这里附上了我在软件包中使用所附示例 (RTM600) 的示例,然后添加了这个功能。 我还创建了票证:ARTDCT1-637,以便 SW 团队可以在下一个版本中更新本章。 顺祝商祺! Nhi
View full article
PN7160 PN7220 Android 15 移植到 i.MX8MN-EVK 简介 我们有一份官方的PN7160/PN7220 Android 15移植指南(PN7160/PN7220 – Android 15 移植指南)。但这些补丁仅适用于Android 15 AOSP r1(android-15.0.0_r1)。如果用户想移植到较新版本的AOSP,在源代码编译过程中会出现很多错误。本文件供客户参考,以便逐一解决错误。 注意:所有修改仅供参考。它们不是 NXP 官方针对 AOSP 新版本移植提供的补丁。因此,这些修改可能并非最佳解决方案。请客户根据自身需求修改 AOSP 源代码。 硬件板: i.MX8MN EVK PN7160 EVK PN7220 EVK 为 i.MX8MN EVK 构建 Android 我使用的 i.MX Android BSP 是 Android 15.0.0_2.0.0 (L6.12.20_2.0.0 BSP),可从此处下载:用于 i.MX 应用处理器的 Android 操作系统 | NXP 半导体。 1. 下载"文档"和"安装代码包"。 2. 首先按照 Android BSP 为 i.MX8MN EVK 构建 Android BSP。 根据 android_build/.repo/manifests/aosp-android-15.0.0_2.0.0.xml,您将看到 AOSP 版本是 android-15.0.0_r32。 现在,请按照 PN7160/PN7220 – Android 15 移植指南,将 NFC 移植到 i.MX Android BSP。 1. 内核驱动程序: 为了与 PN7220 或 PN7160 建立连接,Android 协议栈使用 nxpnfc 内核驱动。您可以从下面的 GitHub 链接下载驱动程序: nfcandroid_platform_drivers/drivers at br_ar_16_comm_infra_dev · nxp-nfc-infra/nfcandroid_platform_drivers · GitHub git clone "https://github.com/nxp-nfc-infra/nfcandroid_platform_drivers.git"-b br_ar_16_comm_infra_dev 驱动程序适用于 Kernel 6.6 和 6.12。因此,请下载适合您移植的正确版本。例如,i.MX Android BSP Android 15.0.0_2.0.0 中的 Kernel 版本为 6.12。因此,我将使用针对 6.12 的驱动程序进行移植。 在移植过程中,请确保 Makefile 和 Kconfig 文件中的 PATH 设置正确。 例如在我的移植中: android_build/vendor/nxp-opensource/kernel_imx/drivers/nfc$ tree . ├── Kconfig ├── Makefile └── pn7160 ├── common.c ├── common.h        ├── i2c_drv.c        ├── i2c_drv.h        ├── Kbuild         ├── Kconfig         ├── Makefile         ├── spi_drv.c        └── spi_drv.h 1 个目录,11 个文件 android_build/vendor/nxp-opensource/kernel_imx/drivers/nfc$ cat Makefile # # 内核NFC设备驱动程序的Makefile。 # obj-y += pn7160/ android_build/vendor/nxp-opensource/kernel_imx/drivers/nfc$ cat Kconfig source "drivers/nfc/pn7160/Kconfig" 2. 将 “nxpnfc” 添加到 i.MX8MN EVK 设备树文件中。 在板上显示连接表。 显示图片 &i2c3 { clock-frequency = <100000>; pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c3>; pinctrl-1 = <&pinctrl_i2c3_gpio>; scl-gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>; sda-gpios = <&gpio5 19 GPIO_ACTIVE_HIGH>; status = "okay"; nxpnfc@28{ compatible = "nxp,nxpnfc"; reg = <0x28>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_nfc>; nxp,nxpnfc-irq = <&gpio3 22 0>; nxp,nxpnfc-ven = <&gpio3 20 0>; nxp,nxpnfc-fw-dwnld = <&gpio3 21 0>; }; &iomuxc {         pinctrl_nfc: nfcgrp {                 fsl,pins = <                         MX8MN_IOMUX_SAI5_RXC_GPIO3_IO20                 0X19  // VEN MX8MN_IOMUX_SAI5_RXD0_GPIO3_IO21 0X19 // FW-DWNLD MX8MN_IOMUX_SAI5_RXD1_GPIO3_IO22 0X19 // IRQ                 >;         }; 显示示意图。 3. 修改 imx8mn_gki.fragment nano vendor/nxp-opensource/kernel_imx/arch/arm64/configs/imx8mn_gki.fragment 添加 CONFIG_NXP_NFC_I2C=m 4. 转到设备 device/nxp/imx8m/evk_8mn/ 修改 BoardConfig.mk。 # selinux permissive +BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive BOARD_SEPOLICY_DIRS := \ $(CONFIG_REPO_PATH)/imx8m/sepolicy \        $(IMX_DEVICE_PATH)/sepolicy  \ +       vendor/nxp/nfc/sepolicy \ + vendor/nxp/nfc/sepolicy/nfc ShareBoardConfig.mk     $(KERNEL_OUT)/drivers/net/phy/realtek.ko \ $(KERNEL_OUT)/drivers/pps/pps_core.ko \     $(KERNEL_OUT)/drivers/ptp/ptp.ko \ $(KERNEL_OUT)/drivers/net/ethernet/freescale/fec.ko + $(KERNEL_OUT)/drivers/nfc/nfc/nxpnfc-i2c.ko endif     $(KERNEL_OUT)/drivers/trusty/trusty-core.ko \     $(KERNEL_OUT)/drivers/trusty/trusty-log.ko \     $(KERNEL_OUT)/drivers/trusty/trusty-ipc.ko \     $(KERNEL_OUT)/drivers/trusty/trusty-virtio.ko \ + $(KERNEL_OUT)/drivers/nfc/nfc/nxpnfc-i2c.ko else BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \     $(KERNEL_OUT)/drivers/input/touchscreen/goodix_ts.ko \     $(KERNEL_OUT)/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_i2c.ko endif Compatibility_matrix.xml         netutils-wrapper 1.0     android.hardware.emvco 1         IEmvco default     device_framework_matrix.xml nxp.hardware.secureime 1 ISecureIME default     nxp.hardware.imx_dek_extractor 1 IDek_Extractor default     vendor.nxp.nxpnfc 2.0 INxpNfc default     android.hardware.emvco 1 IEmvco default     evk_8mn.mk # -------@block_bluetooth------- # Bluetooth HAL PRODUCT_PACKAGES += \     android.hardware.bluetooth \     android.hardware.bluetooth-service.default.nxp # NXP 8987 蓝牙厂商配置 PRODUCT_PACKAGES += \ bt_vendor.conf # ------nfc------- $(call inherit-product, vendor/nxp/nfc/device-nfc.mk) $(call inherit-product, vendor/nxp/emvco/device-emvco.mk) PRODUCT_PACKAGES += \ android.hardware.nfc-service.nxp PRODUCT_PACKAGES += \         com.nxp.emvco \         com.nxp.nfc \ nfc_nci_nxp_pn72xx # -------@block_usb------- Init.rc 在 post-fs && property:vendor.skip.charger_not_need=0     # 一次只交换一页     写入 /proc/sys/vm/page-cluster 0 # 授予获取 statsd 的 available_pages 信息的权限 chown system system /proc/pagetypeinfo     chmod 0440 /proc/pagetypeinfo     exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d \ /vendor/lib/modules nxpnfc_i2c 写入 /sys/power/wake_lock nosleep 在 post-fs-data && property:vendor.skip.charger_not_need=0 setprop vold.post_fs_data_done 1 ueventd.nxp.rc /sys/devices/virtual/thermal/thermal_zone* trip_point_0_hyst 0660 系统 系统 /sys/devices/virtual/thermal/thermal_zone* trip_point_1_hyst 0660 系统 系统 /dev/dmabuf_imx           0664   系统     系统 /sys/class/backlight/* 亮度 0660 系统 系统 /dev/ttymxc1              0666   nfc   nfc /dev/ttymxc2 0666 nfc nfc /dev/nxpnfc 0666 nfc nfc # 用于 libcamera /dev/media* 0660 system camera /dev/v4l-subdev* 0660 系统摄像头 5. hardware/interfaces/compatibility_matrices/compatibility_matrix.202404.xml android.hardware.wifi.hostapd 1 IHostapd default     android.hardware.wifi.supplicant 2 ISupplicant default     nxp.hardware.imx_dek_extractor 1 IDek_Extractor default     vendor.nxp.nxpnfc 2.0 INxpNfc default     vendor.nxp.emvco 1 INxpEmvco default     6.  android_build/vendor/nxp/nfc/device-nfc.mk android_build/vendor/nxp/emvco/device-emvco.mk 两种方法。 1. 将 NXP NFC 补丁应用到 Android AOSP,然后进行构建。如果 Android 版本过新,将会出现大量错误。 2. 先将 R1 文件复制到 R30,然后应用 NXP NFC 补丁。然后构建。 我使用第二种方法。 下载 AOSP R1 源代码。 将 R1 复制并替换以下文件夹。 应用补丁。 版本代码。 以下是错误列表及参考解决方案。
View full article
【新手指南】如何构建 Yocto Linux BSP - i.MX FRDM 开发板版(日语博客) 本指南将向您展示如何使用 i.MX FRDM 板作为基础构建 Yocto Linux。 本文以 FRDM-IMX93 为例,但同样的步骤也可用于在其他 i.MX FRDM 板上进行构建。 本文以“Linux 6.12.49_2.2.0 ( Yocto 5.2 “Walnascar” )”为例,描述了 Yocto Linux BSP。 问:i.MX FRDM 板是什么? 答:i.MX FRDM 开发板是一款价格更实惠、体积更小的开发板,相比恩智浦功能齐全的 EVK 开发板,它的功能有所减少。其目的是方便用户进行基本的评估和原型设计。 1. 环境与准备 1.1.环境 大项目 小项目 内容 备注 文档 - IMX_YOCTO_PROJECT_USERS_GUIDE.pdf (这是主要方法。它描述了构建 BSP 的步骤。) i.MX Linux ®发行说明 (您可以查看支持功能列表。) i.MX 移植指南 (实际实施时需要注意的要点总结) 点击此处下载Yocto Linux 通用文档。 硬件 FRDM板 FRDM-IMX8MPLUS FRDM-IMX91S FRDM-IMX91 FRDM-IMX93 FRDM-IMX95 本章将以 FRDM-IMX93 为基础进行解释。 主机 PC Ubuntu 环境 ・VMware/Virtual Box 等(在 Windows 上) ・Native Linux 以下选项之一 推荐版本:Ubuntu 22.04 或更高版本 SD卡+读卡器/写入器 建议使用 16GB 或更多内存   硬件 (选项) MIPI 摄像头 (选项) 兼容BSP的MIPI相机 (参见 i.MX Linux ®发行说明) USB摄像头也可以替代(可能会出现延迟) 显示 (选项) 展示   USB 设备 (选项) USB鼠标、USB存储器   耳机 (选项) 3.5mm 耳机 带麦克风的耳机(例如老款 iPhone 附带的耳机)更好。 软件 Yocto 环境 Linux BSP (这次我们使用了 Linux 6.12.49_2.2.0( Yocto 5.2 “Walnascar” )) 本文将介绍安装过程,包括安装方法。 1.2.图例 命令提示符图例 =>           u-bootプロンプト $            BSPがインストールされているLinux PCのプロンプト 2. 主机 推荐使用 Ubuntu 22.04 桌面版。为了获得较为流畅的使用体验,建议使用至少配备 8 个线程和 16GB 内存的主机。所需的存储空间会根据具体项目而有所不同,小型项目大约需要 50GB,大型项目则需要 500GB。 2.1。Yocto 所需的软件包 请按照以下步骤安装所需的软件包。 $ sudo apt-get install build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3- jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xzutils zstd efitools curl 注意:除了 IMX_YOCTO_PROJECT_USERS_GUIDE.pdf 中的信息外,还添加了curl 。 2.2. 设置交换文件 以下是设置 32GB 交换文件的示例。 $ sudo fallocate -l 32G /swapfile $ sudo chmod 600 /swapfile $ sudo mkswap /swapfile $ sudo swapon /swapfile 注意:如果/swapfile 目录已存在,则第一行命令将失败。如果要更改其大小,请执行以下命令,然后再运行上面的命令。 $ sudo swapoff /swapfile $ sudo rm /swapfile 要在主机启动时自动挂载交换文件,请将以下行添加到/etc/fstab文件中: /swapfile none swap sw 0 0 3. Yocto Linux BSP 从 nxp.jp 网站的“i.MX 应用处理器的嵌入式 Linux”部分,选择所需的 Linux BSP 版本,并获取 i.MX Yocto 项目用户指南。 按照 i.MX Yocto 项目用户指南 (IMXLXYOCTOUG) 中的“4 Yocto 项目设置”部分的步骤创建映像。 本文档假设使用以下设置生成图像。 发行版 = fsl-imx-xwayland 机器 = imx93-11x11-lpddr4x-frdm 3.1. 设置和构建 Yocto BSP 有关主机设置,请参阅 2. 主机。 3.1.1.安装仓库实用程序 $ mkdir ~/bin $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo 3.1.2. 将存储库添加到您的 PATH 环境变量中 将以下行添加到$HOME/.bashrc文件中: export PATH=~/bin:$PATH 3.1.3.Git 设置 $ git config --global user.name "Your Name" $ git config --global user.email "Your Email" $ git config --list 3.1.4.Yocto BSP 设置 $ mkdir imx-yocto-bsp $ cd imx-yocto-bsp $ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-walnascar -m imx-6.12.49-2.2.0.xml $ repo sync 3.1.5.设置构建目标,构建 $ MACHINE=imx93-11x11-lpddr4x-frdm DISTRO=fsl-imx-xwayland source ./imx-setup-release.sh -b build $ bitbake imx-image-full *构建完成后,将生成一个 Linux 镜像。 * 有关如何写入生成的映像的说明,请参阅您的特定 FRDM 板的入门指南中的步骤 1 和 2。 FRDM-IMX8MPLUS 入门指南 FRDM-IMX91 入门指南 FRDM-IMX91S 入门指南 FRDM-IMX93 入门指南 FRDM-IMX95 入门指南 注意:如果您想为其他 FRDM 板构建 Linux BSP,请将上述命令中的“ MACHINE= ”部分替换为以下名称。 imx8mp-lpddr4-frdm (FRDM-IMX8MPLUS) imx91-11x11-lpddr4-frdm (FRDM-IMX91) imx91-11x11-lpddr4-frdm-imx91s (FRDM-IMX91S) imx93-11x11-lpddr4x-frdm (FRDM-IMX93) imx95-15x15-lpddr4x-frdm (FRDM-IMX95) 注意:对于图形功能,您还可以使用上述命令中的“ DISTRO = ”部分选择发行版。 fsl-imx-wayland (Wayland) fsl-imx-xwayland (与使用 Wayland 和 X11 *EGL 的 X11 应用程序不兼容) 注意:每个项目只能使用imx-setup-release.sh脚本进行一次设置。如果对现有项目执行此操作,将会生成诸如conf/local.conf之类的新文件,并且您之前的设置将会丢失。如果您希望重用现有项目……3.3.1.请参阅“从现有构建目录恢复工作”。 注意:根据主机配置的不同,构建过程可能需要数十小时。此外,预计会占用 400-500GB 的存储空间。 注意:在多核多线程主机上构建时,如果内存不足以支持所有线程,则会发生内存交换。限制线程数的方法将在 3.4.2 节中介绍。请参阅“限制构建过程中运行的线程数”。 注意:Ubuntu 22.04 初始状态下可能未配置交换分区,这会导致系统运行极其缓慢甚至崩溃。交换分区文件配置如下:2.2.请参阅有关配置交换文件的章节。 以下信息仅供参考。 3.2 构建和安装工具链 您可以构建和安装交叉编译器等工具链。通过使用此处生成的脚本,您可以避免交叉编译过程中经常出现的问题,例如找不到要链接的包含文件或库。 3.2.1.工具链的构建 $ bitbake imx-image-full -c populate_sdk 3.2.2.安装 $ tmp/deploy/sdk/fsl-imx-xwayland-glibc-x86_64-imx-image-full-armv8a-imx93-11x11-lpddr4x-pf0900-evk-toolchain-6.12-walnascar.sh 这里我们就不解释如何使用该工具链了。 3.3.常用的 Yocto bitbake 命令和设置 3.3.1.从现有构建目录继续工作。 $ cd /path/to/imx-yocto-bsp $ source ./setup-environment build 注意:这里提到的路径和目录来自 3.1.4 节。Yocto BSP 设置,3.1.5。构建目标设置在构建过程中已配置。 下面我们将以 linux-imx 为例,给出一些命令示例。您可以将“ linux-imx ”替换为其他软件包名称,对每个软件包执行相同的操作。 3.3.2. 软件包的重新构建 $ bitbake -c compile linux-imx -f $ bitbake -c install linux-imx $ bitbake -c deploy linux-imx 如果不添加注释-f ,则可以跳过这些步骤。 注意 - 某些软件包在使用 `-c deploy` 进行部署时可能会显示错误,但在大多数情况下,这仅仅是因为 `do_deploy` 命令不可用,因此您可以忽略该错误。 3.3.3 删除软件包 如果某个软件包出现不应发生的错误,请尝试使用以下命令删除该软件包,然后重试。这或许可以解决错误。(这是因为软件包可能在下载过程中损坏,或者如果构建过程过早终止,则可能残留一些垃圾数据。) $ bitbake -c cleansstate linux-imx 注意:提取出的所有源代码都将被删除,因此如果您正在编辑任何文件,请务必小心。 3.3.4. 软件包提取 如果您只想提取软件包而不想编译它 $ bitbake -c patch linux-imx 3.3.5. 将更改应用到配置文件 如果您想更改配置文件(例如arch/arm64/configs/imx_v8_defconfig )并希望这些更改生效: $ bitbake -c configure linux-imx $ bitbake -c compile linux-imx -f 3.3.6. 运行 linux-imx menuconfig 更改 Linux 内核的构建选项时 $ bitbake -c menuconfig linux-imx 此时会弹出一个类似这样的窗口,请进行必要的更改并保存(使用十字光标键选择所需项目,然后按空格键确认)。 有关建造方面的技巧,请参考以下文章。 Yocto Linux BSP 构建技巧 - i.MX 8M Plus 版 ========================= 即使您在本文的“评论”栏留言,我们目前也无法回复。 给您带来不便,我们深感抱歉。请在询问时参阅“NXP技术问题-联系方式(日本博客)”。 (如果您已经是NXP的代理商或与其有合作关系,可以直接向负责人咨询。) 本指南将向您展示如何使用 FRDM(Freedom)板构建 Linux BSP,使您能够以紧凑且经济实惠的方式开始使用嵌入式 Linux。 本文以 FRDM-IMX93 为例,但同样的步骤也可用于在其他 i.MX FRDM 板上进行构建。 本文以“Linux 6.12.49_2.2.0 (Yocto 5.0.4)”为例,对 Yocto Linux BSP 进行了描述。 i.MX 处理器 SW | 下载 日本博客
View full article
NXP Model-Based Design Toolbox for S32K3 version 1.8.0 - Product Release Announcement Product Release Announcement Analog & Automotive Embedded Systems NXP Model-Based Design Toolbox for S32K3 – version 1.8.0 The Analog & Automotive Embedded Systems, Model-Based Design Tools Team at NXP Semiconductors, is pleased to announce the release of the Model-Based Design Toolbox for S32K3 version 1.8.0. This release supports automatic code generation for S32K3 peripherals and applications prototyping from MATLAB/Simulink for NXP S32K3 Automotive Microprocessors. This new product adds support for S32K310, S32K311, S32K312, S32K314, S32K322, S32K324, S32K328, S32K338, S32K341, S32K342, S32K344, S32K348, S32K356, S32K358, S32K364, S32K366, S32K374, S32K376, S32K388, S32K389, S32K394 and S32K396 MCUs, and part of their peripherals, based on RTD MCAL components (ADC, CAN, DIO, FEE, GPT, I2C, ICU, LIN, MEM, MCL, PWM, SPI, UART). In this release, we have also updated the RTD, S32 Configuration Tools, AMMCLib, FreeMASTER, and MATLAB support for the latest versions. The product comes with over 130 examples, covering all the features and functionalities of the toolbox, including new demos for motor control applications. Target audience: This product is part of the Automotive SW – Model-Based Design Toolbox. FlexNet Location: https://nxp.flexnetoperations.com/control/frse/download?element=7690521 Technical Support: NXP Model-Based Design Toolbox for S32K3 issues will be tracked through the NXP Model-Based Design Tools Community space. Release Content: Automatic C code generation from MATLAB® for NXP S32K3 derivatives: S32K310 S32K311 S32K312 S32K314 S32K322 S32K324 S32K328 S32K338 S32K341 S32K342 S32K344 S32K348 S32K356 S32K358 S32K364 S32K366 S32K374    S32K376    S32K388 S32K389 S32K394  S32K396 Support for the following peripheral components and functions: ADC CAN DIO eTPU FEE GPT I2C ICU LIN MCL (including DMA support) MEM Memory read/write PWM Profiler Registers read/write SPI UART New RTD version supported (7.0.0) New S32 Configuration Tools version supported (2025.R1.8)😎 Integration with EB tresos v32.0.0 Provides 2 modes of operation: Basic – using pre-configured configurations for peripherals; useful for quick hardware evaluation and testing Advanced – using S32 Configuration Tools or EB tresos to configure peripherals/pins/clocks Default Configuration Project Templates targeting all the supported S32K3 derivatives The toolbox delivers default configuration projects, available in both S32 Configuration Tools and EB tresos, covering an initial enablement of the on-board peripherals, pins, and clocks, for all the supported S32K3 derivatives. The desired template, which represents the starting point for enabling the hardware configuration of the application, can be selected via a dropdown widget. Support for creating and using Custom Project Templates The toolbox provides support to use and create custom project templates. This could be very useful when having a custom board design – offering the possibility to create the configuration for it only once. After it is saved as a custom project template, it can be used for every model that is being developed.   Such custom projects, addressing specific hardware designs are offered inside the current version of the toolbox to integrate the following EVBs: S32K312MINI-EVB MCTPTX1AK324 S32K344-WB S32K3-T-BOX S32K396-BGA-DC1 MR-CANHUBK344, alongside a set of examples specifically created to target this hardware design and a series of articles (available on NXP Community) demonstrating how to use the toolbox features and functionalities for creating applications for custom boards. The toolbox has been tested and validated on the official NXP Evaluation Boards     S32K31XEVB-Q100     S32K312EVB-Q172     S32K312MINI-EVB     MCTPTX1AK324     XS32K3X2CVB-Q172     S32K3-T-BOX     MR-CANHUBK344       XS32K3X4EVB-Q257     XS32K3X4EVB-Q172           S32K3X4EVB-T172      S32K344-WB        XS32K3X8CVB-Q172     S32K388EVB-Q289      S32K389EVB-Q437            XS32K396-BGA-DC     XS32K396-BGA-DC1 Integrates the Automotive Math and Motor Control Library release 1.1.42 All functions in the Automotive Math and Motor Control Functions Library v1.1.42 are supported as blocks for simulation and embedded target code generation. FreeMASTER Integration We provide several Simulink example models and associated FreeMASTER projects to demonstrate how our toolbox interacts with the real-time data visualization tool and how it can be used for tuning embedded software applications. S32 Design Studio integration We provide the feature of importing the code generated from a Simulink model inside the S32 Design Studio IDE. This functionality can be useful if the model needs to be integrated into an already existing project or for debug purposes. Simulation modes We provide support for the following simulation modes (each of them being useful for validation and verification): Software-in-Loop (SIL) Processor-in-Loop (PIL) including AUTOSAR SW-C deployment External mode Motor Control Applications The toolbox provides examples for 1-shunt and 2-shunt PMSM and BLDC motor control applications, supporting both S32 Configuration Tools and EB  tresos. Each of the examples provides a detailed description of the hardware setup and an associated FreeMASTER project which can be used for control and data visualization. The toolbox also demonstrates the integration of the Motor Control Blockset in developing such applications. For demonstrating the S32K3 eTPU Software integration, we have included a PMSM application where the FOC algorithm runs on the main CPU of the S32K396 MCU, while the analog sensing, software resolver, and PWM signals generation are offloaded to the eTPU co-processor. The motor control applications were developed and validated on the MCSPTE1AK344 and MCSPTR2AK396 Motor Control kits.   Support for MATLAB versions We added support for the following MATLAB versions: R2023b R2024a R2024b R2025a R2025b Examples for every peripheral/function supported More than 130 examples showcasing: I/O Control Timers and scheduling Communication (CAN, I2C, LIN, SPI, UART) Memory handling Motor Control applications (BLDC and PMSM) AMMCLib FreeMASTER SIL / PIL / External mode For more details, features, and how to use the new functionalities, please refer to the Release Notes and User Manual documents attached. MATLAB® Integration: The NXP Model-Based Design Toolbox extends the MATLAB® and Simulink® experience by allowing customers to evaluate and use NXP’s S32K3 MCUs and evaluation board solutions out-of-the-box. NXP Model-Based Design Toolbox for S32K3 version 1.8.0 is fully integrated with MATLAB® environment. Target Audience: This release (1.8.0) is intended for technology demonstration, evaluation purposes, and prototyping S32K3 MCUs and Evaluation Boards. Useful Resources: Examples, Trainings, and Support: https://community.nxp.com/community/mbdt
View full article
扩展你的 Android 应用显示 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 许多用户询问过但仍在为 Android 开发中的功能之一是扩展桌面功能。目前,Android 允许您在两个显示器上镜像您的桌面,但您仍然无法像使用 Linux 或 Windows 等任何其他操作系统那样扩展您的桌面。 本教程旨在向您展示如何使用特殊对象来控制辅助或外部显示器上显示的内容,从而取代屏幕镜像。 那么我们该怎么做呢? 演示文稿是在外部显示器上以视图层次结构的形式显示用户界面的容器。这非常类似于对话框,因为它显示与其活动分开的 UI,但不同之处在于演示文稿显示在外部显示器上,而对话框将其显示在主屏幕上。现在,由于这个原因,外部显示器上的 UI 要使用的资源与主屏幕上使用的资源不同,演示的上下文不是活动。 我们如何选择将此演示文稿发送到哪里? 最简单的方法是使用 MediaRouter API。mediarouter 的作用是跟踪系统上可用的音频和视频路由。无论何时选择或取消选择路线,MediaRouter 都会发送通知。应用程序可以简单地监视这些通知并自动在首选演示显示屏上显示或关闭演示。 首选演示显示器是媒体路由器建议应用程序在想要在辅助显示器上显示内容时使用的显示器。如果没有首选的演示显示,则应用程序应该在本地显示其内容而不使用演示。 使用 Mediarouter MediaRouter 是通过调用 getSystemService() 并请求 MEDIA_ROUTER_SERVICE 获得的系统服务。 我们应该使用 mediarouter 在首选的演示显示器上创建和显示演示文稿: MediaRouter mediaRouter = ( MediaRouter ) context . getSystemService ( Context . MEDIA_ROUTER_SERVICE ); MediaRouter.RouteInfo route = mediaRouter.getSelectedRoute ( ) ;​​ 如果(路线!= null ) { 显示presentationDisplay =路由.getPresentationDisplay () ; 如果( presentationDisplay != null ) { 演示文稿=新MyPresentation (上下文, presentationDisplay ) ; 演示.展示(); } } 为了在您的应用中使用此框架,您需要获取 MediaRouter 框架对象的一个实例并附加一个 MediaRouter.Callback 对象来监听可用媒体路由中的事件。 实现媒体路由器 API 的 Android 应用程序需要包含一个 Cast 按钮,以允许用户选择媒体路由在辅助输出设备上播放媒体。实现 Cast 按钮的推荐方法是从 ActionBarActivity() 扩展您的活动并使用 onCreateOptionMenu() 方法添加选项菜单。Cast 按钮必须使用 MediaRouteActionProvider 类作为其操作: xml 版本= "1.0"编码= "utf-8" ?> <菜单xmlns:android = " http://schemas.android.com/apk/res/android " xmlns:app = " http://schemas.android.com/apk/res-auto " > <项目机器人:ID = “@ + id / media_route_menu_item” 机器人:标题= “@string/media_route_menu_title” 应用程序:actionProviderClass = “android.support.v7.app.MediaRouteActionProvider” app:showAsAction = “总是” /> 媒体路由器框架通过附加到媒体路由器框架对象的回调对象与应用程序进行通信。有必要扩展回调对象以便在媒体路由连接时接收消息。 一旦为媒体路由器定义了回调,您就需要将其附加到媒体路由器对象。下面的示例演示了如何使用生命周期方法来适当地添加和删除应用程序的媒体路由器回调对象。您需要添加和删除它,因为无论何时关闭应用程序或将其放在后台,它都需要是空闲的,以便其他应用程序在必要时使用它。 公共类MediaRouterPlaybackActivity扩展了ActionBarActivity { 私人MediaRouter mMediaRouter ; 私人MediaRouteSelector mSelector ; 私人回调mMediaRouterCallback ; // 您的应用程序可以使用它们,以便框架可以发现它们。 @Override 受保护的void onCreate ( Bundle savedInstanceState ) { 超级. onCreate ( savedInstanceState ); 设置ContentView ( R.layout.activity_main ) ;​​ // 获取媒体路由器服务。 mMediaRouter = MediaRouter.getInstance ( this ) ;​ ... } // 在启动时添加回调来告诉媒体路由器有哪些类型的路由 // 您的应用程序可以使用它们,以便框架可以发现它们。 @Override 公共无效的onStart () { mMediaRouter.addCallback ( mSelector , mMediaRouterCallback ,​​ 媒体路由器.回调标志位 请求发现); 超级. onStart (); } // 停止时删除选择器,告诉媒体路由器它不再 // 需要发现您的应用的路线。 @Override 公共无效onStop () { mMediaRouter.removeCallback ( mMediaRouterCallback ) ;​ 超级. onStop (); } ... } 远程回放 这种方法将控制命令发送到辅助设备以启动播放并控制正在进行的播放(播放、停止、快进、倒带等)。当您的应用支持这种类型的媒体路由时,您必须使用通过应用的 MediaRouter.Callback 对象接收的远程播放 MediaRoute.RouteInfo 对象创建一个 RemotePlaybackClient 对象。 下面的示例代码演示了一个控制器方法,该方法创建一个新的远程播放客户端并向其发送视频进行播放。 私人无效更新远程播放器( RouteInfo路线) { // 改变路线:拆除之前的客户端 如果( mRoute != null && mRemotePlaybackClient != null ) { mRemotePlaybackClient .释放(); mRemotePlaybackClient =空; } // 保存新路线 mRoute =路线; // 附加新的播放客户端 mRemotePlaybackClient =新的RemotePlaybackClient ( this , mRoute ) ; // 发送文件进行播放 mRemotePlaybackClient.play ( Uri .​​解析( “ http://archive.org/download/Sintel/sintel-2048-stereo_512kb.mp4 ” ) “video/mp4” , null , 0 , null , new ItemActionCallback () { @Override public void onResult (捆绑数据,字符串sessionId , MediaSessionStatus会话状态, 字符串itemId , MediaItemStatus itemStatus ) { logStatus ( "播放:项目成功" + itemId ); } @Override public void onError (字符串错误, int代码, Bundle数据) { logStatus ( "播放:失败 - 错误:" + code + " - " + error ); } }); } } 有关如何使用媒体路由器的更多信息,请访问developer.android.com
View full article