i.MX Processors Knowledge Base

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

i.MX Processors Knowledge Base

Discussions

Sort by:
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343242 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343344 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343372 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343273 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343518 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343528 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343521 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343715 
View full article
[中文翻译版] 见附件   原文链接: Add a new shared memory region on Android Auto P9.0.0_GA2.1.0 BSP 
View full article
[中文翻译版] 见附件   原文链接: eIQ Machine Learning Software for i.MX Linux 4.14.y 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343823 
View full article
[中文翻译版] 见附件   原文链接: Enable GmSSL which supports OSCCA Algorithm Toolbox on i.MX 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343761 
View full article
i.MX8/8X/8XL在汽车中的应用 • 娱乐导航 • 虚拟仪表 • 电子座舱 • 360环视与ADAS • C-V2X Tbox
View full article
目录 1    硬件资源,文档及工具下载... 2 1.1    硬件资源... 2 1.2    内存配置测试相关的文档... 3 1.3    内存压力测试工具. 3 1.4    内存配置工具. 4 2    内存设计要求... 4 3    LPDDR4基础... 4 4    硬件连接... 6 5    i.MX8QXP/DXP+LPDDR4内存配置与测试步骤... 8 5.1    生成LPDDR4初始化脚本... 8 5.2    使用内存测试工具测试内存... 13 5.3    编译内存测试工具所用的SCFW镜像... 17 5.4    其它尺寸的LPDDR4配置... 18 6    i.MX8DX+DDR3L内存配置... 23 7    测试失败的DEBUG.. 26 8    内存参数应用到SCFW中... 30
View full article
This doc show how to use i.MX8QXP Display Controller GammaCor unit to tune gamma. HW: i.MX8QXP MEK board, HDMI monitor SW: i.MX Linux 4.14.98_2.2.0 BSP release, patch in this doc 1.Introduce gamma The gamma, gamma correction, gamma encoding, gamma compression , these words all related one kind operation , see wiki page of it: The device used for image capture/print/display follow this power-law. For example the camera captured image , to view this image on display device as good as original captured image : gamma encoding when camera saved sensor data to image file,  and  gamma decoding when that image file display on your PC LCD monitor. That is : 2. i.MX8QXP Display Controller Gamma Correction Unit The Gamma Correction unit position is located between Frame Gen unit and TCon unit.   More detail see below contents from i.MX8QXP RM: So GammaCor unit could be used as adjust display gamma , or brightness or contrast. To used it, need follow the steps at RM 15.9.2.4.4.8.3.   Something need to note: You need program 33 sample point value into the register, these sample point value range is from 0 to 1023. Note, first write is start sample point value , then the other is delta value: current sample point minus previous sample point value. You can use GammaCor unit on any channel of R/G/B. If you use normalized function f(x), the following formula should be used to clut[i = 0..32] = round( f(i * 32 / 1023) * 1023) 3. i.MX8QXP Linux device driver patch and test code Apply attached  patch 8qxp_dpu_gammacor_4.14.98_2.2.0.diff on Linux kernel. In the kernel patch, function dpu_gammacor_update, I choose not calculate delta value between each sample pint , let user space application calculate delta value and passed to kernel. Apply 8qxp-dpu-gammacor-modetst.diff on libdrm-imx, to get test application which is based on modetest.  Test app will read one greyscale image file 720P.rgb, put it under same folder of test application , calculate sample point value by pow function  , and calling drmModeCrtcSetGamma to pass related value to kernel,  next loop will change sample point value, and will see that greyscale image will changed on HDMI monitor. After system boot up, run below cmd to check result of test application systemctl stop weston ./gamma_show_rgba.out -P 29@32:1280x720@AB24 Reference: a>https://www.nxp.com/webapp/Download?colCode=IMX8DQXPRM b>https://www.nxp.com/webapp/Download?colCode=L4.14.98_2.2.0_MX8QXP&appType=license c> https://source.codeaurora.org/external/imx/libdrm-imx/ d> https://en.wikipedia.org/wiki/Gamma_correction
View full article
Contents 1 创建 i.MX8QXP Linux 4.14.98_ga 板级开发包编译环境 2 1.1 下载板级开发包 ...................................................... 2 1.2 创建yocto编译环境: ................................................ 3 2 Device Tree ............................................................. 15 2.1 恩智浦的device Tree结构 ..................................... 15 2.2 device Tree的由来(no updates) ............................ 18 2.3 device Tree的基础与语法(no updates) ................. 20 2.4 device Tree的代码分析(no updates) .................... 42 3 恩智浦i.MX8XBSP 包文件目录结构 ......................... 75 4 恩智浦i.MX8XBSP的编译(no updates) .................... 77 4.1 需要编译哪些文件 ................................................ 77 4.2 如何编译这些文件 ................................................ 78 4.3 如何链接为目标文件及链接顺序 ........................... 79 4.4 kernel Kconfig ...................................................... 81 5 恩智浦BSP的内核初始化过程(no updates) .............. 81 5.1 初始化的汇编代码 ................................................ 83 5.2 初始化的C代码 ..................................................... 87 5.3 init_machine ....................................................... 100 6 恩智浦BSP的内核定制 ........................................... 103 6.1 DDR修改 ............................................................ 103 6.2 IO管脚配置与Pinctrl驱动 .................................... 105 6.3 新板bringup ........................................................ 120 6.4 更改调试串口 ...................................................... 128 6.5 uSDHC设备定制(eMMC flash,SDcard, SDIOcard) 135 6.6 LVDS LCD 驱动定制 .......................................... 144 6.7 GPIO_Key 驱动定制 .......................................... 147 6.8 GPIO_LED 驱动定制 ......................................... 151 6.9 Fuse nvram驱动 ................................................. 154 6.10 SPI与SPI Slave驱动 ........................................... 155 6.11 USB 3.0 TypeC 改成 USB 3.0 TypeA(未验证) ... 162 6.12 汽车级以太网驱动定制 ....................................... 162 6.13 i.MX8DX MEK支持 ............................................. 180 6.14 NAND Flash支持与烧录 ..................................... 181
View full article
目录 1 i.MX8X 板级开发包镜像结构 ...................................... 3 2 创建 i.MX8QXP Linux 4.19.35 板级开发包编译环境 ... 3 2.1 下载板级开发包 ....................................................... 3 2.2 创建yocto编译环境: ................................................. 4 2.3 独立编译 ............................................................... 10 3 i.MX8X SC firmware ................................................. 16 3.1 SC firmware 目录结构 ........................................... 16 3.2 SC firmware 启动流程 ........................................... 17 3.3 SC firmware定制 ................................................... 17 4 i.MX8X ATF .............................................................. 28 5 FSL Uboot 定制 ........................................................ 30 5.1 FDT支持 ............................................................... 31 5.2 DM(driver model)支持 ........................................... 36 5.3 Uboot目录 结构 ..................................................... 50 5.4 Uboot编译 ............................................................. 52 5.5 Uboot初始化流程 .................................................. 53 5.6 uboot 定制 ............................................................ 63 5.7 uboot debug信息 ................................................... 78
View full article
For early i.MX 8QuadXPlus MEK boards with C0 chips, power on the board when the board is connected to the PC with USB Type-C cable may cause the PC to shut down directly. This is a hardware known issue. another type of TCPC PHY chip will be used in later boards to fix this issue. If you have this kind of i.MX 8QuadXPlus MEK boards with c0 chips already, you can take below way to avoid this issue: 1. change the boot switch to "serial download mode", firstly power on the board, then connect the board to PC with Type-C cable. 2. download the attached files, uncompress this two files and put them in the same folder. 3. open the command window, change the working directory to the one contains the files just downloaded, and execute "uuu uuu_change_DRP_to_DFP.auto-imx8qxpc0mek" on command window. After the command being successfuley executed, the board can be powerwed up when the board is connected to PC with type-C cable.
View full article
This guide is about how to use EVIS to create user nodes and kernels in OpenVX to implement image processing on NPU(i.MX8MP)/GPU(i.MX8QM). Take gaussian filter as an example. It is tested on i.MX8QM and i.MX8MP. User Node Creation from User Kernel 1. Define a user node Register a user kernel by its ID or name For example, #define VX_KERNEL_NAME_GAUSSIAN "com.nxp.extension.gaussian" #define VX_KERNEL_ENUM_GAUSSIAN 100 Get the kernel reference by the ID or name For example, vx_kernel kernel = vxGetKernelByName(context, VX_KERNEL_NAME_GAUSSIAN); vx_kernel kernel = vxGetKernelByEnum(context, VX_KERNEL_ENUM_GAUSSIAN ); Create a user node vx_node node = vxCreateGenericNode(graph, kernel); Set input/output node parameters For example, vx_status status = vxSetParameterByIndex(node, index++, (vx_reference)in_image); status |= vxSetParameterByIndex(node, index++, (vx_reference)out_image); 2. Create InputValidator/OutputValidator functions for the node The validators are only used for graph verification. For example, static vx_status VX_CALLBACK vxGaussianInputValidator(vx_node node, vx_uint32 index) static vx_status VX_CALLBACK vxGaussianOutputValidator(vx_node node, vx_uint32 index, vx_meta_format metaObj) ToDo: a. InputValidator: Get the reference to the parameter object   vx_parameter paramObj = NULL; vx_image imgObj = NULL; paramObj=vxGetParameterByIndex(node, index); vxQueryParameter(paramObj, VX_PARAMETER_REF, &imgObj, sizeof(vx_image)); Check meta-data restriction vxQueryImage(imgObj, VX_IMAGE_FORMAT, &imgFmt, sizeof(imgFmt)); Check consistency with other parameters if (VX_DF_IMAGE_U8==imgFmt) status = VX_SUCCESS; else status = VX_ERROR_INVALID_VALUE; b. OutputValidator Set the meta_format object with expected meta-data for the output status |= vxSetMetaFormatAttribute(metaObj, VX_IMAGE_FORMAT, &imgFmt, sizeof(imgFmt)); status |= vxSetMetaFormatAttribute(metaObj, VX_IMAGE_WIDTH, &width, sizeof(width)); status |= vxSetMetaFormatAttribute(metaObj, VX_IMAGE_HEIGHT, &height, sizeof(height)); 3. Create Initializer function for the node. The initializer is used to specify workdim, global work size and local work size for the user kernel. These parameters are similiar to that in OpenCL. For example,                                                                                    /* workdim, globel offset, globel scale, local size, globel size */ vx_kernel_execution_parameters_t shaderParam = {2,               {0, 0, 0},        {0, 0, 0},        {0, 0, 0},   {0, 0, 0}}; vx_status VX_CALLBACK vxGaussianInitializer(vx_node nodObj, const vx_reference *paramObj, vx_uint32 paraNum) Set attribute to the node vxSetNodeAttribute(nodObj, VX_NODE_ATTRIBUTE_KERNEL_EXECUTION_PARAMETERS, &shaderParam, sizeof(vx_kernel_execution_parameters_t)); Note: The links below are guides about OpenCL on GPU, which are helpful to understand OpenVX implemented on GPU/NPU. OpenCL Work Item Ids: Global/Group/Local OpenCL Programming Guide OpenCL Resources Introduction to OpenCL 4. Create Deinitializer function for the node (Optional) It is used to de-allocate memory allocated at initializer. User Kernel on NPU/GPU Creation 1. Create description of a user kernel For example, vx_kernel_description_t vxGaussianKernelVXCInfo = { VX_KERNEL_ENUM_GAUSSIAN, VX_KERNEL_NAME_GAUSSIAN, nullptr, vxGaussianKernelParam, (sizeof(vxGaussianKernelParam)/sizeof(vxGaussianKernelParam[0])), vxGaussianValidator, nullptr, nullptr, vxGaussianInitializer, nullptr }; 2. Register the new kernel For example, static vx_kernel_description_t* kernels[] = { &vxGaussianKernelVXCInfo, }; 3. Write kernel source implemented on NPU/GPU For example, char vxcKernelSource[] = { "#include \ \n\ \n\ \n\ __kernel void gaussian\n\ ( \n\ __read_only image2d_t in_image, \n\ __write_only image2d_t out_image \n\ ) \n\ { \n\ int2 coord = (int2)(get_global_id(0), get_global_id(1)); \n\ int2 coord_out = coord; \n\ vxc_uchar16 lineA, lineB, lineC, out;\n\ int2 coord_in1 = coord + (int2)(-1, -1);\n\ VXC_OP4(img_load, lineA, in_image, coord_in1, 0, VXC_MODIFIER(0, 15, 0, VXC_RM_TowardZero, 0));\n\ int2 coord_in2 = coord + (int2)(-1, 0);\n\ VXC_OP4(img_load, lineB, in_image, coord_in2, 0, VXC_MODIFIER(0, 15, 0, VXC_RM_TowardZero, 0));\n\ int2 coord_in3 = coord + (int2)(-1, 1);\n\ VXC_OP4(img_load, lineC, in_image, coord_in3, 0, VXC_MODIFIER(0, 15, 0, VXC_RM_TowardZero, 0));\n\ int info = VXC_MODIFIER_FILTER(0, 13, 0, VXC_FM_Guassian, 0);\n\ VXC_OP4(filter, out, lineA, lineB, lineC, info); ;\n\ VXC_OP4_NoDest(img_store, out_image, coord_out, out, VXC_MODIFIER(0, 13, 0, VXC_RM_TowardZero, 0)); \n\ }\n\ " }; Note: the source is written by EVIS instructions with less latency. But the EVIS instructions are limited. These fucntions defination can be found in "cl_viv_vx_ext.h" located at "/usr/include/CL/cl_viv_vx_ext.h". Read back the processed data by GPU/NPU to check if the operations are correct. For example, status = vxCopyImagePatch(vx_out_image, &rect, 0, &addressing, data2, VX_READ_ONLY, VX_MEMORY_TYPE_HOST); 4. Build the NPU/GPU source code runtime For example, programObj = vxCreateProgramWithSource(ContextVX, 1, programSrc, &programLen); vxBuildProgram(programObj, "-cl-viv-vx-extension"); 5. Add kernel to the program For example, ... kernelObj = vxAddKernelInProgram(programObj, kernels[i]->name, kernels[i]->enumeration, kernels[i]->numParams, kernels[i]->validate, kernels[i]->initialize, kernels[i]->deinitialize ); ... for(vx_uint32 j=0; j < kernels[i]->numParams; j++) { status = vxAddParameterToKernel(kernelObj, j, kernels[i]->parameters[j].direction, kernels[i]->parameters[j].data_type, kernels[i]->parameters[j].state ); 6. Finalize the kernel creation For example, status = vxFinalizeKernel(kernelObj); Exercise The example is attached. You can build and test it on i.MX8QM or i.MX8MP. Results on i.MX8QM: References: Khronosdotorg/resources.md at master · KhronosGroup/Khronosdotorg · GitHub  Further Reading: OpenVX Vision Image Extension API Introduction - Basic API OpenVX Vision Image Extension API Introduction - DP Dot Products
View full article