Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
OM15020 JN5169 Zigbee USBドングル、Wiresharkでの使用方法は? こんにちは、皆さん Wiresharkを使用して、このドングルでZigbeeのグリーンパワーをテストできるようにしたいと思います。 どなたかご案内いただけませんか? このソフトウェアはどちらかというとイーサネットフレーム専用ですが、IEEE802.15.4フレーム用に構成できるはずだと思います。 チュートリアルのおかげでUbiquaソフトウェアで成功しましたが、Wiresharkには何も見つかりませんでした... ありがとうございます フレッド 日時:OM15020 JN5169 Zigbee USBドングル、Wiresharkでの使用方法は? 今ではうまく機能しています! 非常に便利なプログラム、Codemonkey1973に感謝します。 よろしくお願いします。 フレッド 日時:OM15020 JN5169 Zigbee USBドングル、Wiresharkでの使用方法は? ありがとうルイス、私はすぐに読みます。 日時:OM15020 JN5169 Zigbee USBドングル、Wiresharkでの使用方法は? こんにちはフレッド Wireshark JN51xxのリンクを更新しました よろしくルイス
View full article
How to import AUTOSAR OS generation from EB tresos to S32DS Hello, Please let me know, how to import AUTOSAR OS project (ACP 8.8.8 S32K34X) after code generation from EB tresos to S32DS for S32 platform.  Thanks in advance. Re: How to import AUTOSAR OS generation from EB tresos to S32DS Hi @AnChe  The configuration files of EB Tresos are applicable for Autosar format (such as Autosar schema XML format); otherwise, the Mex file in S32DS does not follow this format. You need to configure/replace/change things manually. Unfortunately, we do not have any dedicated documents for this process, but one of our distributors (ARROW) has a well-explained article you can refer to. Develop EB configuration Mcal project with S32DS NOTE: This is written in Chinese. B.R. VaneB
View full article
SAI3 & EDMA on IMXRT1010 Hello, I am trying to bring up SAI3 & EDMA on an IMXRT1010 custom board. To start with, I am using evkmimxrt1010_sai_edma_transfer example on IMXRT1010 EVK. I was able to run the demo with SAI 1. I can hear the stored tone. To check SAI3, I edited the code in evkmimxrt1010_sai_edma_transfer. I changed references of SAI1 to SAI3. The lines that I had edited are   Line 26,28, 29 in sai_edma_transfer.c : Changed references of macros from SAI1 to SAI3 41,43, 45 in sai_edma_transfer.c : Changed references of macros from SAI1 to SAI3 61 in sai_edma_tranfer.c : Changed references of macros from SAI1 to SAI3 138 & 142 : Changed references of MCLK output from SAI1 to SAI3 191, 192 & 193: Clock settings changed from SAI1 to SAI3   I am aware that the codec will not work in this case. However, I wanted to see the data transfer, with SAI3 taking in the data and completing the transfer. The code comiled and executed. However, the code gets stuck with 'kStatus_SAI_QueueFull' status message after 4 iterations. The MCU is not reaching the ISR for DMA. Code is not reaching   WEAK void DMA0_IRQHandler(void) {   DMA0_DriverIRQHandler(); } in startup_mimxrt1011.c    I had checked if the clock settings, NVIC settings ,  DMA settings & SAI3 settings are as per my understanding. I am unable to see anything amiss   CCM_CSCMR1: SAI3_CLK_SEL->SAI3_CLK_SEL_2   CCM_CS1CDR: SAI3_CLK_PRED->SAI3_CLK_PRED_3   TCD0_DADDR 0x401e8020 //this corresponds to the SAI3 TX register address. TCR3 0x00010000 //this corresponds to the SAI3 TX en   I had spent ~ 2 days and i have ran out of possible solutions. Any leads on this will be highly helpful. Attached is my modified sai_edma_transfer.c file.    Thanks Syam k     Re: SAI3 & EDMA on IMXRT1010 The catch was #define DEMO_SAI_MASTER_SLAVE kSAI_Slave defined in sai_edma_transfer.c  . With WM8960 Codec, the codec makes the BCLK and SAI accepts the clock. When i moved from SAI1 to SAI3, there is no BCLK to drive the SAI. When SAI3 was configured as master, I could see SAI3 taking in data and DMA generating interrupts. Now I will try this code in my custom board with TAS2780. 
View full article
Build error with pseudo in meta-nxp-desktop layer on IMX8MP I'm experiencing compilation errors when building imx-image-desktop using the meta-nxp-desktop layer. The build consistently fails when compiling pseudo-native with the following error: ports/unix/guts/unlinkat.c: In function 'wrap_unlinkat': pseudo_client.h:14:65: error: '_STAT_VER' undeclared (first use in this function) 14 | #define base_fstatat(dirfd, path, buf, flags) real___fxstatat64(_STAT_VER, dirfd, path, buf, flags) | ^~~~~~~~~ Additionally, there are multiple functions in ports/linux/pseudo_wrappers.c that lack return statements: ports/linux/pseudo_wrappers.c: In function 'pseudo_stat': ports/linux/pseudo_wrappers.c:12:1: warning: control reaches end of non-void function [-Wreturn-type] 12 | } | ^ These errors appear to be related to libc compatibility issues. The pseudo recipe in meta-nxp-desktop currently has COMPATIBLE_HOST:libc-musl = 'null' which suggests it's not compatible with musl libc, but the errors occur even on a glibc system. I've tried several approaches: Adding -D_STAT_VER=1 -D_MKNOD_VER=1 to CFLAGS Creating patches to define these constants in the appropriate files Disabling -Werror flags Setting INHERIT_remove = "pseudo" in local.conf None of these approaches have resolved the issue completely. Has anyone encountered similar issues with the meta-nxp-desktop layer? Is there a known workaround or fix for this pseudo compilation error? System information: Host OS: Ubuntu 22.04 Yocto version: Langdale (4.1) meta-nxp-desktop commit/version: imx-6.1.1-1.0.0_desktop.xml i.MX 8M | i.MX 8M Mini | i.MX 8M Nano Re: Build error with pseudo in meta-nxp-desktop layer on IMX8MP The support for imx-image-desktop was stopped, instead of that, please use Debian and have a reference to NXPDEBIAN  Regards Harvey
View full article
NXP RTOS Tresos code generation error Hello, While trying to generate the code for the configuration I preapred in Tresos, I've got the following errors related to OS module: I'm using the EB tresos 29.3.0 and S32K3xx_M7_NXP_RTOS_4_7_184_CODEDROP_0_4_3_D2411. The project is configured for S32K312 MCU. Do you know where should I define that 'NS_PER_SW_TICK' attribute? Or do you know if there is another error which is masked? Re: NXP RTOS Tresos code generation error Hello, Looking at the example project I can see: I have never worked with this NXP OS, but I can see the timer is chosen in General setting of OS plugin: Have a detailed look at the example codes which are part of OS plugin. Best regards, Peter Re: NXP RTOS Tresos code generation error Thank you for reply. The problems view window is empty: Maybe the problem comes from that "GPT not supportet" part. But I don't understand where should I choose OSINTERNAL driver instead of GPT. These are the only configuration parameters I have in OsCounter: Re: NXP RTOS Tresos code generation error Hello, I expect that it is some parameter in OS plugin as manual express: But I do not se it in OsCounter I have created. You can click on the issue to be linked on missing definition in Tresos. If you open problem view you can link directly to missing definition like: Best regards, Peter
View full article
i.MX7DのPCIE_REFCLKOUT_P/Nの生成方法 PCIE_REFCLKOUT_P/Nから出力されるクロック波形の振幅は600mVppです。 この波形の振幅を大きくしたいと思います。 PCIE_REFCLKIN_P/Nには900mVppの外部クロック波形が入力されます。 PCIE_REFCLKOUT_P/Nから出力される波形は、REFCLK_SELがHighでもLowでも変わりません。 以下のことを教えてください。 ※リファレンスマニュアルにはPCIE_REFCLKOUT_P/Nのブロック図はありません。教えてもらえますか? ※クロック波形出力の入力信号REFCLK_SEL PCIE_REFCLKOUT_P/Nから変更することはできますか? ※REFCLK_SELをハイにすると、PCIE_REFCLKOUT_P/Nから出力されるクロック波形はPCIE_REFCLKIN_P/Nから生成されますか? ※SoC内部のクロックバッファは波形の振幅を制限していますか? Re:i.MX7DのPCIE_REFCLKOUT_P/Nの生成方法 PCIE_REFCLKIN_P/NがPCIE_REFCLKOUT_P/Nのソースになる可能性があり、波形は制限されることがわかりました。 よろしくお願いいたします。
View full article
i.MXRT1062 和 IS25WX256 八进制闪存的问题 再会, 我们正在开发一款将 MIMXRT1062DVL6B 与 IS25WX256-JHLE 闪存结合使用的产品。这是一块定制板,但我们已经验证,从闪存启动可以使用基本 LED 闪烁固件,并通过 USB 使用 NXP MCU BootUtility v6.2.0 进行闪存。 我们将设备型号设置为“ISSI_OctalSPI_IS25LXxxx_IS25WXxxx”,并且仅更改频率30 MHz。 现在我们继续开发,遇到了两个不同的问题: 1:ROM 引导加载程序拒绝启动大于 128KiB 的映像 小于 128K 的固件启动没有问题,但是任何大于 128K 的固件都无法启动(附加调试器显示只有来自 ROM 区域的代码正在运行)。 我们通过简单的更改来排除其他问题: 我们将 boot_data 中的“长度”字段修补为 128K 以下的数字: boot_data at 0x60001020 uint32_t start uint32_t length <-- Only patched this from 200K to 30K! uint32_t plugin 然后,尽管固件实际上更大,但它仍可以顺利启动!固件可以毫无问题地访问闪存中 128K 以上的区域。 所以现在我们可以启动更大的图像,但这感觉像是一次糟糕的破解。有什么问题? 2:通过 J-Link 进行烧写不起作用 能够使用 J-Link 和 Ozone 调试器进行闪存将极大地帮助开发。 我们如何才能让这一切顺利进行? 我们已经尝试过 SEGGER 和 RT-UFL 的内置闪存加载器。 我在这里更详细地描述了这个问题: https://github.com/JayHeng/RT-UFL/issues/16 i.MXRT 106x 回复:i.MXRT1062 和 IS25WX256 八进制闪存的问题 好吧,我已经从头开始编写了一个最小的闪存加载器,它似乎可以运行。 对于其他人找到此主题的要点: 使用 ROM API 之前,应通过 RESET# 引脚重置闪存芯片!RT-UFL 不执行此操作。 ROM API(fsl_romapi.h)效果很好!从 NXP MCU 启动实用程序中获取 option0 值,它立即起作用,擦除/编程/显示在 0x60000000 等。 在测试闪存加载程序时,我有时会收到“准备目标后,目标系统的 PC 具有意外值(PC = 0x00000000)!”,不知道为什么。我开始使用 RT-UFL 的 ufl_init_hardware_imxrt106x()(而不是 BOARD_InitBootClocks() 等),它解决了这个问题。可能是代码大小问题或与我的工具链(zig toolchain/clang/lld)有关。 按照 wiki.segger.com/SEGGER_Flash_Loader 上的说明了解如何设置链接器中的各个部分等。请注意,这使用与 RT-UFL(CMSIS 加载器 API)不同的功能,但其他功能相同。SEGGER API 的速度明显更快,因为它可以在一次函数调用中编程/擦除多个扇区。他们提到了一些二进制,但对我来说没有它也可以工作。 开发自己的闪存加载器很烦人,但至少您可以对其进行定制,使闪存加载器闪烁电路板上的 LED,甚至在 UART 上输出内容以帮助调试它。 对于我的固件映像,我复制了 NXP MCU Boot Uility 生成的 8KiB 启动头(FCFB...)并将其放在 .text 的前面通过链接器部分。因此,我可以使用 J-Link 只使用 .elf 文件来刷新空板文件。 还要在 SEGGER_FL_Restore() 中重置闪存芯片,以便 ROM 引导加载程序正确启动(也可以在 JLinkScript 中执行此操作)。 启动 flashloader 的基本代码: serial_nor_config_option_t option; option.option0.U = 0xC0603001; option.option1.U = 0; // NOTE(robin): Reset the flash chip as it may be in an invalid state. BOARD_INITPINS_FLASH_RST_GPIO->DR_CLEAR = BOARD_INITPINS_FLASH_RST_PIN_MASK; for(volatile int i = 0; i < 1000; ++i) {} BOARD_INITPINS_FLASH_RST_GPIO->DR_SET = BOARD_INITPINS_FLASH_RST_PIN_MASK; for(volatile int i = 0; i < 1000; ++i) {} status_t volatile status = ROM_FLEXSPI_NorFlash_GetConfig(0, &flashConfig, &option); if(status == kStatus_Success) { status = ROM_FLEXSPI_NorFlash_Init(0, &flashConfig); if(status == kStatus_Success) { // Go nuts } } 回复:i.MXRT1062 和 IS25WX256 八进制闪存的问题 谢谢你的链接。 那么,明确地说,这就是我应该得到的吗? 在 J-Link 弹出窗口中,比较填充至 100%,但无法清除: Device "MIMXRT1062_OCTAL" selected. Found SW-DP with ID 0x0BD11477 DPIDR: 0x0BD11477 CoreSight SoC-400 or earlier Scanning AP map to find all available APs AP[1]: Stopped AP scan as end of AP map has been reached AP[0]: AHB-AP (IDR: 0x04770041) Iterating through AP map to find AHB-AP to use AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FD000 CPUID register: 0x411FC271. Implementer code: 0x41 (ARM) Cache: L1 I/D-cache present Found Cortex-M7 r1p1, Little endian. FPUnit: 8 code (BP) slots and 0 literal slots CoreSight components: ROMTbl[0] @ E00FD000 [0][0]: E00FE000 CID B105100D PID 000BB4C8 ROM Table ROMTbl[1] @ E00FE000 [1][0]: E00FF000 CID B105100D PID 000BB4C7 ROM Table ROMTbl[2] @ E00FF000 [2][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7 [2][1]: E0001000 CID B105E00D PID 000BB002 DWT [2][2]: E0002000 CID B105E00D PID 000BB00E FPB-M7 [2][3]: E0000000 CID B105E00D PID 000BB001 ITM [1][1]: E0041000 CID B105900D PID 001BB975 ETM-M7 [1][2]: E0042000 CID B105900D PID 004BB906 CTI [0][1]: E0040000 CID B105900D PID 000BB9A9 TPIU-M7 [0][2]: E0043000 CID B105F00D PID 001BB101 TSG I-Cache L1: 32 KB, 512 Sets, 32 Bytes/Line, 2-Way D-Cache L1: 32 KB, 256 Sets, 32 Bytes/Line, 4-Way Connected to target device. J-Link/J-Trace serial number: 601014830 Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via AIRCR.SYSRESETREQ. Failed to erase sectors. 我也尝试了 MIMXRT1060_UFL_L0,得到了相同的结果。 我感觉我需要自己构建 RT-UFL 才能正确调试它。遗憾的是,它的构建系统似乎依赖于 Keil MDK 或 IAR,而这些都是我们不使用的付费解决方案。所以我需要先转换它。
View full article
Driver Monitoring System on I.MX8MPlus Hello, We're planing to utilize DMS on i.MX8M. We've checked the example application on i.MX93 demo within this youtube link. Can we utilize similar application on our host I.MX8MP? Are there any guide for this? Can we use the AI libraries used for this application on i.MX8MP? Could you please share any related documents? Thanks! Best Regards! Re: Driver Monitoring System on I.MX8MPlus Hi @Wobaffet! Thank you for contacting NXP Support! The Driving Monitoring System is an example of our Demo Experience, this demo runs in NPU on iMX8MP and iMX93. You can see more about of our demos in our github and those demos are installed in our image for our boards (iMX8MP-EVK, iMX93-EVK and FRDM-IMX93). Best Regards! Chavira
View full article
S32K3xx - Use of PTE13 as GPIO. Last Mile regulator base control enable bit=0 I'm testing a board with S32K344-Q172 microcontroller. I want to use PTE13 pin as GPIO141.  I have disabled the last mile regulator base control. For that option I have tried these two ways:   Using both configuration options I still have fixed 3V on that pin (number 11) Thank you Re: S32K3xx - Use of PTE13 as GPIO. Last Mile regulator base control enable bit=0 As a response to your questions: I am using an own design electronic board and yes, I am measuring PTE13 with a multimeter. Following your suggestion, when reading PMC_CONFIG[LMBCTLEN] I have realised that it was not 0 so I wonder why the configuration done with the configuration tool was not working correctly (see screenshot on my previous post). As an alternative, now I manually reset that bit in the register and now I successfuly measure 0 Volts on that pin. Thank you. Re: S32K3xx - Use of PTE13 as GPIO. Last Mile regulator base control enable bit=0 Hi Which board are you using? If it is EVB, please check the J31 jumper setting. Did you measure the voltage on the PTE13 pin using a multimeter? Did you confirm the value of PMC_CONFIG[LMBCTLEN]=0 when debugging? Import Siul2_Port_Ip_Example_S32K344 example and select PTE13 as GPIO output in S32 Configuration Tool. Will the pin output low by calling Siul2_Dio_Ip_WritePin(GPIO141_PORT, GPIO141_PIN, 0U); ? Sorry I didn't bring my multimeter and development board today, so it's not convenient for me to test it. Best Regards, Robin ------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you! - We are following threads for 7 weeks after the last post, later replies are ignored Please open a new thread and refer to the closed one, if you have a related question at a later point in time. -------------------------------------------------------------------------------
View full article
LA1224RDB-B FreeRTOS PCIe Driver RC-EP I am trying to realize communication of LA12xx devices via PCIe link. The LA12xx (1) PCIe RC controller is connected to the PCIe EP controller of the LA12xx controller (2) using an M4 board that supports PCIe Gen3 speed (the LA1224-RDB-B board is used). (BSP Appendix D). I set the appropriate DIP switches. Built FreeRTOS with PCIe Driver BSP 2.4. The link does not go up. LTSSM in Poll_comp 0x3 state on both RC and EP. SW6[3] = 1 SW4[5-7] = 0x2 (010) SW5[5] = 1 RC 0 EP. What can be the reason? Same code and wiring diagram, but EP - Xilinx FPGA - get link-up. Re: LA1224RDB-B FreeRTOS PCIe Driver RC-EP The problem was the circuitry part. Thank you all for the answers! Re: LA1224RDB-B FreeRTOS PCIe Driver RC-EP Hello! We are connecting PCIe2 on LA(1) as RC to PCIe2 on LA(2) initialized as EP. We make the connection according to Appendix D of BSP 3.0. In the diagram, the ports associated with the LX are highlighted in black on each RDB. (ignore the color of the arrows). Settings DIP-Switch: On LA1 SW5[5]=1.(RC) On LA2 SW5[5]=0.(EP) SW6[3]=1 on both boards.(SD_MUX_SEL). SW4[5-7]=010 ( corresponds to x4, CFG_SD_PRTCL=2). Re: LA1224RDB-B FreeRTOS PCIe Driver RC-EP Hello, Something doesn't make sense in your block diagram:   The LA1224 only have 2 pcie controllers, pcie1 only can be configures as EP so how are you connecting the LX2160A as RC to the LA as EP and also connecting the LA as RC(pcie2 controller) to the same LA EP(pcie1)? Re: LA1224RDB-B FreeRTOS PCIe Driver RC-EP Good afternoon, thank you for your response! I connected as EP device - Xilinx Kintex FPGA and got successful connection. So I rule out the problem on the RC device side. I am also attaching a schematic block diagram. Thank you for your help. Re: LA1224RDB-B FreeRTOS PCIe Driver RC-EP Hello. Please share a block diagram of the connections, also try to connect any other device as PCIe EP to discard any issue from the RC configuration side. Regards
View full article
UJA1169 pin VEXCC without external PNP Hi, I need to know if pin VEXCC of UJA1169 it's mandatory to be connected at pin V1 in the configuration without external PNP. Regards, Francesco. Re: UJA1169 pin VEXCC without external PNP Hello, This is a recommendation. In normal application use cases where no external PNP transistor is used, VEXCC should be connected to V1. However, if VEXCC is left open, there will be no impact on the functionality of the application.
View full article
How PCIE_REFCLKOUT_P/N of i.MX7D is generated The amplitude of the clock waveform output from PCIE_REFCLKOUT_P/N is 600mVpp. I would like to increase the amplitude of this waveform. An external clock waveform of 900 mVpp is input to PCIE_REFCLKIN_P/N. The waveform output from PCIE_REFCLKOUT_P/N does not change whether REFCLK_SEL is set to High or Low. Please tell me the following. * There is no block diagram of PCIE_REFCLKOUT_P/N in the ReferenceManual. Is it possible for you to tell me? * Does REFCLK_SEL change the input signal of the clock waveform output from PCIE_REFCLKOUT_P/N? * If I set REFCLK_SEL high, will the clock waveform output from PCIE_REFCLKOUT_P/N be generated from PCIE_REFCLKIN_P/N? * Does the clock buffer inside the SoC limit the amplitude of the waveform? Re: How PCIE_REFCLKOUT_P/N of i.MX7D is generated I found that PCIE_REFCLKIN_P/N can be the source of PCIE_REFCLKOUT_P/N, and waveform is limited. Best regards. Re: How PCIE_REFCLKOUT_P/N of i.MX7D is generated Hello, 1 - We do not have a block diagram representation for differential PCIE_REFCLKOUT generation in analog side. The clock source can be consulted in clock tree of reference manual and is selected according to the next diagram: 2 - Yes, when driven high, REFCLK_EXT is the reference clock of PHY. 3 - As mentioned before, when driven high, REFCLK_EXT (Internal Reference Clock Input) is the reference clock of PHY. 4 - Yes, that is correct. Best regards.
View full article
i.MX8M Nano Secure Boot(HABv4) Additional Image Signing CSF.txt Source, Verification Index issue  Hi Team,   We have an IMX8M Nano board. We have successfully enabled the HABv4 feature on this board and also signed the bootloader kernel and DTB file using the NXP code signing tool  & below. bin and keys.   SRK_1_2_3_4_table.bin CSF1_1_sha256_2048_65537_v3_usr_crt.pem IMG1_1_sha256_2048_65537_v3_usr_crt.pem   It is working fine.   In kernel signing, we have used the below keys:   SRK_1_2_3_4_table.bin CSF2_1_sha256_2048_65537_v3_usr_crt.pem IMG2_1_sha256_2048_65537_v3_usr_crt.pem   Below HAB events occur,     Authenticate image from DDR location 0x40480000...   Secure boot disabled   HAB Configuration: 0xf0, HAB State: 0x66   --------- HAB Event 1 ----------------- event data: 0xdb 0x00 0x14 0x45 0x33 0x0f 0xc0 0x00 0xbe 0x00 0x0c 0x00 0x03 0x17 0x01 0x00 0x00 0x00 0x00 0x38   STS = HAB_FAILURE (0x33) RSN = HAB_INV_INDEX (0x0F) CTX = HAB_CTX_COMMAND (0xC0) ENG = HAB_ENG_ANY (0x00)     --------- HAB Event 2 ----------------- event data: 0xdb 0x00 0x14 0x45 0x33 0x0c 0xa0 0x00 0x00 0x00 0x00 0x00 0x41 0x53 0x00 0x00 0x00 0x00 0x00 0x20   STS = HAB_FAILURE (0x33) RSN = HAB_INV_ASSERTION (0x0C) CTX = HAB_CTX_ASSERT (0xA0) ENG = HAB_ENG_ANY (0x00)     --------- HAB Event 3 ----------------- event data: 0xdb 0x00 0x14 0x45 0x33 0x0c 0xa0 0x00 0x00 0x00 0x00 0x00 0x40 0x48 0x00 0x00 0x00 0x00 0x00 0x04   STS = HAB_FAILURE (0x33) RSN = HAB_INV_ASSERTION (0x0C) CTX = HAB_CTX_ASSERT (0xA0) ENG = HAB_ENG_ANY (0x00)     NOTE: We have referred to the CST User Manual to update keys and source index, as well as the verification index, but it still occurs HAB events.     Please find the working csf.txt and non-working csf.txt files for your reference.   Kindly help us.     Thanks,   i.MX 8 Family | i.MX 8QuadMax (8QM) | 8QuadPlus i.MX 8M | i.MX 8M Mini | i.MX 8M Nano Re: i.MX8M Nano Secure Boot(HABv4) Additional Image Signing CSF.txt Source, Verification Index issue Thanks @Harvey021  Re: i.MX8M Nano Secure Boot(HABv4) Additional Image Signing CSF.txt Source, Verification Index issue Hi, The keys for both bootloader and kernel should be consistent. Regards Harvey
View full article
i.MX7D的PCIE_REFCLKOUT_P/N是如何生成的 PCIE_REFCLKOUT_P/N输出的时钟波形幅度为600mVpp。 我想增加这个波形的振幅。 900 mVpp 的外部时钟波形输入到 PCIE_REFCLKIN_P/N。 无论 REFCLK_SEL 设置为高还是低,PCIE_REFCLKOUT_P/N 输出的波形都不会改变。 请告诉我以下内容。 * ReferenceManual中没有PCIE_REFCLKOUT_P/N的框图。你能告诉我嗎? * REFCLK_SEL是否会改变PCIE_REFCLKOUT_P/N输出的时钟波形的输入信号? * 如果我将 REFCLK_SEL 设置为高电平,那么从 PCIE_REFCLKOUT_P/N 输出的时钟波形是否会从 PCIE_REFCLKIN_P/N 生成? * SoC 内部的时钟缓冲器是否会限制波形的幅度? 回复:如何生成i.MX7D的PCIE_REFCLKOUT_P/N 我发现 PCIE_REFCLKIN_P/N 可以作为 PCIE_REFCLKOUT_P/N 的来源,并且波形受到限制。 顺祝商祺!
View full article
无法理解这一点 RM 我不太理解 RT1060 参考手册第 3 版中关于 LPSPI FRAMESZ 的描述(见截图)。 因此,之前它说 LPSPI 字长是 32 位,而我没有看到它的任何配置,那么它怎么会说最小字长是 2 位呢? 声明不支持 33 位的帧大小 - 是否只是这个值,33 位,某种程度上是特殊的,或者任何其他 (n * wordsize) + 1 也是(fe65 或 97 帧大小?) 提前致谢! i.MXRT 106x 回复:无法理解 RM 的这个部分 嗨,是的,现在这是有意义的 - 所以它是不完整单词的最小单词大小,它是框架中的最后一个单词。我相信如果你在这个或其他 RM 中有这个声明,最好用不同的词语来表达它,这样更容易理解 多谢! 回复:无法理解 RM 的这个部分 哈哈哈,笑话!欢迎来到现代“文献”的奇妙世界,您的选择要么是“缺失/不完整”,要么是“写得太糟糕以至于几乎无法理解”。 天哪,我多么怀念摩托罗拉时代的文档。从那时起,一切都开始走下坡路。
View full article
RT1170 EVK app won't run on an EVKB Even the dead-simple iled_blinky demo app built with the EVK SDK won't load and run on an EVKB.  Why? And most importantly, how can I re-target apps build with the EVK SDK to the EVKB SDK. Thanks very much. Re: RT1170 EVK app won't run on an EVKB Thank you VERY much! It seems to be back in business. Re: RT1170 EVK app won't run on an EVKB Hi @Littell , Thanks you for your updated information. If you want to use the SPT or other tools, you neet to use these steps: 1. Board enter the serial download mode SW1:1-OFF,2-OFF,3-OFF,4-ON SW2:0000000000 2. Find another USB cable to connect the J20, then you can use the mcubootutility to connect it https://github.com/JayHeng/NXP-MCUBootUtility/releases/tag/v6.2.0 the related user manual is: https://github.com/JayHeng/NXP-MCUBootUtility This is the connection result: You can find it is connected, please also try it on your side. Then mass erase use this one: Please try it on your side. If yu still have issues, you may need to check, whether your board have issues or not, or you modify the fuse bit or not. Best Regards, kerry Re: RT1170 EVK app won't run on an EVKB The SPT was unable to pass even the "Test Connection". Re: RT1170 EVK app won't run on an EVKB Hi, Kerry!  Thank you for the quick reply.  Unfortunately the IDE Mass Erase resulted in the following error: Flash Driver V.2 startup failed - rc Ef(34): Timed-out initializing flash. chip initialization failed - Ef(34): Timed-out initializing flash. failed to initialize flash driver MIMXRT1170_SFDP_QSPI.cfx ( 65) Chip Setup Complete (100) Target Operation Failed Unable to perform operation! Command failed with exit code 1 I guess I should try the SPT Mass Erase now... Thanks, Dave Re: RT1170 EVK app won't run on an EVKB Hi @Littell ,   Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you. 1. please use the following link to do the mass erase at first: https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/RT-board-recovery-for-debugger-connect-issues/ta-p/1635260 2. To the MIMXRT1170-EVKB, please download the EVKB related SDK, and import the code from the EVKB SDK: https://mcuxpresso.nxp.com/en/builder?hw=MIMXRT1170-EVKB 3. About the EVK and EVKB, the used QSPI flash is different, so the XIP FCB have difference. This is the EVK flexspi_nor_config.c #define FLASH_DUMMY_CYCLES 0x09 #define FLASH_DUMMY_VALUE 0x09 const flexspi_nor_config_t qspiflash_config = { .memConfig = { .tag = FLEXSPI_CFG_BLK_TAG, .version = FLEXSPI_CFG_BLK_VERSION, .readSampleClksrc=kFlexSPIReadSampleClk_LoopbackFromDqsPad, .csHoldTime = 3u, .csSetupTime = 3u, // Enable DDR mode, Wordaddassable, Safe configuration, Differential clock .controllerMiscOption = 0x10, .deviceType = kFlexSpiDeviceType_SerialNOR, .sflashPadType = kSerialFlash_4Pads, .serialClkFreq = kFlexSpiSerialClk_133MHz, .sflashA1Size = 16u * 1024u * 1024u, /* Enable flash configuration feature */ .configCmdEnable = 1u, .configModeType[0] = kDeviceConfigCmdType_Generic, /* Set configuration command sequences */ .configCmdSeqs[0] = { .seqNum = 1, .seqId = 12, .reserved = 0, }, /* Prepare setting value for Read Register in flash */ .configCmdArgs[0] = (FLASH_DUMMY_VALUE << 3), .lookupTable = { // Read LUTs [0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18), [1] = FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, FLASH_DUMMY_CYCLES, READ_SDR, FLEXSPI_4PAD, 0x04), // Read Status LUTs [4 * 1 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x05, READ_SDR, FLEXSPI_1PAD, 0x04), // Write Enable LUTs [4 * 3 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x06, STOP, FLEXSPI_1PAD, 0x0), // Erase Sector LUTs [4 * 5 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x20, RADDR_SDR, FLEXSPI_1PAD, 0x18), // Erase Block LUTs [4 * 8 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xD8, RADDR_SDR, FLEXSPI_1PAD, 0x18), // Pape Program LUTs [4 * 9 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x02, RADDR_SDR, FLEXSPI_1PAD, 0x18), [4 * 9 + 1] = FLEXSPI_LUT_SEQ(WRITE_SDR, FLEXSPI_1PAD, 0x04, STOP, FLEXSPI_1PAD, 0x0), // Erase Chip LUTs [4 * 11 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x60, STOP, FLEXSPI_1PAD, 0x0), // Set Read Register LUTs [4 * 12 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xC0, WRITE_SDR, FLEXSPI_1PAD, 0x01), [4 * 12 + 1] = FLEXSPI_LUT_SEQ(STOP, FLEXSPI_1PAD, 0x00, 0, 0, 0), }, }, .pageSize = 256u, .sectorSize = 4u * 1024u, .ipcmdSerialClkFreq = 0x1, .blockSize = 64u * 1024u, .isUniformBlockSize = false, }; This is the EVKB flexspi_nor_config.c #define FLASH_DUMMY_CYCLES 0x08 #define FLASH_DUMMY_VALUE 0x03 const flexspi_nor_config_t qspiflash_config = { .memConfig = { .tag = FLEXSPI_CFG_BLK_TAG, .version = FLEXSPI_CFG_BLK_VERSION, .readSampleClksrc=kFlexSPIReadSampleClk_LoopbackFromDqsPad, .csHoldTime = 3u, .csSetupTime = 3u, // Enable DDR mode, Wordaddassable, Safe configuration, Differential clock .controllerMiscOption = 0x10, .deviceType = kFlexSpiDeviceType_SerialNOR, .sflashPadType = kSerialFlash_4Pads, .serialClkFreq = kFlexSpiSerialClk_133MHz, .sflashA1Size = 64u * 1024u * 1024u, /* Enable flash configuration feature */ .configCmdEnable = 1u, .configModeType[0] = kDeviceConfigCmdType_Generic, /* Set configuration command sequences */ .configCmdSeqs[0] = { .seqNum = 1, .seqId = 12, .reserved = 0, }, /* Prepare setting value for Read Register in flash */ .configCmdArgs[0] = (FLASH_DUMMY_VALUE << 4), .lookupTable = { // Read LUTs [0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEC, RADDR_SDR, FLEXSPI_4PAD, 0x20), [1] = FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, FLASH_DUMMY_CYCLES, READ_SDR, FLEXSPI_4PAD, 0x04), // Read Status LUTs [4 * 1 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x05, READ_SDR, FLEXSPI_1PAD, 0x04), // Write Enable LUTs [4 * 3 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x06, STOP, FLEXSPI_1PAD, 0x0), // Erase Sector LUTs [4 * 5 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x21, RADDR_SDR, FLEXSPI_1PAD, 0x20), // Erase Block LUTs [4 * 8 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xD8, RADDR_SDR, FLEXSPI_1PAD, 0x18), // Pape Program LUTs [4 * 9 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x12, RADDR_SDR, FLEXSPI_1PAD, 0x20), [4 * 9 + 1] = FLEXSPI_LUT_SEQ(WRITE_SDR, FLEXSPI_1PAD, 0x04, STOP, FLEXSPI_1PAD, 0x0), // Erase Chip LUTs [4 * 11 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x60, STOP, FLEXSPI_1PAD, 0x0), // Set Read Register LUTs [4 * 12 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xC0, WRITE_SDR, FLEXSPI_1PAD, 0x01), [4 * 12 + 1] = FLEXSPI_LUT_SEQ(STOP, FLEXSPI_1PAD, 0x00, 0, 0, 0), }, }, .pageSize = 256u, .sectorSize = 4u * 1024u, .ipcmdSerialClkFreq = 0x1, .blockSize = 64u * 1024u, .isUniformBlockSize = false, }; You can see, the LUT, the dummy cycle have difference. So, if you want to use the EVK demo to download to the EVKB, you need to modify the flexspi_nor_config.c code to the EVKB code. In fact, I suggest you use the EVKB SDK directly, that will be more easy to you. Wish it helps you! If you still have quesiton about it, please kindly let me know. If your question is solved, please help me to mark the correct answer to this case, just to close it. Any new issues, welcome to create the new case, thanks. Best Regards, Kerry
View full article
RMのこのビットを理解できません RT1060リファレンスマニュアルrev.3のLPSPI FRAMESZの説明が少し理解できません(スクリーンショットを参照) したがって、以前はLPSPIのワードサイズが32ビットであると表示されていましたが、その構成は見当たらないので、最小のワードサイズが2ビットであるとどのように表示されますか。 33ビットのフレームサイズがサポートされていないというステートメント - それはこの値だけなのか、33ビットなのか、どういうわけか特別なのか、それとも他のもの(n * wordsize)+ 1も(f.e.65フレームサイズか97フレームサイズか? よろしくお願いします! i.MXRT 106倍 Re:RMのこのビットを理解できません こんにちは、はい、これは理にかなっています-したがって、フレーム内の最後の単語である不完全な単語の最小ワードサイズです。このステートメントや他のRMにこのステートメントがある場合は、何らかの方法で別の単語で表現すると、取得しやすくなると思います どうもありがとうございます! Re:RMのこのビットを理解できません ハハハ、なんて冗談でしょう!現代の「ドキュメンテーション」の素晴らしい世界へようこそ、あなたの選択は「欠落している/不完全」であるか、「事実上理解できないほどひどく書かれている」かのどちらかです。 親愛なる神よ、私はモトローラ時代のドキュメントが恋しいです。それ以来、すべてが下り坂です。
View full article
Debugging Issue with Custom Board using i.MX RT1021 and W25Q80DV Flash Hello NXP Community, I am currently working on a custom board that uses an i.MX RT1021 (iMXRT1021CAF4B) and a W25Q80DV Flash, connected on the same pin as the one on the EVK, with XIP code. I am encountering an issue when trying to debug my project via JTAG using an NXP MCU-Link. When I start debugging MCUXpresso never reach the main() and if I suspend the debugger, I receive the following message: “Break at address ‘0x215a90’ with no debug information available, or outside of program code.” whit always the same address. Here is my configuration object for the flexspi_nor_config.c file: /* FLEXSPI memory config block related defintions */ #define FLEXSPI_CFG_BLK_TAG (0x42464346UL) // ascii "FCFB" Big Endian #define FLEXSPI_CFG_BLK_VERSION (0x56010400UL) // V1.4.0 #define FLEXSPI_CFG_BLK_SIZE (512) const flexspi_nor_config_t qspiflash_config = { .memConfig = { .tag = FLEXSPI_CFG_BLK_TAG, .version = FLEXSPI_CFG_BLK_VERSION, .readSampleClksrc=kFlexSPIReadSampleClk_LoopbackInternally, .csHoldTime = 3u, .csSetupTime = 3u, .deviceModeCfgEnable = true, .deviceModeType = kDeviceConfigCmdType_QuadEnable, .deviceModeSeq = { .seqNum = 1, .seqId = 4, }, .deviceModeArg = 0x40, // Set QE bit in status register .controllerMiscOption = 0u, .deviceType = kFlexSpiDeviceType_SerialNOR, .sflashPadType = kSerialFlash_4Pads, .serialClkFreq = kFlexSpiSerialClk_80MHz, .lutCustomSeqEnable = 0u, .lookupTable = { [0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18), // Fast Read Quad I/O [1] = FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04), [4] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x05, READ_SDR, FLEXSPI_1PAD, 0x01), // Read Status Register [8] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x06, STOP, FLEXSPI_1PAD, 0x00), // Write Enable [12] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x20, RADDR_SDR, FLEXSPI_1PAD, 0x18), // Erase Sector [16] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x02, RADDR_SDR, FLEXSPI_1PAD, 0x18), // Page Program [17] = FLEXSPI_LUT_SEQ(WRITE_SDR, FLEXSPI_1PAD, 0x04, STOP, FLEXSPI_1PAD, 0x00), [20] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x31, WRITE_SDR, FLEXSPI_1PAD, 0x01), // Set QE bit in status register }, }, .pageSize = 256u, .sectorSize = 4 * 1024u, .blockSize = 64 * 1024u, .isUniformBlockSize = false, }; I would appreciate any guidance or suggestions on how to resolve this issue. Thank you in advance for your help. Best,  Salvatore Re: Debugging Issue with Custom Board using i.MX RT1021 and W25Q80DV Flash Solved thanks to this links: - https://community.st.com/t5/stm32-mcus-products/stm32h563vi-octo-spi-interface-dummy-cycles/td-p/581689 - https://github.com/Masmiseim36/iMXRT/blob/master/targets/iMXRT/Loader2/FlexSPI_Winbond.h Re: Debugging Issue with Custom Board using i.MX RT1021 and W25Q80DV Flash Hello, could someone please provide a more detailed explanation of these NOR flash parameters? I’m unable to devise a solution to this problem without specifically using the flash chip from the evaluation board. Re: Debugging Issue with Custom Board using i.MX RT1021 and W25Q80DV Flash Hi @diego_charles, I just realized that I responded incorrectly to your last post. Can I ask you if you can help me with the information that I didn’t understand (In the previous post in bold)? Thanks Re: Debugging Issue with Custom Board using i.MX RT1021 and W25Q80DV Flash Hi @diego_charles, thanks for your reply.  here is the SRC Register: I was also having trouble with the BOOT_MODE[1:0] pins, because i didn't know about the BT_FUSE_SEL and i was stuck in Serial Downloader... this post helped me understanding: Programming the i.MXRT1021 - how hard can it be? | Details | Hackaday.io About the LUT in general and specific for my memory, I found this relevant posts, which (i think) pointed in the right direction:  Solved: Re: Booting from FlexSPI NOR Flash vs FlexSPI LUT - NXP Community Solved: Re: IMXRT1176 construct of FLEXSPI LUT entry - NXP Community which lead me to this link: iMXRT/targets/iMXRT/Loader2/FlexSPI_Winbond.h at master · Masmiseim36/iMXRT · GitHub I read again the AN12183.pdf and now I understood why in this screen there was only 1 LUT sequences (the QUAD-READ)  Then I tried to arrange a test using "Flexspi_nor_polling_transfer" demo code, loaded in internal RAM, for finding the correct LUT for my memory and I came up with a strange behaviour (project attached)... using the following LUTs: const uint32_t customLUT[CUSTOM_LUT_LENGTH] = { /* Normal read mode -SDR */ /* Normal read mode -SDR */ [4 * NOR_CMD_LUT_SEQ_IDX_READ_NORMAL] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x03, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_1PAD, 0x18), [4 * NOR_CMD_LUT_SEQ_IDX_READ_NORMAL + 1] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0), /* Fast read mode - SDR */ [4 * NOR_CMD_LUT_SEQ_IDX_READ_FAST] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x0B, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_1PAD, 0x18), /* In XIP, the speed of external flash is set to 133MHz, and the external flash require to match 8 corresponding dummy cycles. * However, other non XIP boot targets are not suitable for XIP boot flow, uses flash default configuration */ #if defined(XIP_BOOT_HEADER_ENABLE) && XIP_BOOT_HEADER_ENABLE [4 * NOR_CMD_LUT_SEQ_IDX_READ_FAST + 1] = FLEXSPI_LUT_SEQ( kFLEXSPI_Command_DUMMY_SDR, kFLEXSPI_1PAD, 0x0A, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 0x04), #else [4 * NOR_CMD_LUT_SEQ_IDX_READ_FAST + 1] = FLEXSPI_LUT_SEQ( kFLEXSPI_Command_DUMMY_SDR, kFLEXSPI_1PAD, 0x08, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 0x04), #endif /* Fast read quad mode - SDR */ [4 * NOR_CMD_LUT_SEQ_IDX_READ_FAST_QUAD] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0xEB, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_4PAD, 0x18), #if defined(XIP_BOOT_HEADER_ENABLE) && XIP_BOOT_HEADER_ENABLE [4 * NOR_CMD_LUT_SEQ_IDX_READ_FAST_QUAD + 1] = FLEXSPI_LUT_SEQ( kFLEXSPI_Command_DUMMY_SDR, kFLEXSPI_4PAD, 0x08, kFLEXSPI_Command_READ_SDR, kFLEXSPI_4PAD, 0x04), #else [4 * NOR_CMD_LUT_SEQ_IDX_READ_FAST_QUAD + 1] = FLEXSPI_LUT_SEQ( kFLEXSPI_Command_DUMMY_SDR, kFLEXSPI_4PAD, 0x06, kFLEXSPI_Command_READ_SDR, kFLEXSPI_4PAD, 0x04), #endif /* Read extend parameters */ [4 * NOR_CMD_LUT_SEQ_IDX_READSTATUS] = //FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x81, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 0x04), FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x05, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 0x04), /* Write Enable - OK */ [4 * NOR_CMD_LUT_SEQ_IDX_WRITEENABLE] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x06, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0), /* Erase Sector - OK */ [4 * NOR_CMD_LUT_SEQ_IDX_ERASESECTOR] = //FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0xD7, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_1PAD, 0x18), FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x20, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_1PAD, 0x18), /* Page Program - single mode - OK */ [4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_SINGLE] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x02, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_1PAD, 0x18), [4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_SINGLE + 1] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_WRITE_SDR, kFLEXSPI_1PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0), /* Page Program - quad mode - OK */ [4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_QUAD] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x32, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_1PAD, 0x18), [4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_QUAD + 1] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_WRITE_SDR, kFLEXSPI_4PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0), /* Read ID */ [4 * NOR_CMD_LUT_SEQ_IDX_READID] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x9F, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 0x04), /* Enable Quad mode - OK*/ [4 * NOR_CMD_LUT_SEQ_IDX_WRITESTATUSREG] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x01, kFLEXSPI_Command_WRITE_SDR, kFLEXSPI_1PAD, 0x04), /* Enter QPI mode */ [4 * NOR_CMD_LUT_SEQ_IDX_ENTERQPI] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x35, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0), /* Exit QPI mode */ [4 * NOR_CMD_LUT_SEQ_IDX_EXITQPI] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0xF5, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0), /* Read status(1) register - OK */ [4 * NOR_CMD_LUT_SEQ_IDX_READSTATUSREG] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x05, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 0x04), /* Read status(2) register - OK */ [4 * NOR_CMD_LUT_SEQ_IDX_READSTATUSREG2] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x35, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD, 0x04), /* Erase whole chip - OK*/ [4 * NOR_CMD_LUT_SEQ_IDX_ERASECHIP] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0xC7, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0), }; with this App.h:  /* * Copyright 2021 NXP * All rights reserved. * * * SPDX-License-Identifier: BSD-3-Clause */ #ifndef _APP_H_ #define _APP_H_ /******************************************************************************* * Definitions ******************************************************************************/ /*${macro:start}*/ #define EXAMPLE_FLEXSPI FLEXSPI #define FLASH_SIZE 0x100000 /* 1MByte */ #define EXAMPLE_FLEXSPI_AMBA_BASE FlexSPI_AMBA_BASE #define FLASH_PAGE_SIZE 256 #define EXAMPLE_SECTOR 6 //6 #define SECTOR_SIZE 0x1000 /* 4K */ #define EXAMPLE_FLEXSPI_CLOCK kCLOCK_FlexSpi #define FLASH_PORT kFLEXSPI_PortA1 #define EXAMPLE_FLEXSPI_RX_SAMPLE_CLOCK kFLEXSPI_ReadSampleClkLoopbackInternally //kFLEXSPI_ReadSampleClkLoopbackFromDqsPad #define NOR_CMD_LUT_SEQ_IDX_READ_NORMAL 7 #define NOR_CMD_LUT_SEQ_IDX_READ_FAST 14 #define NOR_CMD_LUT_SEQ_IDX_READ_FAST_QUAD 0 #define NOR_CMD_LUT_SEQ_IDX_READSTATUS 1 #define NOR_CMD_LUT_SEQ_IDX_WRITEENABLE 2 #define NOR_CMD_LUT_SEQ_IDX_ERASESECTOR 3 #define NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_SINGLE 6 #define NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_QUAD 4 #define NOR_CMD_LUT_SEQ_IDX_READID 8 #define NOR_CMD_LUT_SEQ_IDX_WRITESTATUSREG 9 #define NOR_CMD_LUT_SEQ_IDX_ENTERQPI 10 #define NOR_CMD_LUT_SEQ_IDX_EXITQPI 11 #define NOR_CMD_LUT_SEQ_IDX_READSTATUSREG 12 #define NOR_CMD_LUT_SEQ_IDX_READSTATUSREG2 13 #define NOR_CMD_LUT_SEQ_IDX_ERASECHIP 5 #define CUSTOM_LUT_LENGTH 60 #define FLASH_QUAD_ENABLE 0x200 //0x40 #define FLASH_BUSY_STATUS_POL 1 #define FLASH_BUSY_STATUS_OFFSET 0 #define FLASH_ERROR_STATUS_MASK 0x0e /* * If cache is enabled, this example should maintain the cache to make sure * CPU core accesses the memory, not cache only. */ #define CACHE_MAINTAIN 1 /*${macro:end}*/ /******************************************************************************* * Variables ******************************************************************************/ /*${variable:start}*/ #if (defined CACHE_MAINTAIN) && (CACHE_MAINTAIN == 1) typedef struct _flexspi_cache_status { volatile bool DCacheEnableFlag; volatile bool ICacheEnableFlag; } flexspi_cache_status_t; #endif /*${variable:end}*/ /******************************************************************************* * Prototypes ******************************************************************************/ /*${prototype:start}*/ void BOARD_InitHardware(void); static inline void flexspi_clock_init() { #if defined(XIP_EXTERNAL_FLASH) && (XIP_EXTERNAL_FLASH == 1) /* Switch to PLL2 for XIP to avoid hardfault during re-initialize clock. */ CLOCK_InitSysPfd(kCLOCK_Pfd2, 24); /* Set PLL2 PFD2 clock 396MHZ. */ CLOCK_SetMux(kCLOCK_FlexspiMux, 0x2); /* Choose PLL2 PFD2 clock as flexspi source clock. */ CLOCK_SetDiv(kCLOCK_FlexspiDiv, 3); /* flexspi clock 133M. */ #else const clock_usb_pll_config_t g_ccmConfigUsbPll = {.loopDivider = 0U}; CLOCK_InitUsb1Pll(&g_ccmConfigUsbPll); CLOCK_InitUsb1Pfd(kCLOCK_Pfd0, 24); /* Set PLL3 PFD0 clock 360MHZ. */ CLOCK_SetMux(kCLOCK_FlexspiMux, 0x3); /* Choose PLL3 PFD0 clock as flexspi source clock. */ CLOCK_SetDiv(kCLOCK_FlexspiDiv, 2); /* flexspi clock 120M. */ #endif } /*${prototype:end}*/ #endif /* _APP_H_ */ Based on this information found in the flash datasheet:  And modifying the main() as this:  int main(void) { uint32_t i = 0; status_t status; uint8_t vendorID = 0; uint8_t statusReg = 0; BOARD_ConfigMPU(); BOARD_InitBootPins(); BOARD_InitBootClocks(); BOARD_InitDebugConsole(); 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 status = flexspi_nor_flash_read_status(EXAMPLE_FLEXSPI, &statusReg); if (status != kStatus_Success) { PRINTF("ERROR getting status reg...\r\n"); } else { PRINTF("STATUS REG = 0x%02x\r\n", statusReg); } status = flexspi_nor_flash_read_status2(EXAMPLE_FLEXSPI, &statusReg); if (status != kStatus_Success) { PRINTF("ERROR getting status reg...\r\n"); } else { PRINTF("STATUS REG 2 = 0x%02x\r\n", statusReg); } /* Enter quad mode. */ status = flexspi_nor_enable_quad_mode(EXAMPLE_FLEXSPI); if (status != kStatus_Success) { return status; } else { PRINTF("Quad Mode enabled succesfully! \r\n\r\n"); } /* 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_flash_read(EXAMPLE_FLEXSPI, (EXAMPLE_SECTOR * SECTOR_SIZE)-1, (uint32_t *)(void *)s_nor_read_buffer, FLASH_PAGE_SIZE); if (status != kStatus_Success) { PRINTF("Page READ failure !\r\n"); return -1; } if (memcmp(s_nor_read_buffer, s_nor_program_buffer, sizeof(s_nor_program_buffer)) != 0) { PRINTF("Program READ 2 - read out data value incorrect !\r\n"); return -1; } else { PRINTF("Program data 2 - successfully. \r\n"); } while (1) { } } I obtain the following output: FLEXSPI example started! Vendor ID: 0xef STATUS REG = 0x 2 STATUS REG 2 = 0x 2 Quad Mode enabled succesfully! Erasing Serial NOR over FlexSPI... Erase data - successfully. Program data - read out data value incorrect ! Program data 2 - successfully. I had to add the "Program data 2" check, using a READ LUT (instead of the memcpy) and adding a "-1" to the address, because the first one, with memcpy, failed the check, because it was missing the first byte and instead had one more byte at the end. I logged this adding a PRINTF in the fsl_flexspi.c READ and WRITE blocking functions:  status_t FLEXSPI_WriteBlocking(FLEXSPI_Type *base, uint8_t *buffer, size_t size) { ... /* Write watermark level data into tx fifo . */ if (size >= 8U * txWatermark) { for (i = 0U; i < 2U * txWatermark; i++) { base->TFDR[i] = *(uint32_t *)(void *)buffer; PRINTF("BUFFER TX[%d]: 0x%04x \r\n", i, *(uint32_t *)(void *)buffer); buffer += 4U; } size = size - 8U * txWatermark; } else { /* Write word aligned data into tx fifo. */ for (i = 0U; i < (size / 4U); i++) { base->TFDR[i] = *(uint32_t *)(void *)buffer; PRINTF("else BUFFER TX[%d]: 0x%02x \r\n", i, buffer[i]); buffer += 4U; } ... } status_t FLEXSPI_ReadBlocking(FLEXSPI_Type *base, uint8_t *buffer, size_t size) { ... /* Read watermark level data from rx fifo. */ if (size >= 8U * rxWatermark) { for (i = 0U; i < 2U * rxWatermark; i++) { *(uint32_t *)(void *)buffer = base->RFDR[i]; PRINTF("<-- BUFFER RX[%d]: 0x%04x \r\n", i, *(uint32_t *)(void *)buffer); buffer += 4U; } size = size - 8U * rxWatermark; } ... } here are the logs: BUFFER TX[0]: 0x3020100 <--- 0x00 is the first byte in WRITE BUFFER TX[1]: 0x7060504 BUFFER TX[0]: 0xb0a0908 BUFFER TX[1]: 0xf0e0d0c BUFFER TX[0]: 0x13121110 BUFFER TX[1]: 0x17161514 BUFFER TX[0]: 0x1b1a1918 BUFFER TX[1]: 0x1f1e1d1c BUFFER TX[0]: 0x23222120 BUFFER TX[1]: 0x27262524 BUFFER TX[0]: 0x2b2a2928 BUFFER TX[1]: 0x2f2e2d2c BUFFER TX[0]: 0x33323130 BUFFER TX[1]: 0x37363534 BUFFER TX[0]: 0x3b3a3938 BUFFER TX[1]: 0x3f3e3d3c BUFFER TX[0]: 0x43424140 BUFFER TX[1]: 0x47464544 BUFFER TX[0]: 0x4b4a4948 BUFFER TX[1]: 0x4f4e4d4c BUFFER TX[0]: 0x53525150 BUFFER TX[1]: 0x57565554 BUFFER TX[0]: 0x5b5a5958 BUFFER TX[1]: 0x5f5e5d5c BUFFER TX[0]: 0x63626160 BUFFER TX[1]: 0x67666564 BUFFER TX[0]: 0x6b6a6968 BUFFER TX[1]: 0x6f6e6d6c BUFFER TX[0]: 0x73727170 BUFFER TX[1]: 0x77767574 BUFFER TX[0]: 0x7b7a7978 BUFFER TX[1]: 0x7f7e7d7c BUFFER TX[0]: 0x83828180 BUFFER TX[1]: 0x87868584 BUFFER TX[0]: 0x8b8a8988 BUFFER TX[1]: 0x8f8e8d8c BUFFER TX[0]: 0x93929190 BUFFER TX[1]: 0x97969594 BUFFER TX[0]: 0x9b9a9998 BUFFER TX[1]: 0x9f9e9d9c BUFFER TX[0]: 0xa3a2a1a0 BUFFER TX[1]: 0xa7a6a5a4 BUFFER TX[0]: 0xabaaa9a8 BUFFER TX[1]: 0xafaeadac BUFFER TX[0]: 0xb3b2b1b0 BUFFER TX[1]: 0xb7b6b5b4 BUFFER TX[0]: 0xbbbab9b8 BUFFER TX[1]: 0xbfbebdbc BUFFER TX[0]: 0xc3c2c1c0 BUFFER TX[1]: 0xc7c6c5c4 BUFFER TX[0]: 0xcbcac9c8 BUFFER TX[1]: 0xcfcecdcc BUFFER TX[0]: 0xd3d2d1d0 BUFFER TX[1]: 0xd7d6d5d4 BUFFER TX[0]: 0xdbdad9d8 BUFFER TX[1]: 0xdfdedddc BUFFER TX[0]: 0xe3e2e1e0 BUFFER TX[1]: 0xe7e6e5e4 BUFFER TX[0]: 0xebeae9e8 BUFFER TX[1]: 0xefeeedec BUFFER TX[0]: 0xf3f2f1f0 BUFFER TX[1]: 0xf7f6f5f4 BUFFER TX[0]: 0xfbfaf9f8 BUFFER TX[1]: 0xfffefdfc <-- BUFFER RX[0]: 0x4030201 <--- 0x01 is the first byte in READ <-- BUFFER RX[1]: 0x8070605 <-- BUFFER RX[0]: 0xc0b0a09 <-- BUFFER RX[1]: 0x100f0e0d <-- BUFFER RX[0]: 0x14131211 <-- BUFFER RX[1]: 0x18171615 <-- BUFFER RX[0]: 0x1c1b1a19 <-- BUFFER RX[1]: 0x201f1e1d <-- BUFFER RX[0]: 0x24232221 <-- BUFFER RX[1]: 0x28272625 <-- BUFFER RX[0]: 0x2c2b2a29 <-- BUFFER RX[1]: 0x302f2e2d <-- BUFFER RX[0]: 0x34333231 <-- BUFFER RX[1]: 0x38373635 <-- BUFFER RX[0]: 0x3c3b3a39 <-- BUFFER RX[1]: 0x403f3e3d <-- BUFFER RX[0]: 0x44434241 <-- BUFFER RX[1]: 0x48474645 <-- BUFFER RX[0]: 0x4c4b4a49 <-- BUFFER RX[1]: 0x504f4e4d <-- BUFFER RX[0]: 0x54535251 <-- BUFFER RX[1]: 0x58575655 <-- BUFFER RX[0]: 0x5c5b5a59 <-- BUFFER RX[1]: 0x605f5e5d <-- BUFFER RX[0]: 0x64636261 <-- BUFFER RX[1]: 0x68676665 <-- BUFFER RX[0]: 0x6c6b6a69 <-- BUFFER RX[1]: 0x706f6e6d <-- BUFFER RX[0]: 0x74737271 <-- BUFFER RX[1]: 0x78777675 <-- BUFFER RX[0]: 0x7c7b7a79 <-- BUFFER RX[1]: 0x807f7e7d <-- BUFFER RX[0]: 0x84838281 <-- BUFFER RX[1]: 0x88878685 <-- BUFFER RX[0]: 0x8c8b8a89 <-- BUFFER RX[1]: 0x908f8e8d <-- BUFFER RX[0]: 0x94939291 <-- BUFFER RX[1]: 0x98979695 <-- BUFFER RX[0]: 0x9c9b9a99 <-- BUFFER RX[1]: 0xa09f9e9d <-- BUFFER RX[0]: 0xa4a3a2a1 <-- BUFFER RX[1]: 0xa8a7a6a5 <-- BUFFER RX[0]: 0xacabaaa9 <-- BUFFER RX[1]: 0xb0afaead <-- BUFFER RX[0]: 0xb4b3b2b1 <-- BUFFER RX[1]: 0xb8b7b6b5 <-- BUFFER RX[0]: 0xbcbbbab9 <-- BUFFER RX[1]: 0xc0bfbebd <-- BUFFER RX[0]: 0xc4c3c2c1 <-- BUFFER RX[1]: 0xc8c7c6c5 <-- BUFFER RX[0]: 0xcccbcac9 <-- BUFFER RX[1]: 0xd0cfcecd <-- BUFFER RX[0]: 0xd4d3d2d1 <-- BUFFER RX[1]: 0xd8d7d6d5 <-- BUFFER RX[0]: 0xdcdbdad9 <-- BUFFER RX[1]: 0xe0dfdedd <-- BUFFER RX[0]: 0xe4e3e2e1 <-- BUFFER RX[1]: 0xe8e7e6e5 <-- BUFFER RX[0]: 0xecebeae9 <-- BUFFER RX[1]: 0xf0efeeed <-- BUFFER RX[0]: 0xf4f3f2f1 <-- BUFFER RX[1]: 0xf8f7f6f5 <-- BUFFER RX[0]: 0xfcfbfaf9 <-- BUFFER RX[1]: 0xfffffefd <--- 0xff is read twice (the block was erased) Why is this happening? I also tried to change the numbers of dummy cycles without any effect.  Why I need to add a -1 in the address of the read instruction for having the correct data back?  In the while i also tried to redo a new version of the evkmimxrt1020_flexspi_nor_config.c, for my project, with the new information, hoping there was enough (I tried also the commented values): #define FLASH_DUMMY_CYCLES_QUAD 0x04 //0x08 //0x06 #define ADDRESS_24BIT 0x18 #define UNKNOWN_READ_PARAM 0x04 // #define FLASH_DUMMY_VALUE 0x02 const flexspi_nor_config_t qspiflash_config = { .memConfig = { .tag = FLEXSPI_CFG_BLK_TAG, .version = FLEXSPI_CFG_BLK_VERSION, .readSampleClksrc=kFlexSPIReadSampleClk_LoopbackFromDqsPad, .csHoldTime = 3u, .csSetupTime = 3u, .controllerMiscOption = 0, //(1u << kFlexSpiMiscOffset_SafeConfigFreqEnable), .deviceType = kFlexSpiDeviceType_SerialNOR, .sflashPadType = kSerialFlash_4Pads, .serialClkFreq = kFlexSpiSerialClk_80MHz, //kFlexSpiSerialClk_100MHz //kFlexSpiSerialClk_30MHz .sflashA1Size = 1u * 1024u * 1024u, /* Enable flash configuration feature */ //.configCmdEnable = 1u, //.configModeType[0] = kDeviceConfigCmdType_QuadEnable, // kDeviceConfigCmdType_Generic, /* Set configuration command sequences */ /*.configCmdSeqs[0] = { .seqNum = 1, .seqId = 12, .reserved = 0, },*/ /* Prepare setting value for Read Register in flash */ //.configCmdArgs[0] = 0x40, //((FLASH_DUMMY_VALUE << 3) | 0xE0), .lookupTable = { // Read (Fast Read Quad I/O) FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, ADDRESS_24BIT), FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, FLASH_DUMMY_CYCLES_QUAD, READ_SDR, FLEXSPI_4PAD, UNKNOWN_READ_PARAM), // READ Normal //FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x03, RADDR_SDR, FLEXSPI_1PAD, 0x18), //FLEXSPI_LUT_SEQ(READ_SDR, FLEXSPI_1PAD, 0x04, STOP, FLEXSPI_1PAD, 0), }, }, .pageSize = 256u, .sectorSize = 4u * 1024u, .ipcmdSerialClkFreq = 1u, .blockSize = 64u * 1024u, .isUniformBlockSize = false, }; but ended up with this situation, still not working but with different behavior, because now i see some different address in the registers: but from the oscilloscope, i can see that the flash SCLK line, starts at 30MHz and then goes up to 80MHz as expected, then after a short amount, it stops clocking.   The only things i still don't understand about the LUT is the last param in the READ LUT, 0x04, which i defined as "UNKNOWN_READ_PARAM" in my code abobe. What is the meaning of this parameter? For completeness of information, I also report what I have modified to reorganize the flexRAM of the device (in case this was the cause of the problem): fsl_flexspi_nor_boot.c /* * Copyright 2017-2020 NXP * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include "fsl_flexspi_nor_boot.h" /* Relocating Flex-RAM */ extern void ResetISR(void); /* Component ID definition, used by tools. */ #ifndef FSL_COMPONENT_ID #define FSL_COMPONENT_ID "platform.drivers.xip_device" #endif #if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1) #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) __attribute__((section(".boot_hdr.ivt"), used)) #elif defined(__ICCARM__) #pragma location = ".boot_hdr.ivt" #endif /************************************* * IVT Data *************************************/ const ivt image_vector_table = { IVT_HEADER, /* IVT Header */ //IMAGE_ENTRY_ADDRESS, /* Image Entry Function */ (uint32_t)ResetISR, /* Image Entry Function */ IVT_RSVD, /* Reserved = 0 */ (uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */ (uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */ (uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */ (uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */ IVT_RSVD /* Reserved = 0 */ }; #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) __attribute__((section(".boot_hdr.boot_data"), used)) #elif defined(__ICCARM__) #pragma location = ".boot_hdr.boot_data" #endif /************************************* * Boot Data *************************************/ const BOOT_DATA_T g_boot_data = { FLASH_BASE, /* boot start location */ FLASH_SIZE, /* size */ PLUGIN_FLAG, /* Plugin flag*/ 0xFFFFFFFFU /* empty - extra data word */ }; #endif startup_mimxrt1021.c (ResetISR) ... //***************************************************************************** // Reset entry point for your code. // Sets up a simple runtime environment and initializes the C/C++ // library. //***************************************************************************** __attribute__ ((naked, section(".after_vectors.reset"))) void ResetISR(void) { // Disable interrupts __asm volatile ("cpsid i"); //__asm volatile ("MSR MSP, %0" : : "r" (&_vStackTop) : ); /* Reallocating the FlexRAM */ /* https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Reallocating-the-FlexRAM/ta-p/1117649 * DTC=192KB, ITC=0KB, OC=64KB * {O,O,D,D,D,D,D,D} * LSB --------> MSB * * {10,10,10,10,10,10,01,01} * MSB ---------------> LSB */ __asm (".syntax unified\n" "LDR R0, =0x2002fffc\n"//load initial value of stack pointer into R0 = ultima locazione usabile della stack mem "MSR MSP,R0\n" //re-initialize stack pointer by new value "LDR R0, =0x400ac044\n"//Address of register IOMUXC_GPR_GPR17 "LDR R1, =0xaaa5\n"//FlexRAM configuration DTC = 192KB, ITC = 0KB, OC = 64KB "STR R1,[R0]\n" "LDR R0,=0x400ac040\n"//Address of register IOMUXC_GPR_GPR16 "LDR R1,[R0]\n" "ORR R1,R1,#4\n"//The 4 corresponds to setting the FLEXRAM_BANK_CFG_SEL bit in register IOMUXC_GPR_GPR16 "STR R1,[R0]\n" ".syntax divided\n"); #if defined (__USE_CMSIS) ...​ board.c (MPU Settings) ... /* MPU configuration. */ void BOARD_ConfigMPU(void) { /* Disable I cache and D cache */ if (SCB_CCR_IC_Msk == (SCB_CCR_IC_Msk & SCB->CCR)) { SCB_DisableICache(); } if (SCB_CCR_DC_Msk == (SCB_CCR_DC_Msk & SCB->CCR)) { SCB_DisableDCache(); } /* Disable MPU */ ARM_MPU_Disable(); /* MPU configure: * Use ARM_MPU_RASR(DisableExec, AccessPermission, TypeExtField, IsShareable, IsCacheable, IsBufferable, * SubRegionDisable, Size) * API in mpu_armv7.h. * param DisableExec Instruction access (XN) disable bit,0=instruction fetches enabled, 1=instruction fetches * disabled. * param AccessPermission Data access permissions, allows you to configure read/write access for User and * Privileged mode. * Use MACROS defined in mpu_armv7.h: * ARM_MPU_AP_NONE/ARM_MPU_AP_PRIV/ARM_MPU_AP_URO/ARM_MPU_AP_FULL/ARM_MPU_AP_PRO/ARM_MPU_AP_RO * Combine TypeExtField/IsShareable/IsCacheable/IsBufferable to configure MPU memory access attributes. * TypeExtField IsShareable IsCacheable IsBufferable Memory Attribute Shareability Cache * 0 x 0 0 Strongly Ordered shareable * 0 x 0 1 Device shareable * 0 0 1 0 Normal not shareable Outer and inner write * through no write allocate * 0 0 1 1 Normal not shareable Outer and inner write * back no write allocate * 0 1 1 0 Normal shareable Outer and inner write * through no write allocate * 0 1 1 1 Normal shareable Outer and inner write * back no write allocate * 1 0 0 0 Normal not shareable outer and inner * noncache * 1 1 0 0 Normal shareable outer and inner * noncache * 1 0 1 1 Normal not shareable outer and inner write * back write/read acllocate * 1 1 1 1 Normal shareable outer and inner write * back write/read acllocate * 2 x 0 0 Device not shareable * Above are normal use settings, if your want to see more details or want to config different inner/outter cache * policy. * please refer to Table 4-55 /4-56 in arm cortex-M7 generic user guide * param SubRegionDisable Sub-region disable field. 0=sub-region is enabled, 1=sub-region is disabled. * param Size Region size of the region to be configured. use ARM_MPU_REGION_SIZE_xxx MACRO in * mpu_armv7.h. */ /* * Add default region to deny access to whole address space to workaround speculative prefetch. * Refer to Arm errata 1013783-B for more details. * */ /* Region 0 setting: Instruction access disabled, No data access permission. */ MPU->RBAR = ARM_MPU_RBAR(0, 0x00000000U); MPU->RASR = ARM_MPU_RASR(1, ARM_MPU_AP_NONE, 0, 0, 0, 0, 0, ARM_MPU_REGION_SIZE_4GB); /* Region 1 setting: Memory with Device type, not shareable, non-cacheable. */ MPU->RBAR = ARM_MPU_RBAR(1, 0x80000000U); MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 2, 0, 0, 0, 0, ARM_MPU_REGION_SIZE_512MB); /* Region 2 setting: Memory with Device type, not shareable, non-cacheable. */ MPU->RBAR = ARM_MPU_RBAR(2, 0x60000000U); MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 2, 0, 0, 0, 0, ARM_MPU_REGION_SIZE_512MB); #if defined(XIP_EXTERNAL_FLASH) && (XIP_EXTERNAL_FLASH == 1) /* Region 3 setting: Memory with Normal type, not shareable, outer/inner write back. */ MPU->RBAR = ARM_MPU_RBAR(3, 0x60000000U); MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_RO, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_1MB); #endif /* Region 4 setting: Memory with Device type, not shareable, non-cacheable. */ MPU->RBAR = ARM_MPU_RBAR(4, 0x00000000U); MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 2, 0, 0, 0, 0, ARM_MPU_REGION_SIZE_1GB); /* ********************** * Relocating Flex-RAM * https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Reallocating-the-FlexRAM/ta-p/1117649 * https://community.nxp.com/t5/i-MX-Processors/RT1021-reallocate-FlexRAM/m-p/1667222#M207407 * ********************** */ /* Region 5 setting: Memory with Normal type, not shareable, outer/inner write back */ /* ITC Memory */ MPU->RBAR = ARM_MPU_RBAR(5, 0x00000000U); MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, 0); /* Region 6 setting: Memory with Normal type, not shareable, outer/inner write back */ /* DTC Memory */ MPU->RBAR = ARM_MPU_RBAR(6, 0x20000000U); MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_256KB); /* Region 7 setting: Memory with Normal type, not shareable, outer/inner write back */ /* OC Memory */ MPU->RBAR = ARM_MPU_RBAR(7, 0x20200000U); MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_64KB); /************************/ /* Region 8 setting: Memory with Normal type, not shareable, outer/inner write back */ MPU->RBAR = ARM_MPU_RBAR(8, 0x80000000U); MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_32MB); /* Region 10 setting: Memory with Device type, not shareable, non-cacheable */ MPU->RBAR = ARM_MPU_RBAR(10, 0x40000000); MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 2, 0, 0, 0, 0, ARM_MPU_REGION_SIZE_4MB); /* Enable MPU */ ARM_MPU_Enable(MPU_CTRL_PRIVDEFENA_Msk); /* Enable I cache and D cache */ SCB_EnableDCache(); SCB_EnableICache(); } ...​ I believe I am close to the solution, I hope this information will be useful to understand what is not working… thanks in advance to everyone! Re: Debugging Issue with Custom Board using i.MX RT1021 and W25Q80DV Flash Hi @salva214  Thank you for effort adding this extra information! What is the value of the boot mode and boot config in the  SRC register? Please check this register via debug in the MCUXpresso IDE. Diego Re: Debugging Issue with Custom Board using i.MX RT1021 and W25Q80DV Flash Hello everyone, I have some additional information to share. While searching online for similar cases, I came across several threads discussing this issue. However, there seems to be limited documentation from NXP on this topic. Many of these threads suggest using the MCUXpresso Secure Provisioning tool or the MCU Boot Utility (which I am already familiar with), but none of these methods have allowed me to run my code. Here are some of the links I found: - Solved: XIP from QSPI NOR Flash on MIMXRT1062 - NXP Community - RT1050 evkb Unable to download and debug QSPI Flash - NXP Community - How to Enable Debugging for FLEXSPI NOR Flash (nxp.com) Here are the steps I followed: Establish a connection with the ROM bootloader. Find a valid NOR flash configuration and verify it. Produce a bootable image of the NOR flash configuration and write it. Build and write everything to the MCU. Read back the memory and verify it. At this point, if I reboot with BOOT[1:0] = 0b00, nothing happens. The device is neither in ROM bootloader mode (as I can no longer see it via the MCU Boot Utility) nor is it running. I also cannot debug the code via MCUXpresso, as I consistently end up in the same situation. Here is my Memory configuration, which works on the EVK: Note: I need more DTC (192K) than ITC RAM (0 needed, but 4 is because otherwise MCUXpresso gives me an error), allowing the OC to be the minimum allowed (64K) And here are my Preprocessor directives (-D): I hope this information provides more detail than before. Thank you in advance!
View full article
Having trouble debugging wm8962 on i.mx 6ull I am debugging the wm8962 audio chip on the i.mx 6ull, and now I don't know why there is no sound from either the headphones or the speaker. By observing the log, it seems that there is a problem with the configuration of sai2. However, I have connected these pins of sai2 to the wm8960 audio chip and confirmed that there is no problem. Now I need to check whether there is a problem with my device tree configuration or the hardware device? And here is my imx-fire-sound-wm8962-overlay.dts /* * Copyright (C) 2019 - All Rights Reserved by * filename : imx-fire-mpu6050-overlay.dts * brief : Device Tree overlay for EBF6ull Pro mpu6050 device * author : embedfire * date : 2019-11-26 * version : A001 */ #include "../imx6ul-pinfunc.h" #include "../imx6ull-pinfunc.h" #include "dt-bindings/clock/imx6ul-clock.h" /dts-v1/; /plugin/; / { fragment@1 { target = <&i2c1>; __overlay__ { clock_frequency = <100000>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c1>; status = "okay"; #address-cells = <1>; #size-cells = <0>; codec: wm8962@1a { compatible = "wlf,wm8962"; reg = <0x1a>; clocks = <&clks IMX6UL_CLK_SAI2>; clock-names = "mclk"; wlf,shared-lrclk; // wlf,dc-servo-disable; DCVDD-supply = <&dcvdd_reg>; DBVDD-supply = <&dbvdd_reg>; AVDD-supply = <&avdd_reg>; CPVDD-supply = <&cpvdd_reg>; MICVDD-supply = <&micvdd_reg>; PLLVDD-supply = <&pllvdd_reg>; SPKVDD1-supply = <&spkvdd1_reg>; SPKVDD2-supply = <&spkvdd2_reg>; amic-mono; }; }; }; fragment@2{ target-path="/"; __overlay__{ sound { compatible = "fsl,imx6ul-evk-wm8962", "fsl,imx-audio-wm8962"; model = "wm8962-audio"; cpu-dai = <&sai2>; audio-codec = <&codec>; asrc-controller = <&asrc>; gpr = <&gpr 4 0x100000 0x100000>; /* * hp-det = ; * hp-det-pin: JD1 JD2 or JD3 * hp-det-polarity = 0: hp detect high for headphone * hp-det-polarity = 1: hp detect high for speaker */ // hp-det = ❤️ 1>; /*hp-det-gpios = <&gpio5 4 0>; mic-det-gpios = <&gpio5 4 0>;*/ audio-routing = "Headphone Jack", "HPOUTL", "Headphone Jack", "HPOUTR", "Ext Spk", "SPKOUTL", "Ext Spk", "SPKOUTR", "AMIC", "MICBIAS", "DMIC", "MICBIAS", "DMICDAT", "DMIC", "Playback", "CPU-Playback", "CPU-Capture", "Capture"; status = "okay"; }; }; }; fragment@3{ target=<&iomuxc>; __overlay__ { pinctrl_i2c1: i2c1grp { fsl,pins = < MX6UL_PAD_UART4_TX_DATA__I2C1_SCL 0x4001b8b0 MX6UL_PAD_UART4_RX_DATA__I2C1_SDA 0x4001b8b0 >; }; pinctrl_sai2: sai2grp { fsl,pins = < MX6UL_PAD_JTAG_TDI__SAI2_TX_BCLK 0x17088 MX6UL_PAD_JTAG_TDO__SAI2_TX_SYNC 0x17088 MX6UL_PAD_JTAG_TRST_B__SAI2_TX_DATA 0x11088 MX6UL_PAD_JTAG_TCK__SAI2_RX_DATA 0x11088 MX6UL_PAD_JTAG_TMS__SAI2_MCLK 0x17088 >; }; }; }; fragment@4 { target=<&sai2>; __overlay__{ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai2>; /*&pinctrl_sai2_hp_det_b>;*/ assigned-clocks = <&clks IMX6UL_CLK_SAI2_SEL>, <&clks IMX6UL_CLK_SAI2>; assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>; assigned-clock-rates = <0>, <12288000>; status = "okay"; }; }; }; The log: loglog The hardware connection: hardware connectionhardware connection If you need more details, please tell me that. Thanks. i.MX6 All Linux Re: Having trouble debugging wm8962 on i.mx 6ull Your suggestion played a substantial role in my registration failure error, and also reminded me of the alias problem. The above error no longer appears, but now there is a problem with playing music. I think it is probably a problem with my hardware. I will check the WM8962 module problem myself. Thank you for your help. The following figure shows the changes I made to the main device tree and the device tree overlay. I hope it can be used as a reference when others encounter this problem in the future. main device treemain device tree device tree overlaydevice tree overlay play errorplay error Re: Having trouble debugging wm8962 on i.mx 6ull Hello, I suggest you use our device tree as reference: linux-imx/arch/arm/boot/dts/nxp/imx/imx6ull-9x9-evk.dts at 37d02f4dcbbe6677dc9f5fc17f386c05d6a7bd7a · nxp-imx/linux-imx I see that you are not using mclk property to use it as output in SAI2 node, please check if this helps with your design. I do not see issues in hardware connections. Best regards.
View full article
Override a wks.in partition file I have an imx8mp board. I created a custom image based on the imx-image-core. The image uses the `imx-imx-boot-bootpart.wks.in` partition file to set the drive. I modified it to add a home partition. However I would like to create my own wks.in file since I don't have control over the `imx-imx-boot-bootpart.wks.in` file. For .bb files you can fo .bbappend. How do you do it for wks.in files? I tried adding this "WKS_FILE="imx-image-custom-imx8mp.wks.in" to the imx-image-custom.bb file but no luck i.MX 8 Family | i.MX 8QuadMax (8QM) | 8QuadPlus Linux Yocto Project Re: Override a wks.in partition file @jimmychanI followed your suggestion but I still wasn't able to make it work. I ended up using "WKS_FILES="imx-image-custom-imx8mp.wks.in". That extra "S" made the difference. Re: Override a wks.in partition file FYI. https://stackoverflow.com/questions/64049094/override-wks-file-for-sd-partition-layout
View full article