Multi Source Translation Content

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

Multi Source Translation Content

讨论

排序依据:
MIMXRT1170 Interrupt issue Hi Everyone, I want to ask something about GPIO external interrupt. In the MIMXRT1170_igpio_input_interrupt example, GPIO13_io0 pin is defined as input and is enabled rising edge interrupt. I want to GPIO8_io29 instead of GPIO13_io0. But I can't see any interrupt handler for gpio8. How can I define gpio8_29 as external interrupt? Re: MIMXRT1170 Interrupt issue Hi @EdwinHz, I recently saw this answer you gave and started wondering whether it's actually true as something was off for me. You stated that "GPIO7 through GPIO12 are all accessible only by the CM4 domain", so I started looking through RM and I found the following: The description of AIPS-4 clearly says that this memory map range is accessible by both CM7 and CM4 cores. So from my understanding, it stands in contradiction with what you stated some time ago. What is more, I think the Bus Diagram that you pasted, actually has a bus connection to the GPIO[12-7] through the following route (provided that my understanding is correct): I sort of assumed the flow looks like that based on the information from RM that says those PGIOs are accessible. Please correct me if I'm wrong but something is definitely off and I feel it should be straightened out. Best Regards, Michael Re: MIMXRT1170 Interrupt issue I encountered the same problem. Is there any progress? Re: MIMXRT1170 Interrupt issue Thanks Edwin, I understand Re: MIMXRT1170 Interrupt issue Hi @muratokusluk, Although most of the pins are accessible by both the CM7 domain and the CM4 domain, GPIO7 through GPIO12 are all accessible only by the CM4 domain: GPIO8 is therefore only intended for CM4 access, so it does not have a CM7 interruption. Note how "Table 4-2. CM4 domain interrupt summary" from the Reference Manual has GPIO7 through GPIO11 on IRQ 99: But "Table 4-1. CM7 domain interrupt summary" has CM7_GPIO2 and CM7_GPIO3 IRQs instead: That said, GPIO_EMC_B2_19, which is the pad that routes GPIO8_IO29, also routes GPIO_MUX2_IO29 when using alt function 5 rather than 10: Therefore, you can configure the pad and interruption for GPIO8 with IRQ 99 when using CM4 or configure the same pad and interruption for CM7_GPIO2 when using CM7, and the IRQ will continue being IRQ 99 (CM7_GPIO2). If you base your project on ipgio_input_interrupt_cm4 rather than cm7, you will find "GPIO7_8_9_10_11_IRQHandler()" on startup_mimxrt1176_cm4.c I hope this answers your question. BR, Edwin.
查看全文
IMX8 Video overlay with graphics before H264 encode Hi we are designing a visual inspection system using a 1920x1080p30 video camera. We need to overlay graphics onto the video stream prior to H264 encode as well as to the display on a low power system. I am not finding any information on how to do this with a SOC like an iMX8M-Plus. The iMX6 had an IPU that could compose/overlay graphics onto the video stream although at a max resolution of 1024x1024 (could do this 4 x for 1920x1080). The iMX8M family seems to have lost this aspect of video processing. So I guess the 2D or 3D GPU would have to do this composition/overlay to memory while also performing normal display work. It appears there are no gstreamer plugins to handle this so I would have to create something. However at this stage I want to know: 1. Would the iMX8-Plus hardware be capable of this with minimal CPU usage (camera would be YUV I422/I421 and composer/overlay output needs to be fed to the VPU encoder (NV12 ?) as well as to the display) ? 2. Any ideas on how to go about this ? We would have to use the GPU whilst the normal X11/Wayland graphics GUI is in use and feed the data through zero copy dma buffer pipeline etc. Terry Re: IMX8 Video overlay with graphics before H264 encode Its simple in our application. The overlay QImage is created asynchronously about once per second (Actually two QImages, one being drawn, one for display with a Mutex for switching between). The gstreamer appsrc element is configured to emit video frames at 5 fps and takes the QImage and injects it into the gstreamer stream via the imxcompositor_g2d. ogstOverlaysrc=gst_bin_get_by_name(GST_BIN(ogstPipeline), "appsrc"); if(ogstOverlaySrc){ g_object_set(G_OBJECT(ogstOverlaySrc), "caps", gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING, "BGRA", "width", G_TYPE_INT, osize.width(), "height", G_TYPE_INT, osize.height(), "framerate", GST_TYPE_FRACTION, 5, 1, NULL), NULL); g_object_set(G_OBJECT(ogstOverlaySrc), "stream-type", 0, // GST_APP_STREAM_TYPE_STREAM "format", GST_FORMAT_TIME, "is-live", FALSE, NULL); g_signal_connect(ogstOverlaySrc, "need-data", G_CALLBACK(gstOverlayAddFrameCallback), gpointer(this)); }  Pipeline bits: imxcompositor_g2d name=c latency=20000000 sink_1::alpha=1.0 ! identity drop-allocation=true v4l2src device=/dev/video3 ! video/x-raw,width=1920,height=1080,framerate=25/1 ! c.sink_0 appsrc name="appsrc" ! videoconvert ! video/x-raw,format=ARGB ! c.sink_1 Re: IMX8 Video overlay with graphics before H264 encode Thank you for the detailed answer! A few more questions based on this, if you don't mind: 1. How are you keeping the QT overlay and the video frames in sync? I presume the data overlay needs to be correctly synchronized to the video frame to which it corresponds to. 2. I'm not that experienced with the QT + Gstreamer combination, can you please give a few more details about how these two are interfaced? I found some information on how to get video using Gstreamer inside QT Apps, but not what we're trying to do. PS: My initial interpretation of your post is that you're saving the overlay as an image and then injecting that using appSrc. That link is what's not that clear to me.  Thank you! Re: IMX8 Video overlay with graphics before H264 encode Well we have an analogue camera feeding a 1920x1080p25 video stream and are overlaying on that. We create the overlay image using Qt into a QImage of the full 1920x1080 size and then use a gstreamer appSrc to inject this into one of the imxcompositor_g2d sources along with the video stream with alpha=1.0. In our case we generate the appSrc gstreamer overlay frames at 5 fps to save CPU usage on the Qt drawing side as we don't need it any faster than this, but have done the full 25 fps without issue. With our system which is capturing a FHD video stream, overlaying text/graphics, displaying on a LCD panel while H264 encoding and saving toi a file as well as managing a sound stream, the overal usage (4 cores) of the imx8mp is about 25%. But working with the IMX8mp with gstreamer is a bit of a minefield. It is relatively complex system under the hood without detailed documentation and this means you often have to play with gstreamer arrangements and settings, quite a few which are not obvious, to get things working efficiently. Re: IMX8 Video overlay with graphics before H264 encode @TerryBarnaby1 , what sort of framerate were you able to get using this solution? We're evaluating different options and there are very little resources on what potential solutions are to draw shapes or overlay text on frames captured from the camera. Thanks! Re: IMX8 Video overlay with graphics before H264 encode hello Terry In my case,  consider use case like simple wayland application with a video window inside it with a position and resolution configured , what could be the best approach ?should I use multiple egl surfaces ? or wayland sub-surfaces ? could you suggest which approach would be better? Re: IMX8 Video overlay with graphics before H264 encode hello  Any inputs on my above query ? is waylandsink has limitation with respect to alpha property ? Also any Idea how to use chromakey  property  using GPU/VPU ?  Re: IMX8 Video overlay with graphics before H264 encode hello NXP the alpha property of waylandsink is not working (5.4.70- imx8mplus) , is there any limitation?  Re: IMX8 Video overlay with graphics before H264 encode Hello  consider  simple wayland application which run multiple videos in it And another point , I am trying to use alpha property of waylandsink (imx8m-plus) which is not working, any limitation here ? Re: IMX8 Video overlay with graphics before H264 encode I guess that depends on exactly what you want to do. You will need to understand the iMX8mp hardware, the implemented gstreamer modules, the wayland server code, your GUI toolkit etc. info on which is lacking and I'm no expert. And it also depends on what you mean by Wayland GUI layer. In my case I needed to overlay some text on the video stream prior to displaying it in a Qt window as well as h264 encoding it to a file and I am using the Qt GUI platform. In my code the graphical "layer" (which comes from test1.png in my example) that is overlaid on the video is generated in a Qt QImage using normal Qt drawing primitives and the gstreamer "appsrc name=\"appsrc\" ! videoconvert ! imagefreeze ! c.sink_1" partial pipeline is used to feed this into the imxcompositor_g2d. The screen output is "waylandsink name=\"videoSink\"" and there is some C++ GUI code to move and size this walyandsink area over a particular Qt window in my application. Re: IMX8 Video overlay with graphics before H264 encode Hello Terry Thanks for the inputs, If I want to blend video  layer with wayland GUI layer is it possible with similar approach ? Re: IMX8 Video overlay with graphics before H264 encode With the current (NXP Yocto hardknott) based Linux I have found you can to use the graphics 2D engine to perform the overlay processing. The gstreamed imxcompositor_g2d module can do this. A typical gstreamer command could be like: gst-launch-1.0 imxcompositor_g2d name=c sink_1::alpha=0.5 ! waylandsink v4l2src device=/dev/video3 ! video/x-raw,width=1920,height=1080,framerate=30/1 ! c.sink_0 multifilesrc location=./test1.png caps=image/png,framerate=1/1 ! pngdec ! imagefreeze ! c.sink_1 This will take a full HD camera stream and overlay the test1.png file on it. Following the imxcompositor_g2d you can pass this video stream through "vpuenc_h264 ! h264parse ! avimux ! filesink location=/tmp/temp.avi" to encode using the hardware h264 encoder possibly teeing it to the display as well as the h264 encoder if needed. Re: IMX8 Video overlay with graphics before H264 encode Hello  I am working with similar requirements , I would like to understand how to test video overlays on imx8m plus platform, unfortunately the doc Linux user guide  dated L5.4.70_2.3.0, 13 January 2021 does not have imx8m-plus specific info and the plugin overlaysink is not available. Re: IMX8 Video overlay with graphics before H264 encode Many thanks. It would be nice to have an overview of the video processing architecture (hardware and software layers/API's and packages) and the history in the "i.MX Linux® User's Guide" and how this is supported in the NXP Yocto BSP and community Yocto BSP. Re: IMX8 Video overlay with graphics before H264 encode Hi Yes,imx-gst1.0-plugin has replaced the gstreamer1.0-plugins-imx. In i.MX6 Family :Video render relys on G2D, not DRI In i.MX8 Family:Video render relys on DRI,due to Wayland using DRI Re: IMX8 Video overlay with graphics before H264 encode Thanks for the info, but that is specific information to a specific NXP BSP release. I need to produce a Yocto release for a custom board and thus need to configure a Yocto build for this to get the most current and up-to-date video processing gstreamer elements. The NXP "Yocto" builds are different from the community builds (which are more mainline) and there is the BSP type and the three different kernel variants and then all of the paraphernalia of different kernel driver configurations etc. Aslo old Yocto builds have different gstreamer elements and drivers etc. I am just trying to understand what the current/planned underlying video processing software tree is, so I follow this in our builds. It has been stated to use the community Yocto BSP for custom boards but this is quite different to the NXP Yocto wrt video processing. For example at the user level there is the gstreamer1.0-plugins-imx and imx-gst1.0-plugin package both of which do not build with a community based Yocto dunfell build for an IMX6DL. Am I right in thinking that the imx-gst1.0-plugin package has taken over from the gstreamer1.0-plugins-imx for all IMX variants and does this rely on the DRI GPU interface route ? I just want to understand the overall hardware video processing software/hardware architecture/packages and its history so I can develop in the most sensible way. Terry Re: IMX8 Video overlay with graphics before H264 encode Hi All bsp release note and the details about i.MX GStreamer 1.0 plugins  are in i.MX_Linux_Release_Notes.pdf (Multimedia) i.MX_Linux_Users_Guide.pdf talks about how to do tests. About the last point you mentioned, the release note has said: i.MX 6 Family: • overlaysink : G2D-based video sink plugin • imxv4l2sink: V4L2-based video sink plugin Re: IMX8 Video overlay with graphics before H264 encode Thanks for the information, I had just worked out that the imx8m didn't support some video processing but I didn't release it didn't have a 2D GPU! This iMX8 range is very messy and has strange part naming! However the basic question remains, we are not targeting the imx8mq for our design, we will probably be using a IMX8M-Plus or IMX8-DualXPlus. What I am trying to determine is how to build a suitable Yocto release with support for hardware video compositing before H264 in general. The software support has changed a lot over the last 5 years and there are many routes to producing a Yocto release and many graphics and video processing driver changes in the kernel and outside etc. There doesn't appear to be a simple overall guide on these changes and where the direction is going and what user level API and what kernel and kernel level API's are needed. So I'm trying to understand this so we can first test or video processing concept and then design and board and produce a suitable Yocto build for this custom board. For example am I right in thinking that the imx-gst1.0-plugin package has replaced the gstreamer1.0-plugins-imx package and when and what lower level API's/drivers does it need/support (DRI ?). I would like to build systems for iMX6 and iMX8M-Plus that are compatible but I'm not sure this is possible. Terry Re: IMX8 Video overlay with graphics before H264 encode Hi The i.MX8MQ doesn't have 2D GPU,so you can not use imxcompositor_g2d,you can try another imxcompositor BR Re: IMX8 Video overlay with graphics before H264 encode Many thanks for the info. I would like to try this to prove that the output of this can be taken through the H264 VPU encoder and the overall CPU usage of this. However where and how would I get the gstreamer imxcompositor_g2d plugin ? I have been trying to build a suitable community or nxp based Yocto build for the iMX6 and iMX8 test platforms I have but have never seen this plugin ? The NXP gstreamer plugins seem to be in quite a mess at the moment. Should the user level part of this be in the gstreamer1.0-plugins-imx package ? If I build a IMX community Yocto release using: "https://github.com/Freescale/fsl-community-bsp-platform -b dunfell" this cannot build a gstreamer1.0-plugins-imx package. If I build a IMX NXP Yocto release using: "https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.70-2.3.0.xml" for a imx8mqevk machine there is no imxcompositor_g2d plugin as far as I can seen in the build (cannot run it as I don't have a imx8mqevk) and if I add "gstreamer1.0-plugins-imx" to the build (IMAGE_INSTALL_append) I get the error "imx8mqevk (not in COMPATIBLE_MACHINE)". So what should I build to get a suitable Yocto Linux system that will provide a working imxcompositor_g2d gstreamer plugin ? Re: IMX8 Video overlay with graphics before H264 encode Hi 1.YUV422 and YUV420 input and output formats are also supported, supports encoder (NV12). 2.You can see 7.3.16 Video composition in i.MX_Linux_User's_Guide.pdf imxcompositor_g2d uses corresponding hardware to accelerate video composition. It can be used to composite multiple videos into one. The video position, size, and rotation can be specified while composition. Video color space conversion is also performed automatically if input and output video are not same. Each video can be set to an alpha and z-order value to get alpha blending and video blending sequence.
查看全文
What is the recommended microcontroller series that replaces the LPC1768 series? Hi, Anyone please suggest exact pin to pin replacement for LPC17xx series. I have existing designs, modify hardware is a problem, but I have a lot of code (tons) using LPC2148 peripherals (UART, I2C, Timers, ...), which new family is peripheral-software compatible?. What series recommended for new designs has roughly equivalent capability (Memory size, speed, peripherals, etc.)? Re: What is the recommended microcontroller series that replaces the LPC1768 series? I have the same question, and appreciate it's now almost 5 years later. Which series of microcontrollers should I be looking at to use for new designs? Re: What is the recommended microcontroller series that replaces the LPC1768 series? Hi the LPC1768 is a replacement for the LPC2368. and the LPC1769 is a replacement for the LPC1768. The only difference is the max clock frequency (120Mhz) . A replacement with less memory is the LPC1766.LPC4078 is an option for LPC176x replacement.(http://www.nxp.com/products/microcontrollers/core/cortex_m4_m4f/LPC4078FBD100.html ) Please note LPC4078 release time is 2013, 15 years longevity. Our Recommendation is LPC546xx or LPC540xx MCUs series, based on Cortex M4 core at 220MHz (with optional secondary Cortex M0+ core), similar peripherals, up to 512KB Flash and up to 200KB RAM.Please check more information in the following link:https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/lpc-cortex-m-mcus/lpc54000-series-cortex-m4-mcus:MC_1414576688124 LPC546xx and LPC540xx are not pin to pin replacement of LPC17xx Have a nice day, Jun Zhang
查看全文
替代 LPC1768 系列的推荐微控制器系列是什么? 您好, 请就 LPC17xx 系列的精确引脚对引脚替换提出建议。 我有现有的设计,修改硬件是个问题,但我有很多使用 LPC2148 外围设备(UART、I2C、计时器等)的代码(很多),哪个新系列与外设软件兼容? 建议用于新设计的哪个系列具有大致相当的能力(内存大小、速度、外设等)? Re: What is the recommended microcontroller series that replaces the LPC1768 series? 我也有同样的问题,而且现在已经过去快 5 年了。 新设计应该使用哪个系列的微控制器? Re: What is the recommended microcontroller series that replaces the LPC1768 series? HI LPC1768 是 LPC2368 的替代品。而 LPC1769 则是 LPC1768 的替代品。唯一不同的是最大时钟频率(120Mhz)。内存较少的替代品是LPC1766。LPC4078是更换LPC176x的选项。(http://www.nxp.com/products/microcontrollers/core/cortex_m4_m4f/LPC4078FBD100.html) 请注意,LPC4078 的版本时间为 2013 年,寿命为 15 年。 我们的建议是 LPC546xx 或 LPC540xx MCU 系列,基于 220MHz 的 Cortex M4 内核(带有可选的辅助 Cortex M0+ 内核)、类似的外围设备、高达 512KB 的闪存和高达 200KB 的内存。请在以下链接中查看更多信息:https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/lpc-cortex-m-mcus/lpc54000-series-cortex-m4-mcus:MC_1414576688124 LPC546xx 和 LPC540xx 不是 LPC17xx 的引脚对引脚替代品 祝您愉快 张俊
查看全文
CAAM 和内核加密测试 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 大家好, 启用 CAAM 时,我们在不同版本的 Linux 和各种板上看到一些令人不安的错误消息 内核自检 使用 3.10.31-alpha 在 SABRE-SD 上进行测试 root@imx6qsabresd:~# dmesg ... alg: hash:hmac-sha1-caam 测试 1 失败 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010: F1 46 BE 00 alg: hash:对 sha1-caam 的测试 1 失败 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010:9C D0 D8 9D alg: hash:hmac-sha224-caam 测试 1 失败 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010:47 B4 B1 16 99 12 BA 4F 53 68 4B 22 alg: hash:对 sha224-caam 的测试 1 失败 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010: 2A AD BC E4 BD A0 B3 F7 E3 6C 9D A7 root@imx6qsabresd:~# cat /proc/cmdline console=ttymxc0,115200 ip=dhcp root=/dev/mmcblk0p2 rootwait caam 内核配置与 v7_defconfig 基本相同,只是增加了一些调试标志: ~/linux-imx6$ make arch=arm cross_compile=arm-linux-GNUEABIHF-savedefconfig scripts/kconfig/conf --savedefconfig=defconfig Kconfig ~/linux-imx6$ diff diff diff arch/arm/configs/imx_v7_defconfig 253a254 > CONFIG_USB_PHY=y 329d329 < CONFIG_DEBUG_LOCK_ALLOC=y 334d333 < # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS 未设置 我们在使用内核 3.0.35_4.1.0 时也看到了同样的结果和 3.10.17-1.0.0-ga on Nitrogen6x. 有人对此有什么见解吗? 提前感谢! 埃里克 i.MX6_All Linux Re: CAAM and kernel crypto tests SecretCryptos 是您匿名加密货币交易的一站式解决方案。无论您是想使用加密货币混合器还是在安全交易所进行交易,SecretCryptos 都能确保您所有交易的完全隐私性和匿名性。 SecretCryptos 密码混合器和交易所 所有混合器页面(每个硬币) SecretCryptos 密码混合器| 比特币 (BTC) 混合器| 以太坊(ETH)混合器| 以太坊(USDT)混合币| 美元币(USDC)混合器| BNB (BSC) 混合币| 莱特币(LTC)混合币| Dogecoin (DOGE) 混合币| XRP(瑞波币)混合币| 索拉纳(SOL)混合币| TRON (TRX) 混合器| TON (Toncoin) 混合器| 多边形(MATIC)混合器| Avalanche (AVAX) 混合器| 卡达诺(ADA)混合器| Polkadot (DOT) 混合器| Shiba Inu (SHIB) 混合器 即时加密货币交易所 加密货币交易所 Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 非常感谢,乔恩 Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 实际上,在 Herbert Xu 的 crypto-2.6 中已经对这个问题进行了适当的修复。树 特别是LKML: Herbert Xu:Crypto Fixes for 3.13andLKML: Herbert Xu:Re:3.13 的密码修复程序解决了问题。 它们需要向后移植到 3.10.xx Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 多亏了飞思卡尔的 Steve Cornelius 等人,我们才得以证明这个问题与高速缓存一致性有关。 特别是,CAAM驱动程序期望所有输入和输出在缓存行边界(i.MX6上为32字节)上对齐。 由于 testmgr 代码最初是为测试软件实现而创建的,从内核 3.10.17 开始,它并没有确保任何特定的对齐方式,这就导致了故障的发生: crypto testmgr: 在缓存行上对齐结果缓冲区 - e3e7ad4 - boundarydevices/linux-imx6 - GitHub 正如提交日志中提到的,用户空间代码中也存在对输入和输出的这种要求,因此应用程序在分配时需要小心谨慎。 Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> jamesbone你有这个案件的最新进展吗? Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 尚未修复。 Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 这个问题已经解决了吗? 我也有这个问题。但是,我需要将延迟值改为 100usec 才能成功测试。 这是一个大问题。 Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Jamesbone你能继续跟进这个案子吗? Re: Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 还有更多细节: 在caam_jr_dequeue() 的这两个位置中的任何一个位置使用相同的 udelay(20) 都不会导致测试成功: linux-imx6/drivers/crypto/caam/jr.c at boundary-imx_3.10.17_1.0.0_ga - boundarydevices/linux-imx6 - GitHub linux-imx6/drivers/crypto/caam/jr.c at boundary-imx_3.10.17_1.0.0_ga - boundarydevices/linux-imx6 - GitHub Re: Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 有关这些测试的更多信息... 在 caam_jr_enqueue() 结束时调用 udelay(20) 可以使测试成功,因此这似乎是某种形式的定时错误。 ~/linux-imx6$ git diff diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c 索引 80ddddb...c8c4a7e 100644 --- a/drivers/crypto/caam/jr.c +++ b/drivers/crypto/caam/jr.c @@ -288,6 +288,7 @@ int caam_jr_enqueue (结构设备 *dev,u32 *Desc, spin_unlock_bh(&jrp->inplock); + udelay(20); 返回 0; } EXPORT_SYMBOL(caam_jr_enqueue); Re: Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 进一步更新:在随后在 3.10.17-1.0.0-ga 上启动时,我只看到了 8 字节的零: alg: hash:hmac-sha1-caam 测试 1 失败 00000000: 00 00 00 00 00 00 00 00 E2 8B C0 B6 FB 37 8C 8E 00000010: F1 46 BE 00 alg: hash:对 sha1-caam 的测试 1 失败 Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 其他说明: 测试失败时显示的数值: alg: hash:hmac-sha1-caam 测试 1 失败 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010: F1 46 BE 00 似乎与预期结果相似。这是 crypto/testmgr.c 中 hmac-sha1 的第一个测试向量: static struct hash_testvec hmac_sha1_tv_template[] = {   { key ="\x0b\x0b\x0b\x0b" 、 .ksize = 20、 .plaintext ="你好" 、 .psize = 8、 .digest ="\xb6\x17\x31\x86\x55\x05\x72\x64" "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1" "\x46\xbe" 、 ... 请注意,"f1 46 be" 序列与预期值相吻合。 另请注意,每项失败测试的前 16 字节显示为零。 Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 你好,海梅、 我想你没注意到我们正在测试 3.0.35_4.1.0、3.10.17-1.0.0-ga 和 3.10.31_1.0.0-alpha。 每个页面都已包含其他页面的补丁: dma_map_sg_chained 补丁: http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_3.0.35_4.0.0&id=b30237c79003223c6e8035d5be183cd4f0b469f9 3.10.17 信息来源 https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.10.17_1.0.0_ga/drivers/crypto/caam/sg_sw_sec4.h#L96 给 driver_algs 打补丁: http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_3.0.35_4.0.0&id=6068d7a77b2101c172fc2f003f90b1febbf99505 3.10.17 信息来源 https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.10.17_1.0.0_ga/drivers/crypto/caam/caamalg.c#L2083 我也不清楚我们看到的问题是否只存在于哈希算法中。 此致, 埃里克 Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 亲爱的埃里克 在 linux 3.0.35 上需要打一些补丁,以获得 CAAM 的正常功能 问&答:为什么 iMX6 的 CAAM 驱动程序在 Linux 下无法运行? 祝您愉快, Jaime ----------------------------------------------------------------------------------------------------------------------- 注:如果本帖回答了您的问题,请点击正确答案按钮。Thank you! -----------------------------------------------------------------------------------------------------------------------
查看全文
CAAM and kernel crypto tests Hi all, We're seeing some disconcerting error messages on various versions of Linux and various boards when enabling CAAM and the kernel self-tests. Testing on SABRE-SD with 3.10.31-alpha root@imx6qsabresd:~# dmesg ... alg: hash: Test 1 failed for hmac-sha1-caam 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010: f1 46 be 00 alg: hash: Test 1 failed for sha1-caam 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010: 9c d0 d8 9d alg: hash: Test 1 failed for hmac-sha224-caam 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010: 47 b4 b1 16 99 12 ba 4f 53 68 4b 22 alg: hash: Test 1 failed for sha224-caam 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010: 2a ad bc e4 bd a0 b3 f7 e3 6c 9d a7 root@imx6qsabresd:~# cat /proc/cmdline console=ttymxc0,115200 ip=dhcp root=/dev/mmcblk0p2 rootwait caam The kernel configuration is essentially the same as the stock v7_defconfig with a few additional debug flags: ~/linux-imx6$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- savedefconfig scripts/kconfig/conf --savedefconfig=defconfig Kconfig ~/linux-imx6$ diff defconfig arch/arm/configs/imx_v7_defconfig 253a254 > CONFIG_USB_PHY=y 329d329 < CONFIG_DEBUG_LOCK_ALLOC=y 334d333 < # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set We've seen the same results with kernel 3.0.35_4.1.0 and 3.10.17-1.0.0-ga on Nitrogen6x. Does anyone have some insight about this? Thanks in advance, Eric i.MX6_All Linux Re: CAAM and kernel crypto tests SecretCryptos is your one-stop solution for anonymous crypto transactions. Whether you're looking to use a crypto mixer or trade on a secure exchange, SecretCryptos ensures full privacy and anonymity for all your transactions. SecretCryptos Crypto Mixer and Exchange All Mixer Pages (per coin) SecretCryptos Crypto Mixer | Bitcoin (BTC) Mixer | Ethereum (ETH) Mixer | Tether (USDT) Mixer | USD Coin (USDC) Mixer | BNB (BSC) Mixer | Litecoin (LTC) Mixer | Dogecoin (DOGE) Mixer | XRP (Ripple) Mixer | Solana (SOL) Mixer | TRON (TRX) Mixer | TON (Toncoin) Mixer | Polygon (MATIC) Mixer | Avalanche (AVAX) Mixer | Cardano (ADA) Mixer | Polkadot (DOT) Mixer | Shiba Inu (SHIB) Mixer Instant Crypto Exchange Crypto Exchange Re: CAAM and kernel crypto tests Many thanks, Jon Re: CAAM and kernel crypto tests There are actually proper fixes to this problem in Herbert Xu's crypto-2.6 tree.  Specifically LKML: Herbert Xu: Crypto Fixes for 3.13 and LKML: Herbert Xu: Re: Crypto Fixes for 3.13 fix the problems.  They would need to be backported to 3.10.xx Re: CAAM and kernel crypto tests Thanks to Steve Cornelius and others at Freescale, we've been able to show that this issue has to do with cache coherency. In particular, the CAAM drivers expect all inputs and outputs to be aligned with on a cache line boundary (32 bytes on i.MX6). Since the testmgr code was originally created to test software implementations, as of kernel 3.10.17, it didn't ensure any particular alignment, which caused the failures, and a simple update to address this prevents the errors:          crypto testmgr: Align result buffer on cache-line · e3e7ad4 · boundarydevices/linux-imx6 · GitHub As mentioned in the commit log, this requirement for inputs and outputs also exists in userspace code, so applications will need to take care in allocations. Re: CAAM and kernel crypto tests jamesbone do you have an update of this case? Re: CAAM and kernel crypto tests Not fixed yet. Re: CAAM and kernel crypto tests Is this problem fixed?? or, solution is just delay??? I have the problem too. but, I need to change delay value up to 100usec for successful test. It is big problem. Re: CAAM and kernel crypto tests jamesbone can you continue with the follow up on this case? Re: Re: CAAM and kernel crypto tests Yet more detail: The same udelay(20) in either of these two spots in caam_jr_dequeue() do not result in successful tests:      linux-imx6/drivers/crypto/caam/jr.c at boundary-imx_3.10.17_1.0.0_ga · boundarydevices/linux-imx6 · GitHub      linux-imx6/drivers/crypto/caam/jr.c at boundary-imx_3.10.17_1.0.0_ga · boundarydevices/linux-imx6 · GitHub Re: Re: CAAM and kernel crypto tests Yet more information regarding these tests... A udelay(20) call at the end of caam_jr_enqueue() allows the tests to succeed, so it appears to be some form of timing bug. ~/linux-imx6$ git diff diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c index 80ddddb..c8c4a7e 100644 --- a/drivers/crypto/caam/jr.c +++ b/drivers/crypto/caam/jr.c @@ -288,6 +288,7 @@ int caam_jr_enqueue(struct device *dev, u32 *desc,         spin_unlock_bh(&jrp->inplock); +       udelay(20);         return 0; } EXPORT_SYMBOL(caam_jr_enqueue); Re: Re: CAAM and kernel crypto tests Further update: In a subsequent boot on 3.10.17-1.0.0-ga, I'm seeing only 8 bytes of zeros: alg: hash: Test 1 failed for hmac-sha1-caam 00000000: 00 00 00 00 00 00 00 00 e2 8b c0 b6 fb 37 8c 8e 00000010: f1 46 be 00 alg: hash: Test 1 failed for sha1-caam Re: CAAM and kernel crypto tests Additional notes: The values shown in the test failures: alg: hash: Test 1 failed for hmac-sha1-caam  00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00000010: f1 46 be 00  Appear to be similar to the expected results. This is the first test vector for hmac-sha1 in crypto/testmgr.c: static struct hash_testvec hmac_sha1_tv_template[] = {   {   .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",   .ksize = 20,   .plaintext = "Hi There",   .psize = 8,   .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"    "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"    "\x46\xbe", ... Note that the sequence "f1 46 be" matches the expected value. Also note that the first 16 bytes of each of the failed tests is showing as zero. Re: CAAM and kernel crypto tests Hi Jaime, I think you missed that we're testing against 3.0.35_4.1.0, 3.10.17-1.0.0-ga, and 3.10.31_1.0.0-alpha. Each of them already contains the patches from the other page: Patch to dma_map_sg_chained:      http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_3.0.35_4.0.0&id=b30237c79003223c6e8035d5be183cd4f0b469f9 3.10.17 sources:      https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.10.17_1.0.0_ga/drivers/crypto/caam/sg_sw_sec4.h#L96 Patch to driver_algs:      http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_3.0.35_4.0.0&id=6068d7a77b2101c172fc2f003f90b1febbf99505 3.10.17 sources:      https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.10.17_1.0.0_ga/drivers/crypto/caam/caamalg.c#L2083 I also wasn't clear that the problem we're seeing is only with the hash algorithms. Regards, Eric Re: CAAM and kernel crypto tests Dear Eric, On linux 3.0.35 there is a need for some patches in order to get  proper functionality of CAAM Q&A: Why is CAAM Driver Not Functioning in Linux for iMX6? Have a great day, Jaime ----------------------------------------------------------------------------------------------------------------------- Note: If this post answers your question, please click the Correct Answer button. Thank you! -----------------------------------------------------------------------------------------------------------------------
查看全文
在 H264 编码前叠加带图形的 IMX8 视频 你好,我们正在设计一个使用 1920x1080p30 摄像机的视觉检测系统。 我们需要在 H264 编码之前将图形叠加到视频流上,并叠加到低功耗系统的显示屏上。我没有找到任何关于如何使用 iMX8M-Plus 等 SOC 实现这一功能的信息。iMX6 有一个 IPU,可以在视频流上合成/叠加图形,但最大分辨率为 1024x1024(1920x1080 时可叠加 4 次)。iMX8M 系列似乎已经失去了视频处理的这一方面。 因此,我猜 2D 或 3D GPU 在执行正常显示工作的同时,还必须在内存中进行合成/叠加。似乎没有 gstreamer 插件来处理这个问题,所以我必须创建一个。然而,在现阶段,我想知道 1.iMX8-Plus 硬件能否以最低的 CPU 占用率实现这一功能(摄像机为 YUV I422/I421,合成器/叠加输出需要输入到 VPU 编码器(NV12? 2.有什么好办法吗?我们必须在使用普通 X11/Wayland 图形用户界面时使用 GPU,并通过零拷贝 dma 缓冲管道等馈送数据。 特里 Re: IMX8 Video overlay with graphics before H264 encode 我们的应用很简单。叠加的 QImage 大约每秒异步创建一次(实际上是两个 QImage,一个正在绘制,一个用于显示,中间有一个用于切换的 Mutex)。 gstreamer appsrc 元素被配置为以 5 fps 的速度发射视频帧,并通过 imxcompositor_g2d 获取 QImage 并将其注入 gstreamer 流。 ogstOverlaysrc=gst_bin_get_by_name(GST_BIN(ogstPipeline), "appsrc"); if(ogstOverlaySrc){ g_object_set(G_OBJECT(ogstOverlaySrc), "caps", gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING, "BGRA", "width", G_TYPE_INT, osize.width(), "height", G_TYPE_INT, osize.height(), "framerate", GST_TYPE_FRACTION, 5, 1, NULL), NULL); g_object_set(G_OBJECT(ogstOverlaySrc), "stream-type", 0, // GST_APP_STREAM_TYPE_STREAM "format", GST_FORMAT_TIME, "is-live", FALSE, NULL); g_signal_connect(ogstOverlaySrc, "need-data", G_CALLBACK(gstOverlayAddFrameCallback), gpointer(this)); } 管道位: imxcompositor_g2d name=c latency=20000000 sink_1::alpha=1.0 ! identity drop-allocation=true v4l2src device=/dev/video3 ! video/x-raw,width=1920,height=1080,framerate=25/1 ! c.sink_0 appsrc name="appsrc" ! videoconvert ! video/x-raw,format=ARGB ! c.sink_1 Re: IMX8 Video overlay with graphics before H264 encode 感谢您的详细解答!如果您不介意的话,在此基础上再提几个问题: 1.您是如何保持 QT 叠加和视频帧同步的? 2. 我对 QT + Gstreamer 组合没有太多经验,能否请您详细介绍一下这两者是如何连接的?我找到了一些关于如何在 QT 应用程序中使用 Gstreamer 获取视频的信息,但不是我们要做的。 注:我对您帖子的初步理解是,您将叠加保存为图像,然后使用 appSrc 注入。我不太清楚的就是这个环节。 谢谢! Re: IMX8 Video overlay with graphics before H264 encode 我们有一台模拟摄像机,可以传输 1920x1080p25 的视频流,并在此基础上进行叠加。我们使用 Qt 将叠加图像创建为 1920x1080 全尺寸的 QImage,然后使用 gstreamer appSrc 将其与 alpha=1.0 的视频流一起注入其中一个 imxcompositor_g2d 源。 在我们的案例中,我们以 5 帧/秒的速度生成 appSrc gstreamer 叠加帧,以节省 Qt 绘图方面的 CPU 占用率,因为我们并不需要比这更快的速度,但也顺利完成了 25 帧/秒的全速。 我们的系统捕获全高清视频流,叠加文本/图形,在液晶显示屏上显示,同时进行H264编码,保存为文件以及管理声音流,imx8mp 的总体使用率(4 核)约为 25%。 但是,使用 gstreamer 处理 IMX8mp 有点像雷区。由于没有详细的文档说明,它在引擎盖下是一个相对复杂的系统,这就意味着你经常需要使用 gstreamer 的安排和设置(其中有很多并不明显),才能让事情高效运转。 Re: IMX8 Video overlay with graphics before H264 encode @TerryBarnaby1,使用这种解决方案,您能获得什么样的帧速率?我们正在评估不同的选项,但关于在相机捕获的帧上绘制形状或叠加文本的潜在解决方案的资源很少。 谢谢您! Re: IMX8 Video overlay with graphics before H264 encode 你好,Terry 在我的案例中,考虑的用例是简单的 wayland 应用程序,其中有一个配置了位置和分辨率的视频窗口,最佳方法是什么?我使用多个 egl 表面?还是 Wayland 子表面?您能建议哪种方法更好吗? Re: IMX8 Video overlay with graphics before H264 encode 你好 ,对我的上述查询有什么意见吗? 另外,您知道如何使用 GPU/VPU 来使用 chromakey 属性吗? Re: IMX8 Video overlay with graphics before H264 encode 你好,恩智浦 waylandsink 的 alpha 属性不起作用(5.4.70- imx8mplus),有什么限制吗? Re: IMX8 Video overlay with graphics before H264 encode 您好 考虑在其中运行多个视频的简单 wayland 应用程序 还有一点,我试图使用 waylandsink(imx8m-plus)的 alpha 属性,但无法正常工作,这有什么限制吗? Re: IMX8 Video overlay with graphics before H264 encode 我想这取决于你到底想做什么。您需要了解 iMX8mp 硬件、已实施的 gstreamer 模块、wayland 服务器代码、图形用户界面工具包等。这也取决于你所说的 W ayland GUI 层是什么意思。 就我而言,我需要在视频流上叠加一些文本,然后才能将其显示在 Qt 窗口中,并将 h264 编码为文件,我使用的是 Qt GUI 平台。在我的代码中,叠加在视频上的图形 " 层 "(在我的示例中来自 test1.png)是使用普通的 Qt 绘图原语和 gstreamer " appsrc name=\ " appsrc\ " 在 Qt QImage 中生成的!视频转换!imagefreeze!c.sink_1 " 部分管道用于将其输入到 imxcompositor_g2D 中。屏幕输出是 " waylandsink name=\ " VideoSink\ " " 还有一些 C++ GUI 代码可以在我的应用程序中的特定 Qt 窗口上移动这个 walyandsink 区域并调整其大小。 Re: IMX8 Video overlay with graphics before H264 encode 你好 特里 感谢您的输入,如果我想将视频层与 Wayland GUI 层融为一体,可以用类似的方法吗? Re: IMX8 Video overlay with graphics before H264 encode 我发现在当前基于(恩智浦 Yocto hardknott)的 Linux 系统中,可以使用图形 2D 引擎来执行叠加处理。gstreamed imxcompositor_g2d 模块可以做到这一点。典型的 gstreamer 命令如下 gst-用上市,不用发布-1.0imxcompositor_g2d name=c sink_1::alpha=0.5 !waylandsink v4l2src 设备=/dev/video3!video/x-raw,width=1920,height=1080,framerate=30/1 !c.sink_0 multifilesrc location=./test1.png caps=image/png,framerate=1/1 !pngdec !图像冻结 !c.sink_1 这将获取全高清摄像机数据流,并在其上叠加 test1.png 文件。继 imxcompositor_g2d 之后,您可以通过"vpuenc_h264 传输视频流!h264parse !avimux !filesink location=/tmp/temp.avi" 使用硬件 h264 编码器进行编码,必要时也可将其与 h264 编码器一起连接到显示器。 Re: IMX8 Video overlay with graphics before H264 encode 您好 我也有类似的需求,我想了解如何在 imx8m plus 平台上测试视频叠加,遗憾的是,日期为 2021 年 1 月 13 日的 L5.4.70_2.3.0 Linux 用户指南文档中没有 imx8m-plus 的具体信息,也没有overlaysink插件。 Re: IMX8 Video overlay with graphics before H264 encode 非常感谢。 如果能在 " i.MX Linux® 用户指南 " 中概述视频处理架构(硬件和软件层/API 和代码包)和历史,以及恩智浦Yocto 电路板支持包和社区Yocto 电路板支持包如何支持该架构,那就太好了。 Re: IMX8 Video overlay with graphics before H264 encode HI 是的,imx-gst1.0-plugin 已取代 gstreamer1.0-plugins-imx。 在 i.MX6 系列中:视频渲染依赖于 G2D,而不是 DRI 在 i.MX8 系列中:视频渲染依赖于 DRI,因为 Wayland 使用了 DRI Re: IMX8 Video overlay with graphics before H264 encode 感谢您提供的信息,但这是特定恩智浦电路板支持包。版本的特定信息。 我需要为自定义板制作一个 Yocto 版本,因此需要为此配置 Yocto 版本,以获得最新和最新的视频处理 gstreamer 元素。恩智浦 " Yocto " 版本与社区版本(更主线)不同,有电路板支持包类型和三种不同的内核变体,然后是不同内核驱动程序配置的所有工具等。此外,旧的 Yocto 版本具有不同的 gstreamer 元素和驱动程序等。 我只是想了解当前/计划中的底层视频处理软件树是什么,所以我在我们的版本中遵循了这一点。据说在定制主板上使用社区Yocto 电路板支持包,但这与恩智浦的Yocto wrt视频处理有很大不同。例如,在用户层面有 gstreamer1.0-plugins-imx和 imx-gst1.0-plugin这两个代码包都不是使用基于社区的 IMX6DL 的 Yocto dunfell 版本构建的。 我认为 imx-gst1.0-plugin代码包已取代 gstreamer1.0-plugins-imx这是否依赖于 DRI GPU 接口路线? 我只想了解整个硬件视频处理软件/硬件架构/代码包及其历史,这样我就可以以最明智的方式进行开发。 特里 Re: IMX8 Video overlay with graphics before H264 encode HI 所有电路板支持包版本说明和有关 i.MX GStreamer 1.0 插件的详细信息均在 i.MX_Linux_release_Notes.pdf(多媒体)中 i.MX_Linux_Users_Guide.pdf 介绍了如何进行测试。 关于你提到的最后一点,版本说明中说: i.MX 6 系列: • overlaysink:基于 G2D 的视频接收器插件 • imxv4l2sink:基于 V4L2 的视频接收器插件 Re: IMX8 Video overlay with graphics before H264 encode 感谢您提供的信息,我刚刚发现 imx8m 不支持某些视频处理,但我没有版本它没有 2D GPU!iMX8 系列产品非常杂乱,零件命名也很奇怪! 但基本问题仍然存在,我们的设计目标不是 imx8mq,我们可能会使用 IMX8M-Plus 或 IMX8-DualXPlus。我想确定的是如何在 H264 之前构建一个支持硬件视频合成的合适的 Yocto 版本。 在过去的5年中,软件支持发生了很大变化,制作Yocto版本的途径很多,内核和外部也有许多图形和视频处理驱动程序的更改等。目前似乎还没有一个简单的整体指南来说明这些变化和方向,以及需要哪些用户级 API 和哪些内核和内核级 API。所以我想理解这一点,这样我们就可以先测试或视频处理概念,然后为这个定制板设计和开发合适的 Yocto 版本。 例如,我认为 imx-gst1.0-plugin代码包已经取代了 gstreamer1.0-plugins-imx代码包以及它何时需要/支持哪些较低级别的 API/驱动程序(DRI?)。我想为 imx6 和 IMX8M-Plus 版本兼容的系统,但我不确定这是否可能。 特里 Re: IMX8 Video overlay with graphics before H264 encode HI i.MX8MQ 没有 2D GPU,因此无法使用imxcompositor_g2d,您可以尝试使用其他 imxcompositor。 BR Re: IMX8 Video overlay with graphics before H264 encode 非常感谢您提供的信息。我想试一试,以证明可以通过 H264 VPU 编码器获取输出,以及 CPU 的总体使用率。但是,我从哪里以及如何获取 gstreamer imxcompositor_g2d 插件?我一直在尝试为我拥有的iMX6和iMX8测试平台构建一个合适的社区或基于恩智浦的Yocto版本,但从未见过这个插件?恩智浦的 gstreamer 插件目前似乎一团糟。 用户级部分是否应放在 gstreamer1.0-plugins-imx 中?包裹? 如果我使用以下方法构建 IMX 社区 Yocto 版本:" https://github.com/Freescale/fsl-community-bsp-platform-b dunfell " 这无法构建 gstreamer1. 0-plugins-imx包裹。 如果我使用以下方法版本 IMX 恩智浦 Yocto 版本:" https://source.codeaurora.org/external/imx/imx-manifest-b imx-linux-zeus-m imx-5.4.70-2.3.0.xml " 据我所见 imx8mqevk 机器没有 imxcompositor_g2d 插件(因为我没有 imx8mqevk 所以无法运行)以及如果我在版本中添加 " gstreamer1.0-plugins-imx "(image_install_append)我收到错误 " imx8mqevk(不在 COMPATIBLE_MACHINE 中)"。 那么,我应该版本什么才能获得一个能提供有效的 imxcompositor_g2D gstreamer 插件的合适的 Yocto Linux 系统呢? Re: IMX8 Video overlay with graphics before H264 encode HI 1.还支持 YUV422 和 YUV420 输入和输出格式, 支持编码器 (NV12)。 2.您可以查看 7.3.16i.MX_Linux_User's_Guide.pdf 中的视频合成 imxcompositor_g2d 使用相应的硬件来加速视频合成。它可用于将多个 视频合成为一个视频。视频位置、大小和旋转可在合成时指定。如果输入和输出视频不一致, ,视频色彩空间转换也会自动进行。每个视频都可以设置一个 alpha 值和 Z 阶值,以便 获取 alpha 混合和视频混合序列。
查看全文
MIMXRT1170 割り込みの問題 こんにちは、皆さん GPIO 外部割り込みについて質問があります。MIMXRT1170_igpio_input_interrupt の例では、GPIO13_io0 ピンが入力として定義され、立ち上がりエッジ割り込みが有効になっています。GPIO13_io0 の代わりに GPIO8_io29 を使いたいです。しかし、gpio8 の割り込みハンドラーは見つかりません。 gpio8_29 を外部割り込みとして定義するにはどうすればよいですか? Re: MIMXRT1170 Interrupt issue こんにちは@EdwinHz 、 最近、あなたの回答を見て、何かがおかしいと感じたので、本当にそうなのかどうか疑問に思い始めました。 「GPIO7 から GPIO12 はすべて CM4 ドメインからのみアクセス可能」と述べられていた。SO、RM を調べ始めたところ、次のことがわかりました。 AIPS-4 の説明では、このメモリ マップ範囲は CM7 コアと CM4 コアの両方からアクセスできると明記されています。SO、私の理解では、それはあなたが少し前に述べたことと矛盾しています。 さらに、あなたが貼り付けたバスダイアグラムは、実際には次の経路でGPIO[12-7]へのバス接続を持っていると思います(私の理解が正しいと仮定)。 RM からの情報によると、PGIO はアクセス可能であるため、フローは次のようになると想定しました。間違っていたら訂正してください。しかし、何かが明らかに間違っているので、正す必要があると感じています。 よろしくお願いします、 マイケル Re: MIMXRT1170 Interrupt issue 私も同じ問題に遭遇しました。何か進展はありますか? Re: MIMXRT1170 Interrupt issue ありがとうエドウィン、分かりました Re: MIMXRT1170 Interrupt issue こんにちは@muratokuslukさん、 ほとんどのピンは CM7 ドメインと CM4 ドメインの両方からアクセスできますが、GPIO7 から GPIO12 はすべて CM4 ドメインからのみアクセスできます。 したがって、GPIO8 は CM4 アクセスのみを目的としており、CM7 割り込みはありません。「表 4-2.リファレンスマニュアルの「CM4 ドメイン割り込み概要」には、IRQ 99 に GPIO7 から GPIO11 が示されています。 しかし、「表4-1.「CM7 ドメイン割り込みサマリー」には、代わりに CM7_GPIO2 と CM7_GPIO3 IRQ があります。 ただし、GPIO8_IO29 をルーティングするパッドである GPIO_EMC_B2_19 は、代替機能 10 ではなく 5 を使用する場合、GPIO_MUX2_IO29 もルーティングします。 したがって、CM4 を使用する場合は GPIO8 のパッドと割り込みを IRQ 99 で構成し、CM7 を使用する場合は CM7_GPIO2 に同じパッドと割り込みを構成することができ、IRQ は引き続き IRQ 99 (CM7_GPIO2) になります。 プロジェクトをcm7ではなくipgio_input_interrupt_cm4に基づいている場合は、startup_mimxrt1176_cm4.cに「GPIO7_8_9_10_11_IRQHandler()」が見つかります。 これでご質問への回答になったかと思います。 BR、 エドウィン。
查看全文
H264エンコード前のグラフィック付きIMX8ビデオオーバーレイ こんにちは。私たちは 1920x1080p30 ビデオカメラを使用した目視検査システムを設計しています。 低電力システムでは、H264 エンコードの前とディスプレイの前に、ビデオ ストリームにグラフィックをオーバーレイする必要があります。iMX8M-Plus のような SOC でこれを行う方法に関する情報が見つかりません。iMX6 には、最大解像度 1024x1024 (1920x1080 の場合は 4 倍) でビデオ ストリームにグラフィックを合成/オーバーレイできる IPU がありました。iMX8M ファミリでは、ビデオ プロセッシングのこの側面が失われているようです。 SO、2D または 3D GPU は、通常の表示作業も実行しながら、メモリへのこの合成/オーバーレイを実行する必要があると思います。これを処理するための gstreamer プラグインは存在しないようです、SO何かを作成する必要があります。しかし、この段階で私が知りたいのは、次のことです。 1. iMX8-Plus ハードウェアは、CPU 使用率を最小限に抑えてこれを実現できますか (カメラは YUV I422/I421 で、コンポーザー/オーバーレイ出力は VPU エンコーダー (NV12 ?) とディスプレイに供給する必要があります)? 2. これについてどのように進めればよいか、何かアイデアはありますか?通常の X11/Wayland グラフィックス GUI が使用されている間は GPU を使用し、ゼロ コピー DMA バッファー パイプラインなどを通じてデータを供給する必要があります。 Terry Re: IMX8 Video overlay with graphics before H264 encode 私たちのアプリケーションでは簡単です。オーバーレイ QImage は、1 秒に 1 回程度非同期的に作成されます (実際には 2 つの QImage があり、1 つは描画用、もう 1 つは切り替え用の Mutex による表示用です)。 gstreamer appsrc 要素は、5 fps でビデオ フレームを送信するように構成されており、QImage を取得して、imxcompositor_g2d を介して gstreamer ストリームに挿入します。 ogstOverlaysrc=gst_bin_get_by_name(GST_BIN(ogstPipeline), "appsrc"); if(ogstOverlaySrc){ g_object_set(G_OBJECT(ogstOverlaySrc), "caps", gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING, "BGRA", "width", G_TYPE_INT, osize.width(), "height", G_TYPE_INT, osize.height(), "framerate", GST_TYPE_FRACTION, 5, 1, NULL), NULL); g_object_set(G_OBJECT(ogstOverlaySrc), "stream-type", 0, // GST_APP_STREAM_TYPE_STREAM "format", GST_FORMAT_TIME, "is-live", FALSE, NULL); g_signal_connect(ogstOverlaySrc, "need-data", G_CALLBACK(gstOverlayAddFrameCallback), gpointer(this)); } パイプライン ビット: imxcompositor_g2d name=c latency=20000000 sink_1::alpha=1.0 ! identity drop-allocation=true v4l2src device=/dev/video3 ! video/x-raw,width=1920,height=1080,framerate=25/1 ! c.sink_0 appsrc name="appsrc" ! videoconvert ! video/x-raw,format=ARGB ! c.sink_1 Re: IMX8 Video overlay with graphics before H264 encode 詳しいご回答ありがとうございます!もしよろしければ、これに基づいてさらにいくつか質問します。 1.QT オーバーレイとビデオ フレームをどのように同期させていますか?データ オーバーレイは、対応するビデオ フレームに正しく同期される必要があると思われます。 2. QT + Gstreamer の組み合わせについてはあまり詳しくないのですが、この 2 つがどのようにインターフェースされるかについてもう少し詳しく教えていただけますか?QT アプリ内で Gstreamer を使用してビデオを取得する方法についていくつかの情報を見つけましたが、それは私たちがやろうとしていることではありませんでした。 PS: あなたの投稿を最初に解釈すると、オーバーレイを画像として保存し、それを appSrc を使用して挿入していると思われます。そのリンクは私にとってはよく分かりません。 ありがとう! Re: IMX8 Video overlay with graphics before H264 encode そうですね、1920x1080p25 のビデオ ストリームを送信するアナログ カメラがあり、それにオーバーレイしています。Qt を使用して、フル 1920 x 1080 サイズの QImage にオーバーレイ イメージを作成し、次に gstreamer appSrc を使用して、これをアルファ = 1.0 のビデオ ストリームとともに imxcompositor_g2d ソースの 1 つに挿入します。 私たちの場合、これ以上の速度は必要ないため、Qt 描画側での CPU 使用率を節約するために appSrc gstreamer オーバーレイ フレームを 5 fps で生成しましたが、問題なく 25 fps を完全に実行できました。 FHD ビデオ ストリームをキャプチャし、テキスト/グラフィックをオーバーレイし、H264 エンコードしながら LCD パネルに表示し、ファイルに保存し、サウンド ストリームを管理する当社のシステムでは、imx8mp の全体的な使用率 (4コア) は約 25% です。 しかし、IMX8mp を gstreamer で操作するのは、ちょっとした危険地帯です。詳細なドキュメントがなく、内部的には比較的複雑なシステムであるため、効率的に動作させるには、gstreamer の配置や設定(多くはわかりにくい)を試行錯誤する必要があることがよくあります。 Re: IMX8 Video overlay with graphics before H264 encode @TerryBarnaby1 、このソリューションを使用して、どのようなフレームレートを実現できましたか?私たちはさまざまなオプションを評価していますが、カメラからキャプチャしたフレームに図形を描画したりテキストを重ねたりするための潜在的な解決策に関するリソースはほとんどありません。 よろしくお願いします! Re: IMX8 Video overlay with graphics before H264 encode こんにちは、テリー 私のCASE、位置と解像度が設定されたビデオウィンドウを内部に持つシンプルなWaylandアプリケーションのようなユースケースを考えてみましょう。最善のアプローチは何でしょうか?複数の egl サーフェスを使用しますか?あるいはウェイランドの地下表面ですか?どちらのアプローチがより良いかご提案いただけますか? Re: IMX8 Video overlay with graphics before H264 encode こんにちは 上記の質問に関して何か情報はありますか? waylandsink にはアルファ プロパティに関する制限がありますか? また、GPU/VPU を使用してクロマキー プロパティを使用する方法については何かアイデアがありますか? Re: IMX8 Video overlay with graphics before H264 encode こんにちはNXP waylandsink のアルファ プロパティが機能しません (5.4.70- imx8mplus) 、何か制限がありますか? Re: IMX8 Video overlay with graphics before H264 encode こんにちは 複数のビデオを実行するシンプルなWaylandアプリケーションを検討してください もう 1 つのポイントとして、waylandsink (imx8m-plus) のアルファ プロパティを使用しようとしていますが、機能しません。ここには何か制限がありますか? Re: IMX8 Video overlay with graphics before H264 encode それはあなたが具体的に何をしたいかによると思います。iMX8mp ハードウェア、実装された gstreamer モジュール、Wayland サーバー コード、GUI ツールキットなどを理解する必要がありますが、その情報は不足しており、私は専門家ではありません。また、W ayland GUI レイヤーの意味によっても異なります。 私の場合、Qtウィンドウに表示する前にビデオストリームにテキストをオーバーレイし、さらにH264エンコードしてファイルに出力する必要がありました。Qt GUIプラットフォームを使用しています。コードでは、ビデオにオーバーレイされるグラフィカル「レイヤー」(この例ではtest1.pngから取得)を、通常のQt描画プリミティブを使用してQt QImageで生成し、gstreamerの「appsrc name=\"appsrc\" ! videoconvert ! imagefreeze ! c.sink_1」部分パイプラインを使用してimxcompositor_g2dに送り込んでいます。画面出力は「waylandsink name=\"videoSink\"」で、このwaylandsink領域をアプリケーション内の特定のQtウィンドウ上で移動およびサイズ調整するためのC++ GUIコードが含まれています。 Re: IMX8 Video overlay with graphics before H264 encode こんにちは、テリー ご意見ありがとうございます。ビデオ レイヤーと Wayland GUI レイヤーをブレンドしたい場合、同様のアプローチで可能ですか? Re: IMX8 Video overlay with graphics before H264 encode 現在の (NXP Yocto hardknott) ベースの Linux では、グラフィックス 2D エンジンを使用してオーバーレイ プロセッシングを実行できることがわかりました。gstreamed imxcompositor_g2d モジュールはこれをCAN。典型的な gstreamer コマンドは次のようになります。 gst-launch-1.0imxcompositor_g2d name=c sink_1::alpha=0.5 !waylandsink v4l2src デバイス=/dev/video3 !ビデオ/x-raw、幅=1920、高さ=1080、フレームレート=30/1 !c.sink_0 マルチファイルrc location=./test1.png caps=image/png,framerate=1/1 !pngdec !画像フリーズ!c.シンク_1 これにより、フル HD カメラ ストリームが取得され、その上に test1.png ファイルがオーバーレイされます。imxcompositor_g2d に続いて、このビデオ ストリームを "vpuenc_h264 に渡すCAN。h264parse !アビムックス!「filesink location=/tmp/temp.avi」と入力して、ハードウェア h264 エンコーダーを使用してエンコードし、必要に応じて h264 エンコーダーだけでなくディスプレイにも出力します。 Re: IMX8 Video overlay with graphics before H264 encode こんにちは 私も同様の要件で作業しており、imx8m plus プラットフォームでビデオ オーバーレイをテストする方法を理解したいと思いますが、残念ながら、2021 年 1 月 13 日の L5.4.70_2.3.0 の Linux ユーザー ガイドのドキュメントには imx8m-plus 固有の情報がなく、プラグインoverlaysinkも利用できません。 Re: IMX8 Video overlay with graphics before H264 encode どうもありがとう。 「i.MX Linux ®ユーザー ガイド」にビデオ プロセッシング アーキテクチャ (ハードウェアおよびソフトウェア レイヤー/API およびパッケージ) の概要と履歴が記載されており、NXP Yocto BSP およびコミュニティ Yocto BSP でこれがどのようにサポートされているかが説明されていると便利です。 Re: IMX8 Video overlay with graphics before H264 encode ハイ はい、 imx-gst1.0-plugin が gstreamer1.0-plugins-imx に置き換えられました。 i.MX6ファミリでは、ビデオレンダリングはDRIではなくG2Dに依存します。 i.MX8ファミリでは、WaylandがDRIを使用しているため、ビデオレンダリングはDRIに依存します。 Re: IMX8 Video overlay with graphics before H264 encode 情報ありがとうございます。ただし、これは特定の NXP BSP リリースに固有の情報です。 カスタム ボード用の Yocto リリースを作成する必要があるため、最新のビデオ プロセッシング gstreamer 要素を取得するには、これ用の Yocto ビルドを構成する必要があります。NXP「Yocto」ビルドはコミュニティ ビルド (より主流) とは異なり、BSP タイプと 3 つの異なるカーネル バリアント、そしてさまざまなカーネル ドライバ構成などの付属品がすべて存在します。また、古い Yocto ビルドには、さまざまな gstreamer 要素やドライバなどがあります。 私は、現在および計画中のビデオ プロセッシング ソフトウェア ツリーの基礎が何であるかを理解しようとしているだけなので、ビルドではこれに従います。カスタム ボードにはコミュニティの Yocto BSP を使用すると言われていますが、これは NXP Yocto wrt ビデオ プロセッシングとはまったく異なります。例えば、ユーザーレベルではgstreamer1.0-plugins-imxがありますおよびimx-gst1.0-プラグインどちらのパッケージも、IMX6DL 用のコミュニティ ベースの Yocto dunfell ビルドではビルドされません。 imx-gst1.0-pluginはパッケージはgstreamer1.0-plugins-imxから引き継がれましたすべての IMX バリアントで、これは DRI GPU インターフェース ルートに依存しますか? 私は、最も賢明な方法で開発できるように、ハードウェア ビデオ プロセッシング ソフトウェア/ハードウェア アーキテクチャ/パッケージとその履歴全体を理解したいと考えています。 Terry Re: IMX8 Video overlay with graphics before H264 encode ハイ すべての BSP リリース ノートと i.MX GStreamer 1.0 プラグインの詳細は、i.MX_Linux_Release_Notes.pdf (マルチメディア) に記載されています。 i.MX_Linux_Users_Guide.pdf では、テストの実行方法について説明しています。 最後に言及した点については、リリースノートに次のように書かれています。 i.MX 6ファミリ: • overlaysink : G2Dベースのビデオシンクプラグイン • imxv4l2sink: V4L2ベースのビデオシンクプラグイン Re: IMX8 Video overlay with graphics before H264 encode 情報ありがとうございます。imx8m は一部のビデオプロセッシングをサポートしていないことがわかりましたが、2D GPU を搭載していないためリリースしていませんでした。この iMX8 シリーズは非常に乱雑で、部品の命名も奇妙です。 しかし、基本的な疑問は残ります。私たちのデザインでは imx8mq をターゲットにしておらず、おそらく IMX8M-Plus または IMX8-DualXPlus を使用することになるでしょう。私が決定しようとしているのは、一般的な H264 の前に、ハードウェア ビデオ合成をサポートする適切な Yocto リリースを構築する方法です。 ソフトウェア サポートは過去 5 年間で大きく変化しており、Yocto リリースを作成するためのルートは多数あり、カーネル内外のグラフィックスおよびビデオ プロセッシング ドライバの変更も数多く行われています。これらの変更や、方向性がどこに向かっているのか、どのようなユーザー レベル API とカーネルおよびカーネル レベル API が必要なのかについての、簡単な全体ガイドは存在しないようです。SO私はこれを理解して、最初にビデオプロセッシングのコンセプトをテストし、次にボードをデザインして、このカスタム ボードに適した Yocto ビルドを作成できるようにしたいと考えています。 例えば、imx-gst1.0-pluginはパッケージはgstreamer1.0-plugins-imxを置き換えましたパッケージと、いつ、どのような低レベル API/ドライバが必要/サポートされるか (DRI ?)。iMX6 と iMX8M-Plus に互換性のあるシステムを構築したいのですが、それが可能かどうかわかりません。 Terry Re: IMX8 Video overlay with graphics before H264 encode ハイ i.MX8MQには2D GPUがないSO、 imxcompositor_g2dは使用できません。別のimxcompositorを試すCAN。 BR Re: IMX8 Video overlay with graphics before H264 encode 情報ありがとうございます。これを試して、この出力が H264 VPU エンコーダーを介して取得CANこと、およびこれの全体的な CPU 使用率を証明したいと思います。しかし、gstreamer imxcompositor_g2d プラグインはどこでどうやって入手すればいいのでしょうか?私は、iMX6 および iMX8 テスト プラットフォームに適したコミュニティまたは nxp ベースの Yocto ビルドを構築しようとしていますが、このプラグインを見たことはありません。NXP gstreamer プラグインは現時点ではかなり混乱しているようです。 このユーザーレベルの部分はgstreamer1.0-plugins-imxにあるべきでしょうか?パッケージ ? 「 https://github.com/Freescale/fsl-community-bsp-platform -b dunfell」を使用してIMXコミュニティYoctoリリースをビルドすると、gstreamer1.0-plugins-imxをビルドできませんパッケージ。 IMX NXP Yocto リリースをビルドする場合: " https://source.codeaurora.org/external/imx/imx-manifestimx8mqevk マシンの「-b imx-Linux-zeus -m imx-5.4.70-2.3.0.xml」では、ビルド内に確認できる限り imxcompositor_g2d プラグインがありません (imx8mqevk がないため実行できません)。また、ビルド (IMAGE_INSTALL_append) に「gstreamer1.0-plugins-imx」を追加すると、「imx8mqevk (not in COMPATIBLE_MACHINE)」というエラーが発生します。 SO、機能する imxcompositor_g2d gstreamer プラグインを提供する適切な Yocto Linux システムを構築するには、何を構築すればよいのでしょうか? Re: IMX8 Video overlay with graphics before H264 encode ハイ 1.YUV422 および YUV420 入出力フォーマットもサポートされ、エンコーダー (NV12) をサポートします。 2.7.3.16をご覧くださいi.MX_Linux_User's_Guide.pdf のビデオ構成 imxcompositor_g2d は対応するハードウェアを使用してビデオ合成を高速化します。複数の ビデオを 1 つにまとめます。合成時にビデオのポジショニング、サイズ、回転を指定CAN。ビデオカラースペース変換は 入力ビデオと出力ビデオが同じでない場合も自動的に実行されます。各ビデオにはアルファ値とZオーダー値をCAN設定し、 アルファブレンディングとビデオブレンディングシーケンスを取得します。
查看全文
MIMXRT1170 中断问题 大家好, 我想问一些关于 GPIO 外部中断的问题。在 mimxrt1170_IGPIO_Input_interrupt 示例中,GPIO13_IO0 引脚被定义为输入并启用上升沿中断。我想用 GPIO8_io29 代替 GPIO13_io0。但我看不到 gpio8 的任何中断处理程序。 如何将 gpio8_29 定义为外部中断? Re: MIMXRT1170 Interrupt issue 你好@EdwinHz, ,我最近看到了你给出的这个答案,并开始怀疑这是否是真的,因为我觉得有些不对劲。 你说过 " GPIO7 到 GPIO12 都只能由 CM4 功能域 " 访问,所以我开始浏览 RM 后发现了以下内容: AIPS-4 的描述明确指出,CM7 和 CM4 内核都可以访问该内存映射范围。因此,根据我的理解,这与你前段时间的说法是矛盾的。 更重要的是,我认为你粘贴的总线图实际上是通过以下路线连接到 GPIO [12-7] 的总线(前提是我的理解是正确的): 根据 RM 提供的信息,这些 PGIO 是可以访问的,因此我猜测流程应该是这样的。如果我说错了,请指正我,但肯定有什么地方不对劲,我觉得应该纠正过来。 致以最崇高的敬意, Michael Re: MIMXRT1170 Interrupt issue 我也遇到了同样的问题。有什么进展吗? Re: MIMXRT1170 Interrupt issue 谢谢 Edwin,我明白了 Re: MIMXRT1170 Interrupt issue 你好,@muratokusluk、 尽管大多数引脚都可通过 CM7 功能域和 CM4 功能域访问,但 GPIO7 到 GPIO12 都只能通过 CM4 功能域访问: 因此,GPIO8 仅用于 CM4 访问,因此不存在 CM7 中断。请注意"表 4-2.参考手册中的 CM4 功能域中断摘要 " 在 IRQ 99 上有 GPIO7 到 GPIO11: 但"表 4-1.CM7 功能域中断摘要 " 改用了 CM7_GPIO2 和 CM7_GPIO3 IRQ: 也就是说,GPIO_EMC_B2_19 是路由 GPIO8_IO29 的焊盘,当使用 alt 函数 5 而不是 10 时,也会路由 GPIO_MUX2_IO29: 因此,在使用 CM4 时,可以为 GPIO8 配置 IRQ 99 的焊盘和中断;在使用 CM7 时,可以为 CM7_GPIO2 配置相同的焊盘和中断,IRQ 将继续为 IRQ 99 (CM7_GPIO2)。 如果您的项目基于 ipgio_input_interrupt_cm4,而不是 cm7,您将在 startup_mimxrt1176_cm4.c 中找到"GPIO7_8_9_10_11_IRQHandler()" 希望这能回答你的问题。 BR, Edwin.
查看全文
LPC1768 シリーズに代わる推奨マイクロコントローラ シリーズは何ですか? こんにちは、 LPC17xx シリーズの正確なピン交換を提案していただける方はいらっしゃいますか。 既存のデザインがあり、ハードウェアの変更が問題ですが、LPC2148 ペリフェラル (UART、I2C、タイマーなど) を使用するコードが大量 (トン単位) あります。どの新しいファミリがペリフェラルソフトウェアと互換性がありますか? 新しいデザインに推奨されるシリーズのうち、ほぼ同等の機能 (メモリ サイズ、速度、ペリフェラルなど) を備えているのはどれですか。 Re: What is the recommended microcontroller series that replaces the LPC1768 series? 私も同じ疑問を抱いています。もう5年近く経っているのに、そう思っています。 新しいデザインに使用するマイクロコントローラのシリーズはどれを検討すればよいでしょうか? Re: What is the recommended microcontroller series that replaces the LPC1768 series? ハイ LPC1768 は LPC2368 の代替品です。LPC1769 は LPC1768 の代替品です。唯一の違いは最大クロック周波数(120Mhz)です。メモリが少ない代替品としては LPC1766 があります。LPC4078 は LPC176x の代替品として選択肢となります。( http://www.nxp.com/products/microcontrollers/core/cortex_m4_m4f/LPC4078FBD100.html ) なお、LPC4078 の発売時期は 2013 年で、寿命は 15 年です。 弊社の推奨は、220MHzのCortex M4コア(オプションでセカンダリCortex M0+コア搭載)をベースにしたLPC546xxまたはLPC540xx MCUシリーズ、同様のペリフェラル、最大512KBのフラッシュ、最大200KBのRAMです。詳細については、次のリンクをご覧ください: https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/lpc-cortex-m-mcus/lpc54000-series-cortex-m4-mcus :MC_1414576688124 LPC546xxとLPC540xxはLPC17xxのピン互換品ではありません 良い1日を、 ジャン・ジュン
查看全文
CAAMとカーネル暗号テスト <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、皆さん。 LinuxのさまざまなバージョンやさまざまなボードでCAAMを有効にすると、いくつかの不安なエラーメッセージが表示されます。 カーネルの自己テスト。 SABRE-SD 3.10.31-alpha でのテスト root@imx6qsabresd:~# dmesg ... alg: ハッシュ: hmac-sha1-caam のテスト 1 が失敗しました 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010: f1 46 は 00 です alg: ハッシュ: sha1-caam のテスト 1 が失敗しました 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010: 9c d0 d8 9d alg: ハッシュ: hmac-sha224-caam のテスト 1 が失敗しました 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010: 47 b4 b1 16 99 12 ba 4f 53 68 4b 22 alg: ハッシュ: sha224-caam のテスト 1 が失敗しました 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010: 2a ad bc e4 bd a0 b3 f7 e3 6c 9d a7 root@imx6qsabresd:~# cat /proc/cmdline コンソール=ttymxc0,115200 ip=dhcp ルート=/dev/mmcblk0p2 rootwait caam カーネル構成は、いくつかのデバッグ フラグを追加した標準の v7_defconfig と基本的に同じです。 ~/linux-imx6$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- savedefconfig を作成します スクリプト/kconfig/conf --savedefconfig=defconfig Kconfig ~/linux-imx6$ diff defconfig arch/arm/configs/imx_v7_defconfig 253a254 > CONFIG_USB_PHY=y 329d329 < CONFIG_DEBUG_LOCK_ALLOC=y 334d333 < # CONFIG_CRYPTO_MANAGER_DISABLE_TESTSが設定されていません カーネル3.0.35_4.1.0でも同じ結果が出ていますおよび Nitrogen6x 上の 3.10.17-1.0.0-ga。 これについて何か知見をお持ちの方はいらっしゃいますか? よろしくお願いいたします。 エリック i.MX6_すべて Linux Re: CAAM and kernel crypto tests SecretCryptos は、匿名の暗号取引のためのワンストップ ソリューションです。暗号ミキサの使用や安全な取引所での取引をお考えの場合でも、SecretCryptos はすべての取引の完全なプライバシーと匿名性を保証します。 SecretCryptos 暗号ミキサと取引所 すべてのミキサページ(コインあたり) SecretCryptos 暗号ミキサー|ビットコイン (BTC) ミキサー|イーサリアム (ETH) ミキサー|テザー (USDT) ミキサー| USD コイン (USDC) ミキサー| BNB (BSC) ミキサー|ライトコイン (LTC) ミキサー|ドージコイン (DOGE) ミキサー| XRP (リップル) ミキサー|ソラナ (SOL) ミキサー| TRON (TRX) ミキサー| TON (トンコイン) ミキサー|ポリゴン (MATIC) ミキサー|アバランチ (AVAX) ミキサー|カルダノ (ADA) ミキサー|ポルカドット (DOT) ミキサー|柴犬 (SHIB) ミキサー インスタント暗号通貨取引 暗号通貨取引所 Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ありがとう、ジョン Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> この問題に対する適切な修正は、Herbert Xuのcrypto-2.6にあります。木。具体的には、 LKML: Herbert Xu: Crypto Fixes for 3.13およびLKML: Herbert Xu: Re: Crypto Fixes for 3.13 で問題が修正されます。3.10.xxにバックポートする必要がある Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Freescale の Steve Cornelius 氏と他の人々のおかげで、この問題はキャッシュの一貫性と関係があることを示すことができました。 特に、CAAM ドライバは、すべての入力と出力がキャッシュ ライン境界 (i.MX6 では 32 バイト) に揃えられることを想定しています。 testmgr コードは元々ソフトウェア実装をテストするために作成されたため、カーネル 3.10.17 時点では特定の配置が保証されず、それが障害の原因となっていましたが、これを解決するための簡単な更新によってエラーを防ぐことができます。 crypto testmgr: 結果バッファをキャッシュラインに合わせる · e3e7ad4 · boundarydevices/linux-imx6 · GitHub コミット ログに記載されているように、入力と出力のこの要件はユーザー空間コードにも存在するため、アプリケーションは割り当てに注意する必要があります。 Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> jamesboneさん、このCASEの最新情報はありますか? Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> まだ修正されていません。 Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> この問題は修正されましたか? それとも、解決策はただ遅延するだけですか? 私も同じ問題を抱えています。しかし、テストを成功させるには、遅延値を最大 100usec まで変更する必要があります。 それは大きな問題です。 Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> jamesboneさん、このCASEのフォローアップを続けてもらえますか? Re: Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> さらに詳しく: caam_jr_dequeue () の次の 2 つの場所のどちらにも同じ udelay(20) があっても、テストは成功しません。 Linux-imx6/ドライバ/crypto/caam/jr.c at boundary-imx_3.10.17_1.0.0_ga · boundarydevices/Linux-imx6 · GitHub Linux-imx6/ドライバ/crypto/caam/jr.c at boundary-imx_3.10.17_1.0.0_ga · boundarydevices/Linux-imx6 · GitHub Re: Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> これらのテストに関するさらに詳しい情報は… caam_jr_enqueue() の最後にある udelay(20) 呼び出しによりテストは成功します。SO、何らかのタイミング バグであると思われます。 ~/linux-imx6$ git diff diff --git a/ドライバ/crypto/caam/jr.c b/ドライバ/crypto/caam/jr.c インデックス 80ddddb..c8c4a7e 100644 --- a/ドライバ/crypto/caam/jr.c +++ b/ドライバ/crypto/caam/jr.c @@ -288,6 +288,7 @@ int caam_jr_enqueue(構造体デバイス *dev, u32 *desc, spin_unlock_bh(&jrp->inplock); + 遅延(20); 0を返します。 } EXPORT_SYMBOL(caam_jr_enqueue); Re: Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> さらなる更新: 3.10.17-1.0.0-ga でのその後の起動では、ゼロの 8 バイトだけが表示されます。 alg: ハッシュ: hmac-sha1-caam のテスト 1 が失敗しました 00000000: 00 00 00 00 00 00 00 00 e2 8b c0 b6 fb 37 8c 8e 00000010: f1 46 は 00 です alg: ハッシュ: sha1-caam のテスト 1 が失敗しました Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 追加メモ: テスト失敗時に表示される値: alg: ハッシュ: hmac-sha1-caam のテスト 1 が失敗しました 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010: f1 46 は 00 です 予想された結果と似ているように見えます。これは、crypto/testmgr.c の hmac-sha1 の最初のテスト ベクトルです。 静的構造体hash_testvec hmac_sha1_tv_template[] = {   { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", .ksize = 20, .plaintext = "こんにちは", .psize = 8, .ダイジェスト = "\xb6\x17\x31\x86\x55\x05\x72\x64" 「\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1」 「\x46\xbe」、 ... シーケンス「f1 46 be」が期待値と一致することに注意してください。 また、失敗した各テストの最初の 16 バイトがゼロとして表示されることにも注意してください。 Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、ジェイミー。 3.0.35_4.1.0でテストしていることに気づかなかったようです。3.10.17-1.0.0-ga、および 3.10.31_1.0.0-alpha。 それぞれに、他のページからのパッチがすでに含まれています。 dma_map_sg_chained へのパッチ: http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_3.0.35_4.0.0&id=b30237c79003223c6e8035d5be183cd4f0b469f9 3.10.17 ソース: https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.10.17_1.0.0_ga/drivers/crypto/caam/sg_sw_sec4.h#L96 driver_algs へのパッチ: http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_3.0.35_4.0.0&id=6068d7a77b2101c172fc2f003f90b1febbf99505 3.10.17 ソース: https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.10.17_1.0.0_ga/drivers/crypto/caam/caamalg.c#L2083 また、私たちが目にしている問題はハッシュ アルゴリズムにのみ関係するものであることを明確に説明していませんでした。 よろしくお願いいたします。 エリック Re: CAAM and kernel crypto tests <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 親愛なるエリックへ Linux 3.0.35の場合CAAMの適切な機能を得るには、いくつかのパッチが必要です。 Q&A: iMX6 の Linux で CAAM ドライバが機能しないのはなぜですか? すてきな一日を、 ハイメ ----------------------------------------------------------------------------------------------------------------------- 注: この投稿で質問が解決した場合は、「正解」ボタンをクリックしてください。ありがとう! -----------------------------------------------------------------------------------------------------------------------
查看全文
XGATE Question MC9S12XEP100. I would like to do some code experiments using XGATE, coding in absolute assembler. Is this even possible using Code Warrior 5.9.0 Special Edition Build 5294? Regards, Robert Hiebert Re: XGATE Question Hi Fast, Man, am I ever glad to hear from you!! I'm finding it pretty lonely in this world of programming the XEP100 in assembler, especially when you throw XGATE into the mix. The XEP100 can do everything I want and more. I don't speak "C", but I really like absolute assembler. The only reason I am trying relocatable is that, so far, it is the only way I can get XGATE to work. I've been spending a lot of time studying the manuals and all the app notes I can find to get clues on how I can accomplish my goals. It can be very frustrating when I get stuck, but oh so rewarding when something works. It is almost a full time job. It would be wonderful if you could find the time to help point me in the right direction. I'd like to be able to share my project with you. It is likely to get quite lengthy so If you want, we could continue this off forum and perhaps post positive results for use by others when they happen I'll try sending you a personal message so we can establish communication. Thanks so much for your interest. Regards, Robert  Re: XGATE Question I write solely in XGATE assembler. Perhaps I can help. I love the darn thing. Unclear why you might want to relocate code. You are unlikely to fill 32K with assembler, as no reason not have sub-routines. Code warrior might no be suited to task. Show a good o'l .asm file.  I cut my teeth with 6502 and 8080, 7 registers is luxury. Re: XGATE Question Well, despite my best efforts I have been unsuccessful in writing any XGATE code in absolute assembler. However, I have made some progress in writing one in relocatable assembler, which I am attaching. The next step is to take some code I have written in absolute assembler and try to convert it to relocatable and add XGATE to it. So far I'm not getting very far with that, but at least I do have some working XGATE code now. Thanks go to Ladislav for his assistance. Regards, Robert Re: XGATE Question Hi Ladislav, That is a large composition, and being written in "C" it is completely beyond me. I do have the AN 2734, HCS12X Family Memory Organization, but I don't see XGATE mentioned in there. Of course, the MC9S12XEP100RMV1 02/20/13 does include the XGATE memory map. I'll study them both some more and see if things become clearer to me. If I could, could we go back to a question I asked earlier in this thread, (7/21/25). I noticed in the reference manual at 10.9.2 there is the code example (Transmit "Hello World!" on SCI). That would indicate to me that it is possible to write code that utilizes XGATE in absolute assembler. But when I try to run the code on Code Warrior, it chokes and tells me that "CPU S12X" is not a hc12 instruction. What do I have to do to be able to run this code? Regards, Robert Re: XGATE Question Hi, Once upon a time, I sent you a memory map. You should now understand which core uses which addressing mode and how it accesses data and code. CPU runs on PPAGE_OFFSET, but data is usually read/written using GPAGE_offset to simplify access. XGATE can run from either flash or RAM. Before it can run from RAM, it must be copied from flash to the corresponding memory space. If you want XGATE to run from flash, you need to configure this during project creation-then no copying is required. What I suggest is always to introduce code in each module by correct memory placement… For example #pragma  CODE_SEG  DEFAULT #pragma  DATA_SEG  DEFAULT #pragma CODE_SEG XGATE_CODE_FLASH #pragma DATA_SEG SHARED_DATA #pragma DATA_SEG XGATE_DATA For the copying process (if used-I'm not going to check it), I would recommend using GLD/GST instructions to easily access the global memory space. As shown in the memory map, only part of the RAM is accessible for data using 16-bit addressing (from the CPU's perspective). To write to the part of RAM that is not visible via 16-bit addressing, you must use GPAGE or RPAGE addressing modes. However, when XGATE is running, it sees the entire RAM using 16-bit addressing. Of course, even if the code runs from flash, there can still be a copyToRam function that initializes variables for both the CPU and XGATE. I strongly suggest always using a simulator or debugger for testing to better understand the behavior. It's essential to test different addresses-meaning within the same address space but using different addressing modes-in the memory window to verify whether the same content is visible across them. Frankly, I am currently creating my hobby project at XDT512 and also have to debug a lot to be sure whether everything is where it is expected to be and result are as expected. Also warnings are important to read. I put display function to xgate a call them by swi from cpu. In order to avoid mistakes I always use integers as variables (xgate can make issue with arrays, structures because char is not good variable for it). I had also had to create conversion functions for pointers .. can be seen in conversion.c. As well as I used specific approach to init input parameters passing to xgate from cpu…you can see for example LCDcSetup(….), I call at CPU,  which fill specific structure which is then used by void LCDxSetup(tUI setup) after the data set is prepared in the module lcd_comman_wrappers.c and the xgate is launched by SWI after data preparing. Of course there could be some amount of shared data prepared and different approach used but this is the way I used to pass parameters to the xgate functions from cpu. I do not want to confuse or scare you. I want only to say the more combinations and expectation the more issues and more complex tasks to solve. After initial effort everything will be more easy and clear. Everything can be done easily or complex. I had LCD module for cpu and wanted to put it as easy as possible to xgate and I used this solution. It can be seen as useless because XGATE was intended to be used for small fast task. In this case I wanted to offoad cpu from long sending data tasks. Currently I also have some bugs in it but going step by step and this is what I suggest also to you. The S12X device are so simply that you can fully delete all files generated by compiler and simply load stack as a first instruction of you code and then to have everything under your control. Best regards, Ladislav Re: XGATE Question Hi Ladislav, Things have been too busy around here for me to spend much time on my project, but I am finally able to get back to it. I have been studying the code you sent, me as well as the example that I can create with Code Warrior. Essentially it is the Fibo Calculation program in relocatable assembler with XGATE added in RAM. I believe I have a pretty good understanding of how it works, but one thing puzzles me. When I step through the code and follow the registers and memory, the "CopyToRam" macro doesn't quite make sense to me. PPAGE is $FE, GPAGE is $7F and RPAGE is $F8. I expected the XGATE code in Flash to start at logical address $7F8000, and be copied to RAM  at logical address $F81100. But, in fact, the XGATE code starts at logical address $FE8000, and it copies quite nicely to the expected RAM address. What am I missing here? Regards, Robert  Re: XGATE Question Hi, a) The cleaned project is attached on original place. Older one was removed. There was no problem from functionality point of view also with older one just some things were accidentally added. Now it should be ok.  b) press right mouse button while pointer is on empty window, open source file, select xgate.dbg and break point into the PIT0_Handler. You can see after run it stops in xgate as well as in cpu  Best regards, Ladislav Re: XGATE Question Hi Ladislav, I am able to run your .asm code on my board if I switch to USBDM, but I get the following messages. They do not stop me from making or running the program: *************  The following access path in target "standard" of project "XP100-PIT_XGATE_SEMAPHORES-ASM-C52.mcp" cannot be found: (Project)..\XP100-PIT_XGATE_SEMAPHORES-ASM-C51 Could not find "XP100-PIT_XGATE_SEMAPHORES-ASM-C51.mcp" in target "Standard"  ******** I am able to set break points and step through source code in the source1 window. I would like to set break points and step through the XGATE code, but it doesn't appear in the source2 window. Is there a setting I am missing to be able t do this? Regards, Robert  Re: XGATE Question Hi Ladislav, Your help is much appreciated, thanks very much. I would code in "C" if I could, but I don't speak the language. I have tried to learn it by myself, but it is way too obscure for me. I like assembler because I can observe the registers and memory with the debugger. It makes sense to me. My programs aren't huge, and I'm the only one creating them. That's why I prefer absolute assembler. Anyway, I will study your attachments and see what I can do with them. Again, many thanks. Regards, Robert Re: XGATE Question Hi, OK, another example I created now (based on c project, disassembled and ported to the asm project), just to know whether I have not forgotten. …not RTI but two PITs generate periods. One at CPU (PIT1) and another one at XGATE (PIT0). Both modules use a shared 8bit variable XGATE_diodes which is modified in PIT interrupts and access to this variable is controlled by semaphores. It shows you, I think everything. I have also used different addressing styles .. once with register definition and once with direct number…just an example. ..as I expressed myself many times....in this case I would not us asm programming at xgate. much simpler is C coding which also automatically solves many issues you can hit. Boht projects ASM and C are attached. Best regards, Ladislav Re: XGATE Question Hi Ladislav, I had taken a couple of days to study the code in depth, step through it, and note the states of the relevant registers and variables at each step. I determined that the variable  XGATE_Counter is located at address $2100:2101, variable Counter is at address $2102:2103 and variable FiboRes it at address $2104:2105. I followed your instructions to step through the XGATE code and watched the RAM memory. Then it dawned on me that I didn't fully understand how this code is supposed to work. I assumed that XGATE was used to update Counter, but that doesn't appear to be the case. All it does is increment XGATE_Counter, which has nothing to do with calculating the Fibonacci number. Assuming this is correct, it has been quite a learning experience, but I'm still stumped on how I can use XGATE. I would like to start by using it in a short routine using RTI to establish some time rates and set some flags so the program can use them in the main loop for different routines. Is there some example code available that might help me get closer to this goal? Thanks, Regards, Robert Re: XGATE Question Hi, The SWI is only enabled in the example so I suggest you to set breakpoint And select XGATE window (see in the picture it is darker blue) then press run. Each time the interrupt is finished and when it goes to the interrupt machine it is evaluated as a pending interrupt so it is launched again. …. And able to see all changes … after few steps …. Only to show small example of different approach  … I am currently playing (hobby activity ) with moving LCD driver to XGATE…but in C. I use SW trigger to launch service routine for LCD like this… for example… I have definition..  #define SET_SW_TRIG_LCD     XGSWT=(0x0101 << SWI_LCD)   // SWI_LCD is 0 … SWI_0 is selected  #define REL_SW_TRIG_LCD     XGSWT=(0x0100 << SWI_LCD) Then I have HD44780.c which prepares shared data and launches LCD service routine by SWI. tUC LCDcOutTextLC(tUC line, tUC col, tSC *str) {     if(LCD_IS_BUSY) return C_LCD_IS_BUSY;     xgateCmdBlock.func_id = LCD_OUT_TEXT_LC;     xgateCmdBlock.params.lineColText.line = line;     xgateCmdBlock.params.lineColText.col = col;     xgateCmdBlock.params.lineColText.str = str;     SET_SW_TRIG_LCD;                                       <<<<<<<<<<<<<<<< here I start  LCD service } … and in the xgate.cxgate I release it to be prepared for next action …. The XGSWT value is also used as a flag for LCD busy interrupt void SoftwareTrigger0_Handler(void) {   LCDxCommandExecution();   REL_SW_TRIG_LCD;                             // release SW trigger 0 } The code is translated as follows…  ( XGSWT = (0x0100 << 0) ; )    12:    REL_SW_TRIG_LCD;                             // release SW trigger 0   0008 f200             LDL        R2,#0   000a aa01             ORH        R2,#1   000c f300             LDL        R3,#%XGATE_8(_XGSWT)   000e ab00             ORH        R3,#%XGATE_8_H(_XGSWT)   0010 5a60             STW        R2,(R3,#0) Best regards, Ladislav Re: XGATE Question I'm not getting very far with this. I created the new sample project with relocatable assembler and XGATE as you suggested. When I run it and stop it again, I can see that the counter has been updated as well as the Fibo result. When stopped I can see that XGATE R1, R2, R7, PC, MCTL, CHIP and VBR have changed, or at least some have. When I step through the main.asm code I can follow it along and see the numbers and registers update, but at no point do I see where it runs the XGATE code. It looks like all the XGATE code does is update the counter when the software interrupt is triggered, but I don't see what initiates that software interrupt for XGATE. Re: XGATE Question Hi Ladislav, Yes, I have that tried it but with no success. Perhaps I was just transferring too much of my code at once. I'll try it again and go real slow. Thanks. Regards, Robert Re: XGATE Question Hi, have you tried to create a new project which crates a default structure with sw trigger example. It also presents shared variables processing (not semaphores). When you have this you can extend it with your code. But, I suggest to go step by step and review everything.  Best regards, Ladislav Re: XGATE Question Hi Ladislav, I have been studying the XGATE Assembler Manual .PDF, found where you indicated it would be, but I'm afraid the explanations there are not clear to me.  Reading through the MC9S12XEP100RMV1 manual, (again and again), I did come across something that indicated to me that writing code for the S12X CPU and XGATE in absolute assembler is possible. It is in Section 10.9.2 of the manual and is entitled Code Example (Transmits "Hello World" on SCI). However, when I tried to run it with Code Warrior it choked right away. The first error was that "CPU S12X" was not a hc12 instruction or directive. What do I have to do to run this program?   Re: XGATE Question Thanks Ladislav. I'll see if I can find my answer there. Regards, Robert Re: XGATE Question Hi, I do not know any person working in absolute assembly especially with XGATE. There is possibility to create a relocatable assembly project with multicore (CPU+XGATE). Some info ca be found in the installation folder of the CW - file Assembler_XGATE.pdf... for example in my PC .. c:\Program Files (x86)\Freescale\CWS12v5.2\Help\pdf\ Best regards, Ladislav
查看全文
Error in OpenToolbox_Callback When Verifying MBDT Installation I'm encountering an error when using the "Verify MBD Toolbox Installation" button in the NXP Support Package for S32K3 (v1.6.0) on MATLAB R2024b. Here’s the error trace: >> NXP_Support_Package_S32K3 Error using contains First argument must be text. Error in NXP_Support_Package_S32K3/OpenToolbox_Callback (line 250) result(i) = contains(toolboxes(i).Name, 'NXP_MBDToolbox_S32K3'); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error in appdesigner.internal.service.AppManagementService/executeCallback (line 165) callback(appOrUserComponent, event); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error in matlab.apps.AppBase>@(source,event)executeCallback(ams,app,callback,requiresEventData,event) (line 60) newCallback = @(source, event)executeCallback(ams, ... ^^^^^^^^^^^^^^^^^^^^^^^^ Error in matlab.ui.internal.controller.uicontrol.UicontrolRedirectStrategy/executeCallback (line 203) feval(callback{1}, src, event, callback{2:end}); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error in matlab.ui.internal.controller.uicontrol.PushButtonRedirectStrategy/handleCallbackFired (line 13) executeCallback(obj, src, event); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error in matlab.ui.internal.controller.uicontrol.PushButtonRedirectStrategy>@(varargin)obj.handleCallbackFired(varargin{:}) (line 19) component.ButtonPushedFcn = @obj.handleCallbackFired; ^^^^^^^^^^^^^^^^^^^^^^^ Error using appdesservices.internal.interfaces.model.AbstractModel/executeUserCallback (line 282) Error while evaluating Button PrivateButtonPushedFcn. I did confirm manually if the toolbox is installed: >> disp(matlab.addons.installedAddons) Name Version Enabled Identifier ___________________________ _______ _______ ______________________________________ "NXP_Support_Package_S32K3" "1.6.0" true "7addb8fc-087e-4490-b128-67745df27cab" "MATLAB Coder" "24.2" true "ME" "Simulink" "24.2" true "SL" "Simulink Coder" "24.2" true "RT" "NXP_MBDToolbox_S32K3" "1.6.0" true "7ac8b4ba-7b61-44b0-a91d-5925288823f8" "AUTOSAR Blockset" "24.2" true "AS" "Stateflow" "24.2" true "SF" "Embedded Coder" "24.2" true "EC" Re: Error in OpenToolbox_Callback When Verifying MBDT Installation Hi, @as2025, @Akil_Visai, @yr1205, @AlexCloutierDyname,  We have recently released a new version of the toolbox (Model-Based Design Toolbox for S32K3 version 1.7.0). You may upgrade to this version and try reinstalling the toolbox using the Support Package installer. Please note once again that the toolbox can also be installed without using the Support Package utility—simply by dragging and dropping the .mltbx file. This method allows you to use the toolbox without encountering the verification issues experienced previously. Please let us know about the progress. Best regards, Dragos Re: Error in OpenToolbox_Callback When Verifying MBDT Installation This error occurs because of longer installation path. Go to settings->Add-ons on MATLAB home page and select a shorter installation path.  Note: before reinstalling the add-ons. go to the default add-ons folder and delete the nxp s32k3xx or s32k1xx support packages folder, otherwise you might face another error which states delete previous version of nxp package. therefore, you might not be able to verify the installation and activate license Re: Error in OpenToolbox_Callback When Verifying MBDT Installation Use shorter installation path. Go to settings->Add-ons on MATLAB home page and choose a smaller path for installation. i had the same issue, its now resolves. Currently i am using MATLAB 2025a version Note: Before doing this uninstall the nxp ad ons and go to the default matlab toolbox folder and delete the nxp support folder of s32k3xx or s32k1xx, then choose new shorter location for installation (these things should be done manually) otherwise while installation you will get the message that uninstall or delete previously installed nxp toolbox Re: Error in OpenToolbox_Callback When Verifying MBDT Installation Having the same issue,still cant install the toolbox. i tried changing the callback function and got a error message showing toolbox not found on path but it is actually available in the path it is mentioned. Re: Error in OpenToolbox_Callback When Verifying MBDT Installation Hi, Is there a work around for this? I tried installing the version 1.6.0 few times and i am not able to navigate the issue Regards, yr1205 Re: Error in OpenToolbox_Callback When Verifying MBDT Installation Hello @as2025, I just had the same problem with the 1.5.0 version.  In NXP_Support_Package_S32K3xx.m, replace these lines :  result(i) = contains(toolboxes(i).Name, 'NXP_MBDToolbox_S32K3xx');   with:  if isempty(toolboxes(i).Name) else result(i) = contains(toolboxes(i).Name, 'NXP_MBDToolbox_S32K3xx'); end   In my case, it seems like the toolboxes variable had an empty member, which caused the error.  Your toolbox list seems to have this too (notice the empty space before the first toolbox in the list). You need to do this replacement three times in the .m. Hope this helps, Alex   Re: Error in OpenToolbox_Callback When Verifying MBDT Installation @dragostoma I get a similar issue when trying to activate the NXP MBD Toolbox: Error using contains First argument must be text. Error in NXP_Support_Package_S32K3/ActivateLicense_Callback (line 320) result(i) = contains(toolboxes(i).Name, 'NXP_MBDToolbox_S32K3'); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error in appdesigner.internal.service.AppManagementService/executeCallback (line 165) callback(appOrUserComponent, event); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error in matlab.apps.AppBase>@(source,event)executeCallback(ams,app,callback,requiresEventData,event) (line 60) newCallback = @(source, event)executeCallback(ams, ... ^^^^^^^^^^^^^^^^^^^^^^^^ Error in matlab.ui.internal.controller.uicontrol.UicontrolRedirectStrategy/executeCallback (line 203) feval(callback{1}, src, event, callback{2:end}); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error in matlab.ui.internal.controller.uicontrol.PushButtonRedirectStrategy/handleCallbackFired (line 13) executeCallback(obj, src, event); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error in matlab.ui.internal.controller.uicontrol.PushButtonRedirectStrategy>@(varargin)obj.handleCallbackFired(varargin{:}) (line 19) component.ButtonPushedFcn = @obj.handleCallbackFired; ^^^^^^^^^^^^^^^^^^^^^^^ Error using appdesservices.internal.interfaces.model.AbstractModel/executeUserCallback (line 282) Error while evaluating Button PrivateButtonPushedFcn. >> And so this causes an error in verifying the MBDT License: Since the issue seemed to do with activation of the toolbox, I haven't tried actually using the toolbox. I can try that and update you on it. Thank you! Re: Error in OpenToolbox_Callback When Verifying MBDT Installation Hi, @as2025, Thank you for your interest into Model-Based Design Toolbox for S32K3. Besides the error that occurs during the toolbox installation verification, have you tried activating the license and using the toolbox? We will attempt to reproduce the issue you encountered, but please try using the toolbox itself to see if there are any problems there or if the installation validation is simply incorrect. Let us know about the progress, Dragos
查看全文
How does AI differ from human intelligence? Brolly Academy offers a wide range of trending IT courses designed to provide students with valuable skills and 100% placement assistance. Here are 50 trending IT courses that you can explore at Brolly Academy we are providing best generateai training in hyderabad Re: How does AI differ from human intelligence? Interesting discussion! AI’s strength lies in processing large amounts of data quickly, while human intelligence adds intuition, emotion, and contextual understanding. Both have unique capabilities, and combining them often leads to the most effective solutions. Great topic to explore! https://vignesh156.aiskills.in/   Re: How does AI differ from human intelligence? “Insightful discussion! AI is great at data processing and pattern recognition, but human intelligence still leads with creativity, empathy, and ethical judgment. Combining both strengths is where the real power lies.”       Re: How does AI differ from human intelligence? Welcome to Brollyai, your trusted partner in mastering the future of technology Established in 2021, Brollyai was born out of a vision to bridge the gap between aspiring tech enthusiasts and the rapidly evolving world of artificial intelligence. We are dedicated to  providing top-notch education and hands-on training in the most cutting-edge areas of AI. Our team boasts a wealth of knowledge, with 15 years of collective experience in the industry. Our seasoned faculty members bring a deep understanding of the latest advancements in technology, ensuring that our students receive the highest quality education and training. What We Offer At Brollyai, we specialize in: Generative AI: Dive into the world of creative AI applications, from image generation to advanced natural language processing. Prompt Engineering: Learn the art and science of designing effective prompts to harness the full potential of AI models. Machine Learning: Gain a comprehensive understanding of machine learning techniques, from foundational concepts to advanced algorithms.  we are providing best generateai training in hyderabad Re: How does AI differ from human intelligence? Speed & Processing Power – AI can analyze massive datasets in seconds, whereas humans take much longer. Pattern Recognition – AI excels at detecting patterns in data that might be too complex for humans to recognize. Decision-Making – Humans use reasoning and intuition, while AI relies on algorithms and statistical models. Adaptability – AI improves with more data (machine learning), but humans can apply creativity and context to new problems. Error Handling – AI can reduce human errors but may struggle with ambiguous or incomplete data that humans can interpret better. In data analytics , AI enhances efficiency, but human intelligence is essential for strategic thinking and decision-making Re: How does AI differ from human intelligence? AI and human intelligence are quite different! Humans learn from experiences and emotions, allowing for creativity and intuition. In contrast, AI relies on data and algorithms, making it great at specific tasks but less flexible in new situations. While we can navigate complex social dynamics and have self-awareness, AI doesn’t truly understand or feel. https://generativeaimasters.in/prompt-engineering-course-in-hyderabad/">prompt engineering course in hyderabad
查看全文
IMX93QSB 的 Flexspi_nor_polling_transfer SDK 示例中的供应商 ID 问题 大家好 我使用适用于 VSCode 的 MCUXpresso 来测试类似 imx93-qsb 的定制板的外围设备。从 SDK 项目 " flexspi_nor_polling_transfer " 开始,我想测试或非闪存 MT25QU01GBBB8E12 的功能,它与示例中使用的芯片非常相似:MT25QU512ABB。 当谈到函数 flexspi_nor_get_vendor_id 时,它给出 0xFF 而不是 0x20,然后它会成功完成最后一次操作。         我使用的是与示例相同的 SPI 外设(SD3 焊盘上的 flexSPI1),我不明白为什么我没有正确读取 ID 供应商。谁能帮帮我? Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB 值得一提的是,在扩展 SPI 模式下使用 IS25WX256 时,读 ID 命令 0x9E 也有问题。命令格式为 "FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x9e, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 4),"。每次使用时,我都会读到 `0x888cadce`。 Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB 你好@AldoG、 我试着在 flexspi_nor_get_vendor_id 功能中加入一些 PRINTF 命令,以了解 vendorID 值是怎么回事。 输出结果是这样的 我还尝试将 flashXfer.seqIndex 改为 4 *NOR_CMD_LUT_SEQ_IDX_READID,结果输出发生了变化: 我不知道在功能内部反复推敲是否会有帮助。也许问题出在 seqIndex 值本身。请告诉我您的想法。 此致, 鲍勃 Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB 您好, ,我发现您使用的正是原样,而不是我建议添加的内容。 我不认为是内存工作不正常,而是获取 ID 的 LUT 命令工作不正常,所以我才提到是否有可能检查发送是否正确。 致以最崇高的敬意/问候, Aldo。 Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB 你好 我很确定闪存运行良好,因为我已经能够使用这个 UUU 命令放置针对 或非-flash 的引导加载程序: uuu.exe-b qspi imx-启动-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot 在 FlexSPI Serial NOR 中设置启动配置,我可以看到引导加载程序运行正常。但我还是不明白,为什么在 MCUXpresso 的 VScode 中使用该项目会出现问题。 如果您能帮助我,请告诉我,我也需要使用 iMX93 的 M33 内核。 谢谢! 鲍勃 Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB 您好, 感谢您的分享,我会仔细检查的。 同时,您有办法检查硬件上的信号吗? 致以最崇高的敬意/问候, Aldo。 Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB 你好,阿尔多、 谢谢你帮我。遗憾的是,对 LUT 的更改并不能解决问题,我仍然在 Vendor ID 上读取到 0xff 的值。我与大家分享整个 C 代码: /* * 版权所有 (c) 2016,飞思卡尔半导体有限公司 * 2016-2018 恩智浦版权所有 * 保留所有权利。 * * * SPDX 许可证标识符:BSD-3 条款 */ #include "pin_mux.h" #include "clock_config.h" #include " board.h " #include "fsl_debug_console.h" #include "fsl_rgpio.h" #include "fsl_lpi2c.h" #include "fsl_iomuxc.h" #include "fsl_lpi2c.c" #include "fsl_flexspi.h" #include "app.h" #include "fsl_debug_console.h" #include "fsl_cache.h" #include "pin_mux.h" #include "clock_config.h" #include " board.h " #include "fsl_common.h" /******************************************************************************* * 定义 ******************************************************************************/ /******************************************************************************* * 原型 ******************************************************************************/ /******************************************************************************* * 变量 ******************************************************************************/ /* 程序数据缓冲区应以 4 字节对齐,这样可以避免总线故障,因为此内存区域配置为 MPU 的设备内存。*/ SDK_ALIGN(静态 uint8_t s_nor_program_buffer[256], 4); 静态 uint8_t s_nor_read_buffer[256]; 外部 status_t flexspi_nor_flash_erase_sector(FLEXSPI_Type *基, uint32_t 地址); 外部 status_t flexspi_nor_flash_page_program(FLEXSPI_Type *基, uint32_t dstAddr, 常数 uint32_t *src); 外部 status_t flexspi_nor_get_vendor_id(FLEXSPI_Type *基础, uint8_t *vendorId); 外部 status_t flexspi_nor_enable_quad_mode(FLEXSPI_Type *基); 外部 status_t flexspi_nor_erase_chip(FLEXSPI_Type *基); 外部 void flexspi_nor_flash_init(FLEXSPI_Type *基); /******************************************************************************* * 代码 ******************************************************************************/ flexspi_device_config_t deviceconfig ={ .flexspiRootClk = 12000000, //12 MHz, ok per noi .闪存大小 = 闪存大小, .CSIntervalUnit = kFLEXSPI_CsIntervalUnit1SckCycle, .CSInterval = 2, .CSHoldTime = 3, .CSSetupTime = 3, .数据验证时间 = 0, .列空间 = 0, .启用 WordAddress = 0, .AWRSeqIndex = 0, .AWRSeqNumber = 0, .ARDSeqIndex = nor_cmd_lut_seq_idx_read, .ARDSeqNumber = 1, .AHBWriteWaitUnit = kFLEXSPI_AhbWriteWaitUnit2AhbCycle, .AHBWriteWaitInterval = 0, }; const uint32_t customLUT[自定义长度] ={ /* 快速读取四通道模式 -SDR */ [4 * nor_cmd_lut_seq_idx_read + 0] = flexspi_lut_seq(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0xEB, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_4PAD, 0x18), [4 * nor_cmd_lut_seq_idx_read + 1] = flexspi_lut_seq( kFLEXSPI_Command_DUMMY_SDR, kFLEXSPI_4PAD, 0x0A, kFLEXSPI_Command_READ_SDR, kFLEXSPI_4PAD, 0x04), /* 读取状态寄存器 */ [4 * nor_cmd_lut_seq_idx_readstatusreg] = flexspi_lut_seq(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0xB5, kFLEXSPI_Command_DUMMY_SDR, kFLEXSPI_4PAD, 0x0), [4 * nor_cmd_lut_seq_idx_readstatusreg + 1] = flexspi_lut_seq(kFLEXSPI_Command_READ_SDR, kFLEXSPI_4PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x0), /* 读取 ID */ [4 * nor_cmd_lut_seq_idx_readid] = flexspi_lut_seq(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x9E, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 0x04),// modifica mia da 0x9F A 0X9E /* 写入启用 4 焊盘 */ [4 * nor_cmd_lut_seq_idx_writeenable_opi] = flexspi_lut_seq(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0x06, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00), /* 启用写入功能 */ [4 * nor_cmd_lut_seq_idx_writeenable] = flexspi_lut_seq(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0x06, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0), /* 擦除扇区 */ [4 * nor_cmd_lut_seq_idx_erasesector] = flexspi_lut_seq(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0x20, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_4PAD, 0x18), /* 程序 */ [4 * nor_cmd_lut_seq_idx_pageprogram_quad] = flexspi_lut_seq(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0x32, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_4PAD, 0x18), [4 * nor_cmd_lut_seq_idx_pageprogram_quad + 1] = flexspi_lut_seq(kFLEXSPI_Command_WRITE_SDR, kFLEXSPI_4PAD, 0x01, kFLEXSPI_Command_STOP, kFLEXSPI_4PAD, 0), /* 进入四重模式 */ [4 * nor_cmd_lut_seq_idx_enablequad] = flexspi_lut_seq(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x35, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00), /* 虚拟写入,当 AHB 写入命令触发时,不执行任何操作。*/ [4 * nor_cmd_lut_seq_idx_write] = flexspi_lut_seq(kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x0, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x0), /* 使用 Qual SDR 读取功能读取状态寄存器 */ [4 * nor_cmd_lut_seq_idx_readstatus_opi] = flexspi_lut_seq(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0x05, kFLEXSPI_Command_READ_SDR, kFLEXSPI_4PAD, 0x02), }; int main(void) { uint32_t i = 0; status_t 状态; uint8_t 供应商 ID = 0; pcal6524_handle_t 句柄; /* 关闭 clang-format */ const clock_root_config_t lpi2cClkCfg ={ .时钟关闭 = false, .mux = 0,// 24MHz 振荡源 .分隔 = 1 }; /* clang-format on */ BOARD_ConfigMPU(); BOARD_InitBootPins(); BOARD_BootClockRUN(); BOARD_InitDebugConsole(); CLOCK_SetRootClock(BOARD_PCAL6524_I2C_CLOCK_ROOT, &lpi2cClkCfg); CLOCK_EnableClock(BOARD_PCAL6524_I2C_CLOCK_GATE); /* 为 M.2 或非闪存卡设置 3.3V */ BOARD_InitPCAL6524(&句柄); PCAL6524_SetDirection(&处理, (1 << BOARD_PCAL6524_EXT1_PWREN), kPCAL6524_Output); PCAL6524_SetPins(&处理, (1 << BOARD_PCAL6524_EXT1_PWREN)); flexspi_nor_flash_init(example_flexspi); PRINTF("\r\nFLEXSPI 示例启动!\r\n"); /* 获取供应商 ID。*/ 状态 = flexspi_nor_get_vendor_id(示例, &vendorID); 如果(status != kStatus_Success)     { 返回 状态;    } PRINTF("供应商 ID: 0x%x\("......")", vendorID); #if !(定义(xip_external_flash)) /* 擦除整个芯片 .*/ PRINTF("通过 FlexSPI 擦除整个芯片...\r\n"); 状态 = flexspi_nor_erase_chip(example_flexspi); 如果状态 !=kStatus_Success)     { 返回状态    } PRINTF("擦除完毕\r\n"); #endif /* 进入四重模式。*/ 状态 = flexspi_nor_enable_quad_mode(example_flexspi); 如果(status != kStatus_Success)     { 返回 状态;    } /* 擦除扇区。*/ PRINTF (" 通过 FlexSpi 擦除序列号 或非...\ r\n "); 状态 = flexspi_nor_flash_erase_sector(示例, 示例 * SECTOR_SIZE); 如果(status != kStatus_Success)     { PRINTF("擦除扇区失败 !\)"); 返回 -1;    } memset(s_nor_program_buffer, 0xFFU, ((s_nor_program_buffer)); DCACHE_InvalidateByRange(example_flexspi_amba_base + 示例 * ()()()()()(, flash_page_size); memcpy(s_nor_read_buffer, (void *)(example_flexspi_amba_base + 示例 * SECTOR_SIZE), ((s_nor_read_buffer)); 如果(memcmp(s_nor_program_buffer, s_nor_read_buffer, ((s_nor_program_buffer)))     { PRINTF("Erase data - read out data value incorrect !\r\n "); 返回 -1;    } 不然     { PRINTF("Erase data - successfully. \r\n");    } 为(i = 0; i < 0xFFU; i++)     { s_nor_program_buffer[i] = i;    } 状态 = flexspi_nor_flash_page_program(示例, 示例 * SECTOR_SIZE, (空格 *)s_nor_program_buffer); 如果(status != kStatus_Success)     { PRINTF("页面程序失败 !\r\n"); 返回 -1;    } DCACHE_InvalidateByRange(example_flexspi_amba_base + 示例 * ()()()()()(, flash_page_size); memcpy(s_nor_read_buffer, (void *)(example_flexspi_amba_base + 示例 * SECTOR_SIZE), ((s_nor_read_buffer)); 如果(memcmp(s_nor_read_buffer, s_nor_program_buffer, ((s_nor_program_buffer)) != 0)     { PRINTF("程序数据 - 读出数据值不正确 !\r\n "); 返回 -1;    } 不然     { PRINTF("程序数据 - 成功。 \r\n");    } 状态 = flexspi_nor_get_vendor_id(示例, &vendorID); 如果(status != kStatus_Success)     { 返回 状态;    } PRINTF("供应商 ID: 0x%x\("......")", vendorID); PRINTF("状态: %d\,......。", status); 虽然(1)     {    } } Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB 您好, 感谢您的测试,那么很可能是在执行 READ ID 时 LUT 序列不正确,请尝试对 LUT 进行以下更改: /* 读 ID */ [4 * NOR_CMD_LUT_SEQ_IDX_READID] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD,0x9E, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 0x04), 请尝试并告知我结果。 致以最崇高的敬意/问候, Aldo。 Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB 是的,我按照您的建议添加了这段代码: 遗憾的是,正如你所看到的,一切都没有改变: @AldoG你有其他想法吗? 谢谢! 鲍勃 Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB 您好, hw 上的一切看起来都很好,您能否尝试在数据编程后添加读取供应商 ID 的功能? 致以最崇高的敬意/问候, Aldo。 Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB 你好,阿尔多、 感谢您的回复。这些是连接 Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB 你好, 这可能是由于没有正确处理SPI内存上的RESET信号造成的,你能分享一下你是如何连接内存的吗? 如果您能提供一个小的原理图,那将会非常有帮助。 致以最崇高的敬意/问候, Aldo。
查看全文
XGATE 问题 MC9S12XEP100。我想使用 XGATE 做一些代码实验,用绝对汇编程序编码。使用 Code Warrior 5.9.0 特别版 版本 5294 甚至有可能做到这一点吗? 此致, 罗伯特-希伯特 Re: XGATE Question 嗨,快、 听到你的声音我真是太高兴了 我发现在这个用汇编程序为 XEP100 编程的世界里非常孤独,尤其是当你把 XGATE 加入其中的时候。XEP100 可以实现我想要的一切,甚至更多。我不会说"C" ,但我非常喜欢绝对汇编程序。我尝试重新定位的唯一原因是,到目前为止,这是我能让 XGATE 正常工作的唯一方法。 我一直在花大量时间研究手册和我能找到的所有应用程序说明,以获得如何实现目标的线索。当我遇到困难时,我会感到非常沮丧,但当事情成功时,我又会感到非常有成就感。这几乎是一份全职工作。 如果您能抽出时间帮我指明方向,那就太好了。我希望能与你们分享我的项目。如果您愿意,我们可以在论坛外继续讨论,或许可以将积极的结果公布出来,供其他人使用。 我会试着给你发一条私人信息,这样我们就能建立联系了。 非常感谢您的关注。 此致, 罗伯特 Re: XGATE Question 我只用 XGATE 汇编语言编写。也许我能帮上忙。我喜欢这该死的东西。不清楚为什么要重新定位代码。你不可能用汇编程序填满 32K,因为没有理由不使用子程序。代码战士可能不适合执行任务。显示一个好的 .asm锉刀 我使用的是 6502 和 8080,7 个寄存器太奢侈了。 Re: XGATE Question 尽管我已经尽了最大努力,但仍无法用绝对汇编程序编写任何 XGATE 代码。不过,我在用可重置汇编程序编写一个程序方面取得了一些进展,现附上该程序。 下一步是将我用绝对汇编程序编写的一些代码尝试转换为可重置代码,并添加 XGATE。到目前为止,我还没有取得很大进展,但至少我现在有了一些可以工作的 XGATE 代码。 感谢拉迪斯拉夫的协助。 此致, 罗伯特 Re: XGATE Question 你好,拉迪斯拉夫 这是一篇大作文,而且是用"C" 写成的,我完全无法理解。 我确实有 AN 2734,HCS12X 系列 Memory Organization,但我看不出里面提到 XGATE。当然,MC9S12XEP100RMV1 02/20/13 确实包含 XGATE 内存映射。我会再研究一下这两本书,看看是否有更清晰的认识。 如果可以的话,我们能否回到我早些时候(7/21/25)在这个主题中提出的一个问题。我注意到在 10.9.2 版本的参考手册中有代码示例(Transmit " Hello World!" 在 SCI 上)。这向我表明,可以用绝对汇编程序编写使用 XGATE 的代码。但是,当我尝试在 Code Warrior 上运行代码时,它却卡住了,并告诉我"CPU S12X" 不是 hc12 指令。 要运行这段代码,我需要做些什么? 此致, 罗伯特 Re: XGATE Question 您好, 很久以前,我给你寄过一张记忆地图。现在您应该了解哪个内核使用哪种寻址模式,以及如何访问数据和代码。 CPU 在 PPAGE_OFFSET 上运行,但通常使用 GPAGE_offset 读/写数据,以简化访问。 XGATE 可通过闪存或 RAM 运行。在从 RAM 运行之前,必须将其从闪存复制到相应的内存空间。如果希望 XGATE 从闪存运行,则需要在创建项目时进行配置,然后就不需要复制了。 我的建议是,始终通过正确的内存位置在每个模块中引入代码... 例如 #pragma CODE_SEG DEFAULT #pragma DATA_SEG DEFAULT #pragma CODE_SEG XGATE_CODE_FLASH #pragma DATA_SEG SHARED_DATA #pragma DATA_SEG XGATE_DATA 对于复制过程(如果使用--我不打算检查),我建议使用 GLD/GST 指令,以便轻松访问全局内存空间。如内存映射图所示,使用 16 位寻址(从 CPU 的角度看),只有部分 RAM 可以访问数据。要写入通过 16 位寻址不可见的 RAM 部分,必须使用 GPAGE 或 RPAGE 寻址模式。但是,当 XGATE 运行时,它会使用 16 位寻址查看整个 RAM。 当然,即使代码从闪存中运行,仍可以使用 copyToRam 函数来初始化 CPU 和 XGATE 的变量。 我强烈建议始终使用模拟器或调试器进行测试,以便更好地了解行为。必须测试内存窗口中的不同地址,即在同一地址空间内但使用不同寻址模式的地址,以验证它们之间是否可见相同的内容。 坦率地说,我目前正在 XDT512 上创建自己的业余项目,也需要进行大量调试,以确保一切都符合预期,结果也符合预期。此外,警告也是必须阅读的内容。我把显示功能放到了 xgate 中,由 CPU 通过 swi 调用它们。为了避免出错,我总是使用整数作为变量(xgate 会给数组和结构带来问题,因为 char 不是很好的变量)。我还必须为指针创建转换函数......可参见 conversion.c。而且我还使用了特定的方法来初始化从 cpu 传递给 xgate 的输入参数... 例如,你可以看到 lcdcSetup (...。),我调用 CPU,它填充了特定的结构,然后在 lcd_command_wrappers.c 模块中准备好数据集之后,void lcdxSetup(TuI 设置)使用该结构,然后在数据准备好后由 SWI 用上市 xgate。当然,也可能需要准备一定量的共享数据并采用不同的方法,但这就是我从 CPU 向 xgate 函数传递参数的方法。 我不想混淆或吓唬你们。我只想说,组合越多,期望越高,需要解决的问题就越多,任务就越复杂。经过最初的努力,一切都会变得更加容易和清晰。一切都可以变得简单或复杂。我有一个用于 CPU 的 LCD 模块,想尽可能方便地将它与 xgate 连接,于是就用了这个解决方案。这可以说是毫无用处的,因为 XGATE 的目的是用于小型快速任务。在这种情况下,我想把 CPU 从长时间发送数据的任务中解脱出来。 目前,我也遇到了一些问题,但我会一步步解决,这也是我对你们的建议。 S12X 设备非常简单,你可以完全删除编译器生成的所有文件,只需将堆栈作为代码的第一条指令加载即可,然后一切都在你的控制之下。 顺祝商祺! 拉吉斯拉夫 Re: XGATE Question 你好,拉迪斯拉夫 最近这里的事情太忙了,我没有太多时间花在我的项目上,但我终于可以重新开始了。我一直在研究你发给我的代码,以及我可以用 Code Warrior 创建的示例。从本质上讲,它是在 RAM 中添加了 XGATE 的可重置汇编程序 Fibo 计算程序。 我相信我已经很好地理解了它的工作原理,但有一件事让我很困惑。 当我逐步浏览代码并关注寄存器和内存时," CopyToram " 宏对我来说不太有感知。PPAGE 为 $FE,GPAGE 为 $7F,RPAGE 为 $F8。 我希望闪存中的 XGATE 代码从逻辑地址 $7F8000 开始,然后复制到逻辑地址 $F81100 的 RAM 中。但事实上,XGATE 代码是从逻辑地址 $FE8000 开始的,它能很好地复制到预期的 RAM 地址。 我错过了什么? 此致, 罗伯特 Re: XGATE Question 您好, a) 清理后的项目附在原处。旧的那个被移走了。从功能角度看,旧版本也没有问题,只是不小心添加了一些东西。 现在应该没问题了。 b) 在指针位于空白窗口时按下鼠标右键,打开源文件,选择 xgate.dbg,然后断点进入 PIT0_Handler。 运行后,您可以看到它在 xgate 中停止。 以及 CPU 顺祝商祺! 拉吉斯拉夫 Re: XGATE Question 你好,拉迪斯拉夫 我可以运行您的 .asm如果我切换到 USBDM,我的板上有代码,但我收到以下消息。它们不会阻止我制作或运行程序: ************* 项目"XP100-PIT_XGATE_SEMAPHORES-ASM-C52.mcp 的目标"标准" 中的以下访问路径"无法找到: (项目)...\XP100-PIT_XGATE_SEMAPHORES-ASM-C51 在目标"中找不到"XP100-PIT_XGATE_SEMAPHORES-ASM-C51.mcp" 标准" ******** 我可以设置断点,并在 source1 窗口中逐步查看源代码。 我想设置断点并逐步浏览 XGATE 代码,但它并没有出现在 source2 窗口中。我是否漏掉了什么设置? 此致, 罗伯特 Re: XGATE Question 你好,拉迪斯拉夫 非常感谢你们的帮助,谢谢。如果可以的话,我会用"C" 进行编码,但我不懂这门语言。我曾尝试自学,但对我来说太晦涩难懂了。我喜欢汇编程序,因为我可以用调试器观察寄存器和内存。这对我来说是有感知的。我的程序并不庞大,而且只有我一个人创建。所以我更喜欢绝对汇编程序。 总之,我会仔细研究你的附件,看看能做些什么。再次表示感谢。 此致, 罗伯特 Re: XGATE Question 您好, 好吧,我现在再创建一个示例(基于 c 项目,拆解后移植到 asm 项目),只是想知道我是否忘记了。 ......不是 RTI,而是两个 PIT 生成时段。一个位于 CPU(PIT1),另一个位于 XGATE(PIT0)。两个模块都使用一个共享的 8 位变量 XGATE_diodes,该变量在 PIT 中断中被修改,对该变量的访问由 Semaphores 控制。 它让你知道,我认为一切。我还使用了不同的寻址方式:一次是寄存器定义,一次是直接编号......仅举一例。 ......正如我多次表达的那样....,在这种情况下,我不会在 xgate 使用 asm 编程。更简单的是 C 代码,它也能自动解决你可能遇到的许多问题。 ASM 和 C 项目附后。 顺祝商祺! 拉吉斯拉夫 Re: XGATE Question 你好,拉迪斯拉夫 我花了几天时间深入研究代码,一步一步地看,并记录下每一步相关寄存器和变量的状态。我确定变量 XGATE_Counter 位于地址 $2100:2101 处,变量 Counter 位于地址 $2102:2103 处,变量 FiboRes 位于地址 $2104:2105 处。 我按照您的指导逐步完成了 XGATE 代码,并观察了 RAM 内存。后来我才恍然大悟,原来我并没有完全理解这段代码的工作原理。我以为 XGATE 是用来更新 Counter 的,但情况似乎并非如此。它所做的只是递增 XGATE_Counter,与计算斐波那契数字无关。 假设这些都是正确的,那么这将是一次相当难得的学习经历,但我仍然对如何使用 XGATE 感到困惑。 我想先在一个简短的例程中使用 RTI 来建立一些时间率并设置一些标志,这样程序就可以在主循环中将它们用于不同的例程。是否有一些示例代码可以帮助我接近这一目标? 谢谢! 此致, 罗伯特 Re: XGATE Question 您好, SWI 仅在示例中启用,因此我建议您设置断点 然后选择 XGATE 窗口(如图所示为深蓝色),按运行键。每次中断结束时,当中断进入中断机时,它都会被评估为待处理的中断,因此它会再次用上市。 ....并能看到所有变化 ... 几步之后 .... 只是举一个不同方法的小例子... 我目前正在玩(业余活动)将 LCD 驱动程序移至 XGATE... 但是在 C 语言中我使用 SW 触发信号来用上市像这样的 LCD 服务例程... 例如... 我有定义... #define SET_SW_TRIG_LCD XGSWT=(0x0101<< SWI_LCD) // SWI_LCD 为 0 ... 选择 SWI_0 #define REL_SW_TRIG_LCD XGSWT=(0x0100<< SWI_LCD) 然后是 HD44780.c它准备共享数据并用上市SWI的液晶屏服务例程。 tuC lcdCoutTextLC(TuC 线、tuC col、tsC *str){ if(LCD_IS_BUSY) 返回 C_LCD_IS_BUSY; xgateCmdBlock.func_id = LCD_OUT_TEXT_LC; xgateCmdBlock.params.lineColText.line = line; xgateCmdBlock.params.lineColText.col = col; xgateCmdBlock.params.lineColText.str = str; SET_SW_TRIG_LCD;<< < < < < < < < < < < < < < < 这里我启动 LCD 服务 } ... 然后我在 xgate.cxgate 中版本它是为了为下一步行动做准备...XGSWT 值还用作 LCD 忙碌的标志 中断 void SoftwareTrigger0_Handler(void) { LCDxCommandExecution(); REL_SW_TRIG_LCD;//版本 SW 触发信号 0 } 代码已翻译如下... (XGSWT = (0x0100 < < 0);) 12: REL_SW_TRIG_LCD;//版本 SW 触发信号 0 0008 f200 LDL R2,#0 000a aa01 ORH R2,#1 000c f300 LDL R3,#%XGATE_8(_XGSWT) 000e ab00 ORH R3,#%XGATE_8_H(_XGSWT) 0010 5a60 STW R2,(R3,#0) 顺祝商祺! 拉吉斯拉夫 Re: XGATE Question 我在这方面进展不大。我按照你的建议,用可重置汇编器和 XGATE 创建了新的示例项目。当我运行它并再次停止时,我可以看到计数器和 Fibo 结果都已更新。当停止运行时,我可以看到 XGATE R1、R2、R7、PC、MCTL、CHIP 和 VBR 发生了变化,或者至少有一些发生了变化。 当我浏览 main.asm 代码时,我可以看到数字和寄存器的更新,但看不到运行 XGATE 代码的地方。 看起来 XGATE 代码所做的只是在触发信号软件中断时更新计数器,但我看不出是什么引发了 XGATE 的软件中断。 Re: XGATE Question 你好,拉迪斯拉夫 是的,我试过,但没有成功。也许我只是一次性传输了太多的代码。我再试一次,慢慢来。谢谢。 此致, 罗伯特 Re: XGATE Question 您好, 你有没有尝试过创建一个使用 sw 触发信号示例创建默认结构的新项目。它还介绍了共享变量处理(非 Semaphores)。有了这些,您就可以用自己的代码对其进行扩展。但是,我建议一步一步来,审查所有内容。 顺祝商祺! 拉吉斯拉夫 Re: XGATE Question 你好,拉迪斯拉夫 我一直在研究《XGATE 汇编程序手册》.PDF 文件,在你指出的地方找到了它,但恐怕里面的解释对我来说并不清楚。 在反复阅读 MC9S12XEP100RMV1 手册时,我确实发现有一些内容向我表明,用绝对汇编程序为 S12X CPU 和 XGATE 编写代码是可能的。它位于手册第 10.9.2 节,标题为代码示例(在 SCI 上传输"Hello World" )。 但是,当我尝试用 Code Warrior 运行它时,它马上就瘫痪了。第一个错误是"CPU S12X" 不是 hc12 指令或指令。 运行该程序需要做什么? Re: XGATE Question 感谢拉迪斯拉夫我看看能否在那里找到答案。 此致, 罗伯特 Re: XGATE Question 您好, 我不认识任何从事绝对装配工作的人,尤其是使用 XGATE 的人。可以创建多核(CPU+XGATE)的可重定位程序集项目。 一些信息可以在 CW 的安装文件夹中找到 - Assembler_XGATE.pdf 文件......例如在我的电脑中... c:\Program Files (x86)\Freescale\CWS12v5.2\Help\pdf\ 顺祝商祺! 拉吉斯拉夫
查看全文
人工智能与人类智能有何不同? Brolly Academy 提供广泛的 IT 潮流课程,旨在为学生提供宝贵的技能和 100% 就业援助。 以下是您可以在布罗利学院探索的 50 门热门 IT 课程 我们在海得拉巴提供最好的generateai 培训 Re: How does AI differ from human intelligence? 有趣的讨论人工智能的优势在于快速处理大量数据,而人类智能则增加了直觉、情感和对上下文的理解。两者都有独特的能力,将它们结合起来往往能找到最有效的解决方案。值得探讨的好话题!https://vignesh156.aiskills.in/   Re: How does AI differ from human intelligence? "有见地的讨论!人工智能在数据处理和模式识别方面非常出色,但人类智能在创造力、同理心和道德判断力方面仍处于领先地位。将这两种优势结合起来,才是真正的力量所在。       Re: How does AI differ from human intelligence? 欢迎来到 Brollyai,您在掌握未来技术方面值得信赖的合作伙伴 Brollyai 成立于 2021 年,其诞生源于一个愿景,即在有抱负的技术爱好者与快速发展的人工智能世界之间架起一座桥梁。我们专用于在最前沿的人工智能领域提供一流的教育和实践培训。 我们的团队拥有丰富的知识和 15 年的行业经验。我们经验丰富的教师对最新的技术进步有着深刻的理解,确保学生获得最高质量的教育和培训。 我们提供: 在布罗莱艾,我们的专长是 生成式人工智能: 潜入创造性人工智能应用的世界,从图像生成到高级自然语言处理。 提示工程: 学习设计有效提示的艺术和科学,以充分发挥人工智能模型的潜力。 机器学习: 全面了解从基础概念到高级算法的机器学习技术。 我们提供最好的 培训在海德拉巴 Re: How does AI differ from human intelligence? 速度& 处理能力--人工智能可以在数秒内分析海量数据集,而人类则需要更长的时间。 模式识别--人工智能擅长从数据中发现人类无法识别的复杂模式。 决策--人类使用推理和直觉,而人工智能则依赖算法和统计模型。 适应性--人工智能会随着数据的增多(机器学习)而不断改进,但人类可以将创造力和情境应用于新问题。 错误处理--人工智能可以减少人为错误,但在处理模棱两可或不完整的数据时可能会遇到困难,而人类可以更好地解释这些数据。 在 数据分析人工智能提高了效率,但人类智慧对于战略思考和决策至关重要 Re: How does AI differ from human intelligence? 人工智能与人类智慧截然不同!人类从经验和情感中学习,从而产生创造力和直觉。相比之下,人工智能依赖于数据和算法,因此在特定任务中表现出色,但在新情况下灵活性较差。虽然我们可以驾驭复杂的社会动态并具有自我意识,但人工智能却无法真正理解或感受。 https://generativeaimasters.in/prompt-engineering-course-in-hyderabad/"> 海得拉巴的及时工程课程
查看全文
Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB Hello everyone, I'm using MCUXpresso for VSCode in order to test the peripherals of a custom board similar to imx93-qsb. Starting from the SDK project "flexspi_nor_polling_transfer" I would like to test the functionality of NOR flash MT25QU01GBBB8E12, very similar to the chip used in the example: MT25QU512ABB. When it comes to the function flexspi_nor_get_vendor_id it gives 0xFF instead of 0x20, then it completes the last operations successfully.         I'm using the same SPI peripheral of the example (flexSPI1 on SD3 pads), I'don't understand why I'm not reading the ID vendor correctly. Can anyone help me? Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB For what it's worth, I also have issues with the Read ID command 0x9E when using IS25WX256 in extended SPI mode. The command is `FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x9e, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 4),`. Each time I use it I read `0x888cadce`. Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB Hello @AldoG , I tried to put some PRINTF command inside the flexspi_nor_get_vendor_id fuction in order to understand what's going on with vendorID value. The output is this: I tried also to change flashXfer.seqIndex to 4 * NOR_CMD_LUT_SEQ_IDX_READID and the output changed: I don't know if it could be helpful to go over and over inside the functions. Maybe the problem is seqIndex value itself. Let me know your thoughts. Regards, Bob Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB Hello, I see that you are using exactly the example as it is, asde from the addition I have recommended. I do not think that the memory is not working correctly, more than the LUT command to get the ID is not working correctly this is why I mentioned if it is possible to check if it is being sent correctly. Best regards/Saludos, Aldo. Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB Hello, I'm pretty sure the Flash memory is working well because I've been able to put a bootloader targeting nor-flash with this UUU command: uuu.exe -b qspi imx-boot-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot Setting the boot configuration in FlexSPI Serial NOR, I can see that the bootloader is running correctly. But I still don't understand why there are issues using this project in MCUXpresso for VScode. Please let me know if you can help me, I need to work also with iMX93's M33 core. Thanks, Bob Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB Hello, Thank you for sharing, I will check it carefully. Meanwhile is there any way for you to check the signals on the hardware? Best regards/Saludos, Aldo. Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB Hello Aldo, Thanks for helping me. Unfortunately, This change on the LUT is not the solution, I'm still reading 0xff on Vendor ID. I share with you all the entire C code: /*  * Copyright (c) 2016, Freescale Semiconductor, Inc.  * Copyright 2016-2018 NXP  * All rights reserved.  *  *  * SPDX-License-Identifier: BSD-3-Clause  */  #include "pin_mux.h"  #include "clock_config.h"  #include "board.h"  #include "fsl_debug_console.h"  #include "fsl_rgpio.h"  #include "fsl_lpi2c.h"  #include "fsl_iomuxc.h"  #include "fsl_lpi2c.c" #include "fsl_flexspi.h" #include "app.h" #include "fsl_debug_console.h" #include "fsl_cache.h" #include "pin_mux.h" #include "clock_config.h" #include "board.h" #include "fsl_common.h" /*******************************************************************************  * Definitions  ******************************************************************************/ /*******************************************************************************  * Prototypes  ******************************************************************************/ /*******************************************************************************  * Variables  ******************************************************************************/ /* Program data buffer should be 4-bytes alignment, which can avoid busfault due to this memory region is configured as    Device Memory by MPU. */ SDK_ALIGN(static uint8_t s_nor_program_buffer[256], 4); static uint8_t s_nor_read_buffer[256]; extern status_t flexspi_nor_flash_erase_sector(FLEXSPI_Type *base, uint32_t address); extern status_t flexspi_nor_flash_page_program(FLEXSPI_Type *base, uint32_t dstAddr, const uint32_t *src); extern status_t flexspi_nor_get_vendor_id(FLEXSPI_Type *base, uint8_t *vendorId); extern status_t flexspi_nor_enable_quad_mode(FLEXSPI_Type *base); extern status_t flexspi_nor_erase_chip(FLEXSPI_Type *base); extern void flexspi_nor_flash_init(FLEXSPI_Type *base); /*******************************************************************************  * Code  ******************************************************************************/ flexspi_device_config_t deviceconfig = {     .flexspiRootClk       = 12000000,                                                       //12 MHz, ok per noi     .flashSize            = FLASH_SIZE,     .CSIntervalUnit       = kFLEXSPI_CsIntervalUnit1SckCycle,     .CSInterval           = 2,     .CSHoldTime           = 3,     .CSSetupTime          = 3,     .dataValidTime        = 0,     .columnspace          = 0,     .enableWordAddress    = 0,     .AWRSeqIndex          = 0,     .AWRSeqNumber         = 0,     .ARDSeqIndex          = NOR_CMD_LUT_SEQ_IDX_READ,     .ARDSeqNumber         = 1,     .AHBWriteWaitUnit     = kFLEXSPI_AhbWriteWaitUnit2AhbCycle,     .AHBWriteWaitInterval = 0, }; const uint32_t customLUT[CUSTOM_LUT_LENGTH] = {     /* Fast read quad mode -SDR */     [4 * NOR_CMD_LUT_SEQ_IDX_READ + 0] =         FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0xEB, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_4PAD, 0x18),     [4 * NOR_CMD_LUT_SEQ_IDX_READ + 1] = FLEXSPI_LUT_SEQ(         kFLEXSPI_Command_DUMMY_SDR, kFLEXSPI_4PAD, 0x0A, kFLEXSPI_Command_READ_SDR, kFLEXSPI_4PAD, 0x04),     /* Read status register */     [4 * NOR_CMD_LUT_SEQ_IDX_READSTATUSREG] =         FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0xB5, kFLEXSPI_Command_DUMMY_SDR, kFLEXSPI_4PAD, 0x0),     [4 * NOR_CMD_LUT_SEQ_IDX_READSTATUSREG + 1] =         FLEXSPI_LUT_SEQ(kFLEXSPI_Command_READ_SDR, kFLEXSPI_4PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x0),     /* Read ID */     [4 * NOR_CMD_LUT_SEQ_IDX_READID] =         FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x9E, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 0x04), // modifica mia da 0x9F A 0X9E     /*  Write Enable 4 pad */     [4 * NOR_CMD_LUT_SEQ_IDX_WRITEENABLE_OPI] =         FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0x06, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00),     /*  Write Enable */     [4 * NOR_CMD_LUT_SEQ_IDX_WRITEENABLE] =         FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0x06, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0),     /*  Erase Sector */     [4 * NOR_CMD_LUT_SEQ_IDX_ERASESECTOR] =         FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0x20, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_4PAD, 0x18),     /*  Program */     [4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_QUAD] =         FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0x32, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_4PAD, 0x18),     [4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_QUAD + 1] =         FLEXSPI_LUT_SEQ(kFLEXSPI_Command_WRITE_SDR, kFLEXSPI_4PAD, 0x01, kFLEXSPI_Command_STOP, kFLEXSPI_4PAD, 0),     /* Enter Quad mode */     [4 * NOR_CMD_LUT_SEQ_IDX_ENABLEQUAD] =         FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x35, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00),     /*  Dummy write, do nothing when AHB write command is triggered. */     [4 * NOR_CMD_LUT_SEQ_IDX_WRITE] =         FLEXSPI_LUT_SEQ(kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x0, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x0),     /*  Read status register using Qual SDR read */     [4 * NOR_CMD_LUT_SEQ_IDX_READSTATUS_OPI] =         FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0x05, kFLEXSPI_Command_READ_SDR, kFLEXSPI_4PAD, 0x02), }; int main(void) {     uint32_t i = 0;     status_t status;     uint8_t vendorID = 0;     pcal6524_handle_t handle;     /* clang-format off */     const clock_root_config_t lpi2cClkCfg = {         .clockOff = false,         .mux = 0, // 24MHz oscillator source         .div = 1     };     /* clang-format on */     BOARD_ConfigMPU();     BOARD_InitBootPins();     BOARD_BootClockRUN();     BOARD_InitDebugConsole();     CLOCK_SetRootClock(BOARD_PCAL6524_I2C_CLOCK_ROOT, &lpi2cClkCfg);     CLOCK_EnableClock(BOARD_PCAL6524_I2C_CLOCK_GATE);     /* Set 3.3V for M.2 nor flash card */     BOARD_InitPCAL6524(&handle);     PCAL6524_SetDirection(&handle, (1 << BOARD_PCAL6524_EXT1_PWREN), kPCAL6524_Output);     PCAL6524_SetPins(&handle, (1 << BOARD_PCAL6524_EXT1_PWREN));     flexspi_nor_flash_init(EXAMPLE_FLEXSPI);     PRINTF("\r\nFLEXSPI example started!\r\n");     /* Get vendor ID. */     status = flexspi_nor_get_vendor_id(EXAMPLE_FLEXSPI, &vendorID);     if (status != kStatus_Success)     {         return status;     }     PRINTF("Vendor ID: 0x%x\r\n", vendorID); #if !(defined(XIP_EXTERNAL_FLASH))     /* Erase whole chip . */     PRINTF("Erasing whole chip over FlexSPI...\r\n");     status = flexspi_nor_erase_chip(EXAMPLE_FLEXSPI);     if (status != kStatus_Success)     {         return status;     }     PRINTF("Erase finished !\r\n"); #endif     /* Enter quad mode. */     status = flexspi_nor_enable_quad_mode(EXAMPLE_FLEXSPI);     if (status != kStatus_Success)     {         return status;     }     /* Erase sectors. */     PRINTF("Erasing Serial NOR over FlexSPI...\r\n");     status = flexspi_nor_flash_erase_sector(EXAMPLE_FLEXSPI, EXAMPLE_SECTOR * SECTOR_SIZE);     if (status != kStatus_Success)     {         PRINTF("Erase sector failure !\r\n");         return -1;     }     memset(s_nor_program_buffer, 0xFFU, sizeof(s_nor_program_buffer));     DCACHE_InvalidateByRange(EXAMPLE_FLEXSPI_AMBA_BASE + EXAMPLE_SECTOR * SECTOR_SIZE, FLASH_PAGE_SIZE);     memcpy(s_nor_read_buffer, (void *)(EXAMPLE_FLEXSPI_AMBA_BASE + EXAMPLE_SECTOR * SECTOR_SIZE),            sizeof(s_nor_read_buffer));     if (memcmp(s_nor_program_buffer, s_nor_read_buffer, sizeof(s_nor_program_buffer)))     {         PRINTF("Erase data -  read out data value incorrect !\r\n ");         return -1;     }     else     {         PRINTF("Erase data - successfully. \r\n");     }     for (i = 0; i < 0xFFU; i++)     {         s_nor_program_buffer[i] = i;     }     status =         flexspi_nor_flash_page_program(EXAMPLE_FLEXSPI, EXAMPLE_SECTOR * SECTOR_SIZE, (void *)s_nor_program_buffer);     if (status != kStatus_Success)     {         PRINTF("Page program failure !\r\n");         return -1;     }     DCACHE_InvalidateByRange(EXAMPLE_FLEXSPI_AMBA_BASE + EXAMPLE_SECTOR * SECTOR_SIZE, FLASH_PAGE_SIZE);     memcpy(s_nor_read_buffer, (void *)(EXAMPLE_FLEXSPI_AMBA_BASE + EXAMPLE_SECTOR * SECTOR_SIZE),            sizeof(s_nor_read_buffer));     if (memcmp(s_nor_read_buffer, s_nor_program_buffer, sizeof(s_nor_program_buffer)) != 0)     {         PRINTF("Program data -  read out data value incorrect !\r\n ");         return -1;     }     else     {         PRINTF("Program data - successfully. \r\n");     }     status = flexspi_nor_get_vendor_id(EXAMPLE_FLEXSPI, &vendorID);     if (status != kStatus_Success)     {         return status;     }     PRINTF("Vendor ID: 0x%x\r\n", vendorID);     PRINTF("Status: %d\r\n", status);     while (1)     {     } } Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB Hello, Thank you for testing, then most likely is that LUT sequence is not correct when READ ID is performed, please try the following change in the LUT: /* Read ID */ [4 * NOR_CMD_LUT_SEQ_IDX_READID] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x9E, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 0x04), Please try it and let me know of the results. Best regards/Saludos, Aldo. Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB Yes, I added this code as you suggested: unfortunately nothing has changed, as you can see: @AldoG do you have other ideas? Thanks, Bob Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB Hello, Everything looks good on hw, could you try to add function to read vendor ID after data is programed? Best regards/Saludos, Aldo. Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB Hello Aldo, thanks for the resoponse. These are the connections Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB Hello, This could be caused due to not handling reset signals correctly on the SPI memory, could you share how are you connecting the memory? If you could share an small schematic it would be really helpful. Best regards/Saludos, Aldo.
查看全文
IMX93QSB の Flexspi_nor_polling_transfer SDKs の例におけるベンダー ID の問題 こんにちは、みんな、 imx93-qsb に似たカスタム ボードのペリフェラルをテストするために、VSCode 用の MCUXpresso を使用しています。SDK プロジェクト「flexspi_nor_polling_transfer」から始めて、例で使用されているチップMT25QU512ABB と非常によく似た NOR フラッシュ MT25QU01GBBB8E12 の機能をテストしたいと思います。 関数flexspi_nor_get_vendor_idでは0x20 ではなく 0xFF が返され、最後の操作は正常に完了します。         例と同じ SPI ペリフェラル (SD3 パッドの flexSPI1) を使用していますが、ID ベンダーを正しく読み取れない理由がわかりません。誰か助けてくれませんか? Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB ちなみに、拡張 SPI モードで IS25WX256 を使用する場合、Read ID コマンド 0x9E でも問題が発生します。コマンドは `FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x9e, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 4),` です。使用するたびに `0x888cadce` を読み取ります。 Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB こんにちは@AldoG 、 vendorID 値で何が起こっているかを理解するために、flexspi_nor_get_vendor_id 関数内に PRINTF コマンドをいくつか配置してみました。 出力は次のようになります。 また、flashXfer.seqIndex を 4 * NOR_CMD_LUT_SEQ_IDX_READID に変更してみましたが、出力は次のように変わりました。 関数内を何度も確認することが役に立つかどうかはわかりません。おそらく問題は seqIndex 値自体にあります。あなたの考えを聞かせてください。 よろしくお願いいたします。 ボブ Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB こんにちは、 私が推奨した追加事項からわかるように、あなたはまさにその例をそのまま使用しています。 メモリが正しく機能していないというよりは、ID を取得するための LUT コマンドが正しく機能していないのではないかと思います。そのため、正しく送信されているかどうかを確認できるかどうかを言及しました。 よろしくお願いいたします。 アルド。 Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB こんにちは、 次の UUU コマンドを使用して nor-flash をターゲットとするブートローダーを配置できたため、フラッシュ メモリが正常に動作していることはほぼ確実です。 uuu.exe -b qspi imx-boot-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot FlexSPI Serial NOR でブート構成を設定すると、ブートローダが正しく実行されていることがわかります。しかし、なぜこのプロジェクトを MCUXpresso for VScode で使用すると問題が発生するのか、まだわかりません。 ご協力いただける場合はお知らせください。iMX93 の M33 コアでも作業する必要があります。 ありがとうございます ボブ Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB こんにちは、 共有していただきありがとうございます。注意深く確認させていただきます。 ところで、ハードウェア上の信号を確認する方法はありますか? よろしくお願いいたします。 アルド。 Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB こんにちは、アルドさん。 助けてくれてありがとう。残念ながら、この LUT の変更は解決策ではなく、ベンダー ID では依然として 0xff が読み取られます。C コード全体を皆さんと共有します。 /* * 著作権 (c) 2016、Freescale Semiconductor, Inc. * 著作権 2016-2018 NXP * 無断転載を禁じます。 * * * SPDXライセンス識別子: BSD-3条項 */  #include "pin_mux.h"  #include "clock_config.h"  #include "board.h"  #include "fsl_debug_console.h"  #include "fsl_rgpio.h"  #include "fsl_lpi2c.h"  #include "fsl_iomuxc.h"  #include "fsl_lpi2c.c" #include "fsl_flexspi.h" #include "app.h" #include "fsl_debug_console.h" #include "fsl_cache.h" #include "pin_mux.h" #include "clock_config.h" #include "board.h" #include "fsl_common.h" /**************************************************************************************** * 定義 **********************************************************************************/ /**************************************************************************************** * プロトタイプ **********************************************************************************/ /**************************************************************************************** * 変数 **********************************************************************************/ /* プログラムデータバッファは4バイトのアラインメントにする必要があります。これにより、このメモリ領域が次のように構成されているため、バスフォールトをCAN。 MPU によるデバイス メモリ。*/ SDK_ALIGN (静的uint8_t s_nor_program_buffer [ 256 ], 4 ); 静的uint8_t s_nor_read_buffer [ 256 ]; extern status_t flexspi_nor_flash_erase_sector ( FLEXSPI_Type *ベース、 uint32_tアドレス); extern status_t flexspi_nor_flash_page_program ( FLEXSPI_Type * base 、 uint32_t dstAddr 、 const uint32_t * src ); 外部status_t flexspi_nor_get_vendor_id ( FLEXSPI_Type *ベース、 uint8_t *ベンダーID ); 外部status_t flexspi_nor_enable_quad_mode ( FLEXSPI_Type *ベース); 外部status_t flexspi_nor_erase_chip ( FLEXSPI_Type *ベース); 外部void flexspi_nor_flash_init ( FLEXSPI_Type *ベース); /**************************************************************************************** * コード **********************************************************************************/ flexspi_device_config_tデバイス構成= { . flexspiRootClk       = 12000000 , //12 MHz、ノイズあたりOK .フラッシュサイズ            = FLASH_SIZE 、 . CS間隔単位       = kFLEXSPI_CsIntervalUnit1SckCycle 、 . CS間隔           = 2 、 .CSホールド時間           = 3 、 . CSセットアップ時間          = 3 、 .データ有効時間        = 0 、 .列スペース          = 0 、 . enableWordAddress    = 0 、 . AWRSeqIndex          = 0 、 . AWRシーケンス番号         = 0 、 . ARDSeqインデックス          = NOR_CMD_LUT_SEQ_IDX_READ 、 . ARDシーケンス番号         = 1 、 . AHBWriteWaitUnit     = kFLEXSPI_AhbWriteWaitUnit2AhbCycle 、 . AHBWriteWaitInterval = 0 , }; const uint32_t customLUT [ CUSTOM_LUT_LENGTH ] = { /* 高速読み取りクアッドモード -SDR */ [ 4 * NOR_CMD_LUT_SEQ_IDX_READ + 0 ] =         FLEXSPI_LUT_SEQ ( kFLEXSPI_Command_SDR 、 kFLEXSPI_4PAD 、 0xEB 、 kFLEXSPI_Command_RADDR_SDR 、 kFLEXSPI_4PAD 、 0x18 )、 [ 4 * NOR_CMD_LUT_SEQ_IDX_READ + 1 ] = FLEXSPI_LUT_SEQ (         kFLEXSPI_Command_DUMMY_SDR 、 kFLEXSPI_4PAD 、 0x0A 、 kFLEXSPI_Command_READ_SDR 、 kFLEXSPI_4PAD 、 0x04 )、 /* ステータスレジスタの読み取り */ [ 4 * NOR_CMD_LUT_SEQ_IDX_READSTATUSREG ] =         FLEXSPI_LUT_SEQ ( kFLEXSPI_Command_SDR 、 kFLEXSPI_4PAD 、 0xB5 、 kFLEXSPI_Command_DUMMY_SDR 、 kFLEXSPI_4PAD 、 0x0 )、 [ 4 * NOR_CMD_LUT_SEQ_IDX_READSTATUSREG + 1 ] =         FLEXSPI_LUT_SEQ ( kFLEXSPI_Command_READ_SDR 、 kFLEXSPI_4PAD 、 0x04 、 kFLEXSPI_Command_STOP 、 kFLEXSPI_1PAD 、 0x0 )、 /* ID を読み取る */ [ 4 * NOR_CMD_LUT_SEQ_IDX_READID ] =         FLEXSPI_LUT_SEQ ( kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , 0x9E , kFLEXSPI_Command_READ_SDR , kFLEXSPI_1PAD , 0x04 ), // 0x9F から 0X9E に変更 /* 書き込み可能4パッド */ [ 4 * NOR_CMD_LUT_SEQ_IDX_WRITEENABLE_OPI ] =         FLEXSPI_LUT_SEQ ( kFLEXSPI_Command_SDR 、 kFLEXSPI_4PAD 、 0x06 、 kFLEXSPI_Command_STOP 、 kFLEXSPI_1PAD 、 0x00 )、 /* 書き込み許可 */ [ 4 * NOR_CMD_LUT_SEQ_IDX_WRITEENABLE ] =         FLEXSPI_LUT_SEQ ( kFLEXSPI_Command_SDR 、 kFLEXSPI_4PAD 、 0x06 、 kFLEXSPI_Command_STOP 、 kFLEXSPI_1PAD 、 0 )、 /* セクタ消去 */ [ 4 * NOR_CMD_LUT_SEQ_IDX_ERASESECTOR ] =         FLEXSPI_LUT_SEQ ( kFLEXSPI_Command_SDR 、 kFLEXSPI_4PAD 、 0x20 、 kFLEXSPI_Command_RADDR_SDR 、 kFLEXSPI_4PAD 、 0x18 )、 /* プログラム */ [ 4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_QUAD ] =         FLEXSPI_LUT_SEQ ( kFLEXSPI_Command_SDR 、 kFLEXSPI_4PAD 、 0x32 、 kFLEXSPI_Command_RADDR_SDR 、 kFLEXSPI_4PAD 、 0x18 )、 [ 4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_QUAD + 1 ] =         FLEXSPI_LUT_SEQ ( kFLEXSPI_Command_WRITE_SDR 、 kFLEXSPI_4PAD 、 0x01 、 kFLEXSPI_Command_STOP 、 kFLEXSPI_4PAD 、 0 )、 /* クアッドモードに入る */ [ 4 * NOR_CMD_LUT_SEQ_IDX_ENABLEQUAD ] =         FLEXSPI_LUT_SEQ ( kFLEXSPI_Command_SDR 、 kFLEXSPI_1PAD 、 0x35 、 kFLEXSPI_Command_STOP 、 kFLEXSPI_1PAD 、 0x00 )、 /* ダミー書き込み。AHB 書き込みコマンドがトリガーされたときには何もしません。*/ [ 4 * NOR_CMD_LUT_SEQ_IDX_WRITE ] =         FLEXSPI_LUT_SEQ ( kFLEXSPI_Command_STOP 、 kFLEXSPI_1PAD 、 0x0 、 kFLEXSPI_Command_STOP 、 kFLEXSPI_1PAD 、 0x0 )、 /* Qual SDR読み取りを使用してステータスレジスタを読み取る */ [ 4 * NOR_CMD_LUT_SEQ_IDX_READSTATUS_OPI ] =         FLEXSPI_LUT_SEQ ( kFLEXSPI_Command_SDR 、 kFLEXSPI_4PAD 、 0x05 、 kFLEXSPI_Command_READ_SDR 、 kFLEXSPI_4PAD 、 0x02 )、 }; int main ( void ) {     uint32_t i = 0 ;     status_tステータス;     uint8_tベンダーID = 0 ;     pcal6524_handle_tハンドル; /* clang-format オフ */     const clock_root_config_t lpi2cClkCfg = { .clockOff = false 、​ . mux = 0 , // 24MHz発振器ソース . div = 1 }; /* clang-format オン */     BOARD_ConfigMPU ();     BOARD_InitBootPins ();     BOARD_BootClockRUN ();     BOARD_InitDebugConsole ();     CLOCK_SetRootClock ( BOARD_PCAL6524_I2C_CLOCK_ROOT 、 & lpi2cClkCfg );     CLOCK_EnableClock ( BOARD_PCAL6524_I2C_CLOCK_GATE ); /* M.2 nor フラッシュカードに 3.3V を設定します */     BOARD_InitPCAL6524 ( &ハンドル);     PCAL6524_SetDirection ( &ハンドル, ( 1 << BOARD_PCAL6524_EXT1_PWREN ), kPCAL6524_Output );     PCAL6524_SetPins ( &ハンドル, ( 1 << BOARD_PCAL6524_EXT1_PWREN ));     flexspi_nor_flash_init ( EXAMPLE_FLEXSPI );     PRINTF ( " \r\n FLEXSPI の例を開始しました! \r\n " ); /* ベンダーIDを取得します。 */     ステータス= flexspi_nor_get_vendor_id ( EXAMPLE_FLEXSPI 、 & vendorID );     if (ステータス!= kStatus_Success )     {         ステータスを返します。    }     PRINTF ( "ベンダーID: 0x %x \r\n " , vendorID ); #if ! (定義済み( XIP_EXTERNAL_FLASH )) /* チップ全体を消去します。*/     PRINTF ( "FlexSPI 経由でチップ全体を消去しています... \r\n " ); ステータス= flexspi_nor_erase_chip (EXAMPLE_FLEXSPI);     if (ステータス!= kStatus_Success)     {         ステータスを返します。    }     PRINTF ( "消去が完了しました! \r\n " ); #endif /* クアッドモードに入ります。*/     ステータス= flexspi_nor_enable_quad_mode ( EXAMPLE_FLEXSPI );     if (ステータス!= kStatus_Success )     {         ステータスを返します。    } /* セクタを消去します。*/     PRINTF ( "FlexSPI 経由のシリアル NOR を消去しています... \r\n " );     ステータス= flexspi_nor_flash_erase_sector ( EXAMPLE_FLEXSPI 、 EXAMPLE_SECTOR * SECTOR_SIZE );     if (ステータス!= kStatus_Success )     {         PRINTF ( "セクター消去失敗! \r\n " );         - 1を返します。    }     memset ( s_nor_program_buffer 、 0xFFU 、 sizeof ( s_nor_program_buffer ));     DCACHE_InvalidateByRange ( EXAMPLE_FLEXSPI_AMBA_BASE + EXAMPLE_SECTOR * SECTOR_SIZE 、 FLASH_PAGE_SIZE );     memcpy ( s_nor_read_buffer , ( void * )( EXAMPLE_FLEXSPI_AMBA_BASE + EXAMPLE_SECTOR * SECTOR_SIZE ),            sizeof ( s_nor_read_buffer ));     memcmp ()の場合、 s_nor_program_buffer 、 s_nor_read_buffer 、 sizeof ( )の場合、 s_nor_program_bufferは、次のようになります。     {         PRINTF ( "データを消去 - 読み取ったデータ値が正しくありません! \r\n " );         - 1を返します。    }     それ以外     {         PRINTF ( "データの消去 - 正常に完了しました。 \r\n " );    }     ( i = 0 ; i < 0xFFU ; i ++ )の場合     {         s_nor_program_buffer [ i ] = i ;    }     ステータス=         flexspi_nor_flash_page_program ( EXAMPLE_FLEXSPI 、 EXAMPLE_SECTOR * SECTOR_SIZE 、 ( void * ) s_nor_program_buffer );     if (ステータス!= kStatus_Success )     {         PRINTF ( "ページ プログラム エラー! \r\n " );         - 1を返します。    }     DCACHE_InvalidateByRange ( EXAMPLE_FLEXSPI_AMBA_BASE + EXAMPLE_SECTOR * SECTOR_SIZE 、 FLASH_PAGE_SIZE );     memcpy ( s_nor_read_buffer , ( void * )( EXAMPLE_FLEXSPI_AMBA_BASE + EXAMPLE_SECTOR * SECTOR_SIZE ),            sizeof ( s_nor_read_buffer ));     memcmp ( s_nor_read_buffer 、 s_nor_program_buffer 、 sizeof ( s_nor_program_buffer ) ) != 0の場合     {         PRINTF ( "プログラムデータ - 読み取ったデータ値が正しくありません! \r\n " );         - 1を返します。    }     それ以外     {         PRINTF ( "プログラムデータ - 正常に実行されました。 \r\n " );    }     ステータス= flexspi_nor_get_vendor_id ( EXAMPLE_FLEXSPI 、 & vendorID );     if (ステータス!= kStatus_Success )     {         ステータスを返します。    }     PRINTF ( "ベンダーID: 0x %x \r\n " , vendorID );     PRINTF ( "ステータス: %d \r\n " , status );     一方( 1 )     {    } } Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB こんにちは、 テストしていただきありがとうございます。READ ID の実行時に LUT シーケンスが正しくない可能性が最も高いため、LUT で次の変更を試してください。 /* ID を読み取る */ [4 * NOR_CMD_LUT_SEQ_IDX_READID] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR、kFLEXSPI_1PAD、 0x9E 、kFLEXSPI_Command_READ_SDR、kFLEXSPI_1PAD、0x04)、 ぜひお試しいただき、結果を教えてください。 よろしくお願いいたします。 アルド。 Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB はい、ご提案どおりに次のコードを追加しました: 残念ながら、CANのとおり何も変わっていません。 @AldoG他にアイデアはありますか? ありがとうございます ボブ Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB こんにちは、 ハードウェアはすべて正常に見えますが、データがプログラムされた後にベンダー ID を読み取る機能を追加していただけますか? よろしくお願いいたします。 アルド。 Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB こんにちは、アルドさん。 ご返信ありがとうございます。これらは接続です Re: Vendor ID issue in Flexspi_nor_polling_transfer SDK example for IMX93QSB こんにちは、 これは、SPI メモリ上でリセット信号が正しく処理されていないことが原因で発生する可能性があります。メモリをどのように接続しているか教えていただけますか? 小さな回路図を共有していただければ、本当に助かります。 よろしくお願いいたします。 アルド。
查看全文