Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
Fs26 keeps mcu(s32k344-wb) in sleep mode. Hi, Some time ago i've uploaded the S32k3_wb_f26 example to the whiteboard. It worked! I could press buttons to toggle sleep mode. But then I pressed the wrong button(s). And now I can't wake up my whiteboard ( S32K344-WB)  My board looked like this; for the jumpers. You can also check the led on the board. If I measure the FS26_VLDO1 on J7 (pin2), I get 5.0v(So the FS26 is powering LDO1). When removing the Jumper on J89. The following lights up  But then the MCU reset(JTAG_RST(PTA5_MCU_RESETB)) keeps high. Even when pulled low(by pressing the SW1 btn)? When measuring RSTB on the FS26 its at a low level; same as for the FS0B, which states it is in error mode? (nr off errors exceeds allowed number of errors). Re: Fs26 keeps mcu(s32k344-wb) in sleep mode. Yea you're right... VCC2_5V0 is pulling 0.8A. And the FS26 gets really hot.  thnx for the help. Re: Fs26 keeps mcu(s32k344-wb) in sleep mode. As long as VDD_HV_A is connected to FS26_VLDO1, D11 is off. I'm afraid that VDD_HV_A consumes too much current (maybe S32K3 is damaged), causing the FS26_VLDO1 voltage to drop and D11 to turn off. It is recommended to measure the FS26_VLDO1 voltage. Or measure the current consumed by VDD_HV_A through J89 to see if it is too large. Re: Fs26 keeps mcu(s32k344-wb) in sleep mode. 1. I was testing Standby mode. 2. LED1(D28 PTF8) and LED2(D29 PTF9) are always off. Even when rebooting. 3. Yes, ive got an 12V 1A power supply. (i dont turn on the HB200X) 4. When measuring pin 2 of J7 i get 5V. TP2 does generate an interrupt.   Re: Fs26 keeps mcu(s32k344-wb) in sleep mode. Hi Please read the description of this demo application. Connect the wires as described below. 1. STANDBY mode or LPOFF mode test? 2. After power-on, MCU is normal running. Then user need push button SW3(WB) to trigger entry of Standby mode or LPOFF mode depending on MACRO definition. If you do not press SW3, what is the status of LED1(D28 PTF8) and LED2(D29 PTF9)? I see that the program turns off LED1(D28 PTF8) and LED2(D29 PTF9) to indicate MCU enters Standby only after pressing SW3. 3. Did you apply 12v and then turn on the switch SW10? 4. Strange, I don't see D11 light up red. According to what you said, FS26_VLDO1 has measured 5V from J7 or J89. 5. Do not remove J89, this power the VDD_HV_A which is used to support standby mode. 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
S32K311 Bootloader Code Example Similar to Shared Link Hi , I'm currently working on a project using the NXP S32K311 and I'm looking for a bootloader code example for this MCU. I came across a useful implementation elsewhere, and I'm trying to find something similar here on the NXP Community or through official resources. The following link is the project I used. Unified bootloader Demo - NXP Community Specifically, I'm looking for: A working bootloader for S32K311 (preferably CAN-based) Any guidance or documentation related to flash routines, Memory layout and linker configuration (for application and bootloader), or security handling in bootloader Proper clock configuration (for system/core/peripherals) Correct pin initialization (especially for UART/CAN interfaces used for communication) Startup/initialization issues to watch for (e.g., ITCM, MPU, etc.) If anyone has worked on something similar or can point me to a shared project, SDK example, or GitHub repo, I’d really appreciate it. Thanks in advance for your help! Re: S32K311 Bootloader Code Example Similar to Shared Link Hi @DiaDev, There are some examples for S32K312 for a bootloader to application jump in this post: Example S32K312 Bootloader to Application Jump DS3.5 RTD300 - NXP Community. But as far as I know, the unified bootloader is the only example with CAN support. There are no examples specifically for the S32K311, since we need to test them in our evaluation boards, but the S32K312 derivative is fairly similar, the Unified Bootloader and the examples I shared previously both support the S32K312. You must port the example over to the S32K311 yourself. If you have any issues while implementing CAN or the bootloader, you can ask in the community and we will help you. But, if you have questions about the application itself, you can contact the owner through their GitHub page: GitHub - ecubus/EcuBus-Pro: A powerful automotive ECU development tool. UDS, CAN-TP, DOIP, LIN , Script(TS) like CAPL, HIL Test. Best regards, Julián
View full article
imx8M mini Quad LPDDR4 Yocto project Hi  I tried to build the image for Myir JX8MMA7 based on imx8m Mini quad, following the users guide i.MX Yocto Project User's Guide (nxp.com.cn) revision 6.6.3. But there is something wrong with checksum. i.MX 8M | i.MX 8M Mini | i.MX 8M Nano Re: imx8M mini Quad LPDDR4 Yocto project this fetch error is related to the network, pls check your network or firewall and try again, sometimes you need try to download more times
View full article
S32G3内存支持列表 嗨,恩智浦的同事们 我看到数据表中的 S32G3 支持 DDR ,NOR Flash 和 EMMC,但您能否提供经过兼容性测试的 DDR 和其他存储器的列表? 如果市场上任何符合 LPDDR4 协议的 DRAM 都可以与最大密度为 4GB 的 S32G3 连接,您是否没有进行过适应性测试? 期待回复。 谢谢! 回复:S32G3内存支持列表 ----这个不太常规,虽然LPDDR4协议是标准的,但是各个DDR厂家也确实有些差异,这也是为什么很多SOC提供了列表,理论上可以,但是并不适合直接使用的原因。 ----其他EMMC和NOR也是这样吗?
View full article
S32G3 memory support list Hi, NXP colleagues I see DDR ,NOR Flash and EMMC are supported by S32G3 in datasheet, but can you provide a list of DDR and other memories that have been tested for compatibility? If any LPDDR4 protocol compliant DRAM in the market can be interfaced with  S32G3 with max density of 4GB ,have you not done fitness testing? Expecting a reply. Thank you . Re: S32G3 memory support list Hello, @Chenxu1  Thanks for your kindly suggestions. BR Chenyin Re: S32G3 memory support list Hi ,  Please make suggestions to your internal company, because the memory fitting test  of DDR and EMMC is very important to us. Thanks. Re: S32G3 memory support list Hi, @Chenxu1  Thanks for the reply. Yes, from the information I could understand, there are not such lists for EMMC/Nors. I apologize for the inconvenience. BR Chenyin Re: S32G3 memory support list ----This is not very conventional, although the LPDDR4 protocol is standard, but each DDR manufacturer also does some differences, which is the reason why many SOCs provide list, in theory, but not suitable for direct use. ----Is this true of other EMMCs and NOR? Re: S32G3 memory support list Hello, @Chenxu1  Thanks for the questions. Sorry that seems there is not such list, NXP recommends any LPDDR4 DRAM of 4GB max density which is complaint with LPDDR4 protocol and follow JEDEC specs. Best Regards Chenyin
View full article
s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue I am testing SPI communication on S32K314. It was confirmed that the correct data was output through Lpspi_Ip_SyncTransmit.        status = Lpspi_Ip_SyncTransmit(&SLAVE_EXTERNAL_DEVICE, pTxData, pRxData, length, 1000);     if( LPSPI_IP_STATUS_SUCCESS == status ) {         retval = true;     } However, even if Interrupt is set, the Finish interrupt does not occur.         status = Lpspi_Ip_Init( &Lpspi_Ip_PhyUnitConfig_SpiPhyUnit_0_Instance_0 );         if( status != LPSPI_IP_STATUS_SUCCESS ) {         }         IntCtrl_Ip_InstallHandler(LPSPI0_IRQn, Lpspi_Ip_LPSPI_0_IRQHandler, NULL_PTR);         IntCtrl_Ip_EnableIrq(LPSPI0_IRQn);       Lpspi_Ip_UpdateTransferMode(SLAVE_EXTERNAL_DEVICE.Instance, LPSPI_IP_INTERRUPT);     So, we are trying to communicate through Lpspi_Ip_AsyncTransmit. However, correct data is not output through Lpspi_Ip_AsyncTransmit. Values ​​0x01, 0x02 ~ 0x20 are being transmitted as test values, but it appears that only the first 3 bytes are transmitted as correct values, and the rest are transmitted as garbage values. If there is anything you can help me with, please do so. Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue Yes, I solved the problem by using RM. In order to use DMA in SPI, dmamux must be used, but my project did not use mcal. Since there is no way to add dmamux in projects that do not use mcal in SDK components, I had no choice but to add mcal. I confirmed that it works well by registering dmamux in rm. Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue Hi Please refer to the Example S32K312 SPI Transmit & Receive Using DMA DS3.5 RTD300 Lpspi_Ip_AsyncTransmit is used in this project. Best Regards, Robin ------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "Mark Correct" 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. ------------------------------------------------------------------------------- Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue Thank you for the source code. I am referring to it. Since our project doesn't use MCAL, we don't use Rm. Is it necessary to use the Cache_Ip_InvalidateByAddr function? Currently, I am transmitting using the Lpspi_Ip_AsyncTransmit function, but when I read it with Lpspi_Ip_GetStatus, LPSPI_IP_FIFO_ERROR occurs. Do you know how to resolve LPSPI_IP_FIFO_ERROR? Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue I’m sorry for delayed response, we are heavily overloaded now. Cache_Ip_InvalidateByAddr is for when DMA is used. If you don’t use DMA, then there is no need to call it. If RTD 3.0.0 and DMA is used, then DMAMUX must be configured in Rm regardless of whether MCAL is used. (Rm->RmConfigSet->Dma Mux) Would you please send me a simplified test project privately? Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue Install another C:\NXP\S32DS.3.5_RTD300 separately Then install RTD3.0.0. Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue But I installed RTD4.0, and this routine was not found Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue Is there an SDK for RTD3.0 installed? Can it coexist with 4.0? Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue Can you send me a sample code? I'm also working on a SPI project recently and have been having difficulties. I'd like to learn from it. Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue Could you please send me the RTD3.0 file? I can't find it on the official website. Also, do you mean installing two S32DS software?
View full article
s32k314 Lpspi_Ip_SyncTransmit issue Test SPI communication using the Lpspi_Ip_SyncTransmit issue in S32K314 In the Freertos development environment, When transmitting SPI data, sometimes corrupted data occurs. 0x7F should be output, but 0x7E seems to be output. Why does this happen? Please let me know if there is anything I need to check. Re: s32k314 Lpspi_Ip_SyncTransmit issue I solved it by modifying the Tx timing in my code. Re: s32k314 Lpspi_Ip_SyncTransmit issue Hi @jwkang, If this is a sporadic occurrence, can you measure the bus with an analog oscilloscope? I see the baudrate is 10MHz. What type of pins do you use? The GPIO AC specification can be found in the DS. Table 26. 5.0V (4.5V - 5.5V) GPIO Output AC Specification Table 27. 3.3V (2.97V - 3.63V) GPIO Output AC Specification Regards, Daniel
View full article
S32k324 bootloader linker (a tale of two linker files) I have a bootloader / application setup on the S32k324. It ran well enough until we needed to change the map to scavenge ram. We are only using core0 at the moment. The second core is disabled. When the linker files match (bootloader (0x400000)to application (0x420080)) there is no issue. I can redefine the offset for the application flash (currently at 0x420080) without issue. If I deviate from the initial sram/itcm/dtcm  settings used in the bootloader to re-purpose the disabled Core1's ram, the application hardfaults. If I load the application from the bootloader (0x400000) offset the application works fine with the new linker file. What would cause the issue? Re: S32k324 bootloader linker (a tale of two linker files) We've found a possible solution and are testing. Added the following to startup_cm7.s /*GetCoreID*/ ldr  r0, =0x40260004 ldr  r1,[r0] /*Disable mpu if enabled*/ movs    r2, #0 mov.w   r0, #3758153728 /* 0xe000e000 */ mov     r1, r2 str.w   r2, [r0, #3476] /* 0xd94*/ ldr  r0, =MAIN_CORE cmp  r1,r0 beq        SetCore0Stack b SetCore1Stack Re: S32k324 bootloader linker (a tale of two linker files) Dtyree, MPU is ARM IP, and hence is documented in the armv7-m architecture reference Does the generic linker (linker_flash_s32k324.ld) work for you? This does not reserve SRAM space for core 1: MEMORY { int_pflash : ORIGIN = 0x00400000, LENGTH = 0x003D4000 /* 4096KB - 176KB (sBAF + HSE)*/ int_dflash : ORIGIN = 0x10000000, LENGTH = 0x00020000 /* 128KB */ int_itcm : ORIGIN = 0x00000000, LENGTH = 0x00008000 /* 32KB */ int_dtcm : ORIGIN = 0x20000000, LENGTH = 0x0000F000 /* 60KB */ int_stack_dtcm : ORIGIN = 0x2000F000, LENGTH = 0x00001000 /* 4KB */ int_sram : ORIGIN = 0x20400000, LENGTH = 0x0002FF00 /* 192KB, needs to include int_sram_fls_rsv */ int_sram_fls_rsv : ORIGIN = 0x2042FF00, LENGTH = 0x00000100 int_sram_no_cacheable : ORIGIN = 0x20430000, LENGTH = 0x0000FF00 /* 64KB, needs to include int_sram_results */ int_sram_results : ORIGIN = 0x2043FF00, LENGTH = 0x00000100 int_sram_shareable : ORIGIN = 0x20440000, LENGTH = 0x00004000 /* 16KB */ ram_rsvd2 : ORIGIN = 0x20444000, LENGTH = 0 /* End of SRAM */ } Note that, ITCM and DTCM do not get extended, as these are local to each core. I would try to link against this file instead of the C0, C1. It should be in the same eclipse/plugins/Platform_ /build_files/ / as the c0 and c1 variants. As for the MPU, It may be a good idea to disable this before configuration as this will prevent issues/faults during configuration itself. The only requirement to write these registers is privileged run mode (which is the default unless you are manually switching to user mode). Best, Bryan Re: S32k324 bootloader linker (a tale of two linker files) When we set the Base address of the application to 0x400000. It loads and runs.  When the application base address is set to 0x420080 and jumped to from the bootloader we get hard fault on memory that was not initialized by the bootloader on first use, or initialization.  I checked the rasr and rbar registers, and can see them being changed in ram. Also see the values within ‘S32_MPU’ being updated with the rasr and rbar value, but have no way of telling if they are actually being applied. However, I see MPU (memory protection unit) is already enabled before we attempt to reconfigure the memory. It then attempts to enable the MPU before reenabling the cache. Do we need to set MPU->CTRL[0] to 0 before we can modify these values? I was unable to find a reference to that in the data sheet. Re: S32k324 bootloader linker (a tale of two linker files) Yes, the application can re-initialize SRAM memory. But if it was already initialized by bootloader, it's unnecessary operation. Re: S32k324 bootloader linker (a tale of two linker files) Is it possible for the application to re-initialize memory if the bootloader runs first? My startup files are based on S32K3_RTD_2_0_0_D2203_ASR_REL_4_4_REV_0000_20220331 for both applications. Re: S32k324 bootloader linker (a tale of two linker files) Hi @dtyree  Similar issues are usually caused by wrong or missing SRAM initialization. It is mandatory to initialize the SRAM as described in the S32K3 reference manual: You can find initialization code in startup_cm7.s: And the addresses are defined in linker file: When the code crashes, you can check the SRAM content. If your debugger shows something like ‘XX‘ or ‘??’ instead of valid data, it’s caused by this SRAM initialization. You need to ensure that whole SRAM is initialized appropriately. If you have bootloader and application or multicore application, you need to decide who and when will initialize the SRAM. Regards, Lukas
View full article
S32G3メモリ対応一覧 こんにちは、NXPの同僚 データシートには S32G3 で DDR、NOR フラッシュ、および EMMC がサポートされているようですが、互換性がテストされた DDR およびその他のメモリのリストを教えてください。 市場に出回っているny LPDDR4プロトコル準拠のDRAMが最大密度4GBのS32G3と接続できる場合、フィットネステストを行っていませんか? 返信を期待しています。 いつもご利用いただき、ありがとうございます。 Re:S32G3メモリサポートリスト ----LPDDR4プロトコルは標準ですが、これはあまり従来型ではありませんが、各DDRメーカーもいくつかの違いがあります。これが、多くのSOCが理論的にはリストを提供していますが、直接の使用には適していません。 ----これは他のEMMCやNORにも当てはまりますか?
View full article
尝试更改设备树文件名后,U-Boot 无法启动 我正准备使用带有 Linux 的 i.MX 8M Plus 片上系统 (SoC) 启动我的定制板。为了实现这一点,我创建了一个元层并建立了一个基于现有 imx8mp-lpddr4-evk.conf 的 custom-machine.conf 文件。此外,我修改了 u-boot-imx_2024.04.bbappend 文件中的 SRC_URI 变量,使其指向我的 GitHub 存储库,其中包含基于原始 u-boot-imx 修改后的 U-Boot 源代码。 在验证新机器和 U-Boot 是否正常运行的初始阶段,我复制或修改了与 i.MX 8MP EVK 相关的文件,并做了最少的改动。我主要更改了电路板名称、地址和其他必要的详细信息,以测试其在 i.MX 8MP EVK 上的运行。您可以在此处查看所有修改。 只要不对从 imx8mp_evk_defconfig 复制的 custom_board_defconfig 文件进行任何修改,我就可以在评估套件 (EVK) 上成功启动 U-Boot。但是,当我尝试仅更改设备树名称时,U-Boot 无法在 EVK 上启动,并且串行控制台上没有输出。 具体变化如下: - CONFIG_DEFAULT_DEVICE_TREE :从“imx8mp-evk”更改为“imx8mp-ifs” - CONFIG_DEFAULT_FDT_FILE :从“imx8mp-evk.dtb”更改为“imx8mp-ifs.dtb” 回复:尝试更改设备树文件名后,U-Boot 无法启动 你好, 请将 arch/arm/dts/imx8mp-evk-u-boot.dtsi 复制到 arch/arm/dts/imx8mp-ifs-u-boot.dtsi,然后重试。 此致, 志明
View full article
S32k324 ブートローダ リンカ (2 つのリンカ ファイルの物語) S32k324にブートローダー/アプリケーションのセットアップがあります。マップをスカベンジラムに変更する必要が生じるまでは、十分に動作しました。現時点ではcore0のみを使用しています。2 番目のコアは無効です。 リンカファイルが一致(ブートローダー(0x400000)とアプリケーション(0x420080))が一致していれば問題ありません。アプリケーションのフラッシュ(現在は0x420080)のオフセットを問題なく再定義できます。ブートローダーで使用される最初のsram / itcm / dtcm設定から逸脱して、無効になっているCore1のRAMを再利用すると、アプリケーションがハードエラーになります。ブートローダー(0x400000)オフセットからアプリケーションをロードすると、アプリケーションは新しいリンカファイルで正常に動作します。 問題の原因は何ですか? Re: S32k324 ブートローダ リンカ (2 つのリンカ ファイルの物語) アプリケーションのベースアドレスを0x400000に設定したとき。ロードして実行します。 アプリケーションのベースアドレスが 0x420080 に設定され、ブートローダーからジャンプすると、最初の使用時または初期化時にブートローダーによって初期化されなかったメモリにハード フォールトが発生します。 rasr レジスタと rbar レジスタを確認したところ、RAM で変更されていることがわかります。 また、'S32_MPU' 内の値が rasr と rbar の値で更新されているのも確認できますが、それらが実際に適用されているかどうかはわかりません。 しかし、メモリを再構成する前に、MPU(メモリ保護ユニット)はすでに有効になっているようです。次に、キャッシュを再度有効にする前に、MPUを有効にしようとします。 これらの値を変更する前に、MPU->CTRL[0]を0に設定する必要がありますか?データシートにはそれに関する参照を見つけることができませんでした。 Re: S32k324 ブートローダ リンカ (2 つのリンカ ファイルの物語) はい、アプリケーションはSRAMメモリを再初期化できます。ただし、すでにブートローダーによって初期化されている場合は、不要な操作です。 Re: S32k324 ブートローダ リンカ (2 つのリンカ ファイルの物語) ブートローダーが最初に実行された場合、アプリケーションがメモリを再初期化することは可能ですか? 私のスタートアップファイルは、どちらのアプリケーションでもS32K3_RTD_2_0_0_D2203_ASR_REL_4_4_REV_0000_20220331に基づいています。
View full article
Flashdownload with Linkserver: connect to target under reset required Hello,   we are using the MCU-Link debug adapter and a Kinetis K22 microcontroller. For automation purposes we want to use Linkserver to download an image into the flash. If the target controller is empty this works without a problem.  But now we have an application, where we reassign the SWD debug pins after the application starts running. Once the application has started the debug pins are used for a different purpose and it is not possible to connect to the controller via SWD. This means that it is necessary to hold the hardware reset line while connecting to the target. This exact process is working under Keil uvision IDE with the MCU-Link selected as a CMSIS-DAP debugger. There the setting is called "connect under reset", with "HW reset" selected. Now we want to be able to do the same with the Linkserver tool.  But I cannot find this option for the flash command. I have already experimented with a script to first issue a reset with "wiretimedreset" and then start linkserver, but this is not fast enough. The application is already running when the MCU-Link tries to connect. I also tried to make a script that holds the reset line with "wireholdreset" but it seems like the linkserver is removing the reset early on and then it cannot connect. I also know about the connect scripts, but the failure actually happens before this script is called:   linkserver output: INFO: Selected device MK22FN512xxx12:TWR-K22F120M INFO: Getting available probes INFO: Selecting probe by index INFO: Selected probe #1 12Z1C04R3SI0T (MCU-LINK (r0FF) CMSIS-DAP V2.263) INFO: MCU-Link firmware update `check`: not supported on probe ([12Z1C04R3SI0T] [MCU-LINK (r0FF) CMSIS-DAP V2.263]). Only probes running firmware V3.122 or later can be updated automatically Firmware update `check`: not supported - the update cannot be performed Ns: LinkServer RedlinkMulti Driver v25.3 (Mar 25 2025 18:34:18 - crt_emu_cm_redlink.exe build 945) Pc: ( 0) Reading remote configuration Wc(03). No cache support. Nc: Found generic directory XML file in Pc: ( 5) Remote configuration complete Nc: Reconnected to existing LinkServer process. Nc: Connecting to probe 1 core 0 (using server started externally) reports: 'Ee(42). Could not connect to core.' Nc: Retrying... Nc: Reconnected to existing LinkServer process. Nc: Server OK but no connection to probe 1 core 0 (after 3 attempts) - Ee(42). Could not connect to core. Wc: ============= SCRIPT: kinetisconnect.scp ============= Wc: Kinetis Connect Script Wc: Connecting to Probe Index = 1 Wc: Error: Probe not connected Wc: Error: Wire Ack Fault - target connected? Wc: Assert NRESET Wc: Reset pin state: 00 Wc: Error: Wire not connected Wc: Power up Debug Wc: Error: Wire not connected Wc: Error: Wire not connected Wc: No Debug Power Wc: ============= END SCRIPT =============================   So what we need is an option for linkserver to hold the reset line until it takes control of the microcontroller and writes the flash algorithm. I think this option would also be very helpful in other cases, where the microcontroller is in an unpredictable state. So is there a way to do this with linkserver?   Thank you for any help. Re: Flashdownload with Linkserver: connect to target under reset required Hi @m_p  Thank you very much, I am glad  that you  shared the solution you have found, it may help other users too ! My apologies, yes, it makes more sense to use preconnect script as it prepares the MCU for initial debug.  Diego Re: Flashdownload with Linkserver: connect to target under reset required Hello Diego, thank you for your comment. I have found a solution, but it is not in the reset scripts.  As far as I understand the reset scripts are called after the flash download is finished. But this is not what I needed. Just to state the problem again. what I need is that the reset line is activated before the debug connection is established. I want to use the Linkserver as a standalone tool to program boards. So I am running it from a batch file in a command line window. But your post made me look at the preconnect scripts. In the command line you can call the linkserver.exe with a .json configuration file. This configuration file determines which scripts are called. In all the examples I have looked at there was no preconnect script. The schema file "LinkServer_XXXX\devices\devices.schema.json" shows how to add the script into the configuration file. However the documentation on this is not very clear. For reference here is the modified configuration file: { "copyright": "Copyright 2023 NXP", "license": "SPDX-License-Identifier: BSD-3-Clause", "version": "1.0.0", "vendor": "NXP", "devices": [ { "board": "TWR-K22F120M", "device": { "name": "MK22FN512xxx12", "family": "K2x", "memory": [ { "location": "0x00000000", "size": "0x00080000", "type": "Flash", "flash-driver": "FTFA_2K.cfx" }, { "location": "0x20000000", "size": "0x00010000", "type": "RAM" }, { "location": "0x1fff0000", "size": "0x00010000", "type": "RAM" } ], "cores": [ { "type": "cm4", "name": "cm4" } ] }, "debug": { "protocol": "swd", "swo": true, "preconnect-script": "preconnect_HOLD_RESET.scp", "connect-script": "kinetisconnect.scp", "masserase-script": "kinetismasserase.scp" } } ] } Here is the preconnect script that i wrote: 1 Print "Preonnect Script" 10 REM check for debug probes 20 PROBELIST 30 REM open connection to debug probe 40 PROBEOPENBYINDEX a% 50 REM set the reset line 60 WIREHOLDRESET a% 0 Missing fact: the preconnect scripts have to be located in the folder "Linkserver_XXXX\binaries\ToolScripts\". If they are in the "Scripts"-Folder they are not found. Also there is no error message that the script is not found. Also the print statement in the .scp file is not showing up in the command line output. Now, everytime I run linkserver.exe with this configuration, I can connect to the microcontroller without a problem. Re: Flashdownload with Linkserver: connect to target under reset required Hi @m_p  Thank you for reaching out! I think that we could test using a custom reset script. By looking the MCUXpresso IDE documentation, we can see that there are some ways to handle how debugger manages reset, appart from connect. You could try these options but there is the option for  reset script. This is further described here: I did not find a Kinetis reset script, on  particular, but in the linksersver there are some reset scripts for other MCUs, they may help as referece , example path is C:\nxp\LinkServer_1.5.30\binaries\Scripts Please let me know if this helps, or any other related question you may have. Diego
View full article
S32k324 引导加载程序链接器(两个链接器文件的故事) 我在 S32k324 上设置了一个引导加载程序/应用程序。它运行得很好,直到我们需要将地图更改为清除内存。我们目前仅使用 core0。第二个核心被禁用。 当链接器文件匹配(引导加载程序(0x400000)到应用程序(0x420080))时,没有问题。我可以重新定义应用程序闪存的偏移量(当前为 0x420080),没有任何问题。如果我偏离引导加载程序中使用的初始 sram/itcm/dtcm 设置来重新利用已禁用的 Core1 的 RAM,则应用程序会出现硬故障。如果我从引导加载程序(0x400000)偏移量加载应用程序,则该应用程序可以与新的链接器文件一起正常工作。 什么原因会导致这个问题? 回复:S32k324引导加载程序链接器(两个链接器文件的故事) 当我们将应用程序的基地址设置为0x400000时。它加载并运行。 当应用程序基址设置为 0x420080 并从引导加载程序跳转时,我们会在首次使用或初始化时未由引导加载程序初始化的内存上遇到硬故障。 我检查了 rasr 和 rbar 寄存器,发现它们在 RAM 中发生了变化。 还可以看到“S32_MPU”内的值正在使用 rasr 和 rbar 值进行更新,但无法判断它们是否实际被应用。 但是,在我们尝试重新配置内存之前,我发现 MPU(内存保护单元)已经启用。然后,它会尝试启用 MPU,然后重新启用缓存。 我们是否需要将 MPU->CTRL[0] 设置为 0 才能修改这些值?我无法在数据表中找到对此的引用。 回复:S32k324引导加载程序链接器(两个链接器文件的故事) 是的,应用程序可以重新初始化 SRAM 内存。但如果它已经被引导加载程序初始化,那么这是不必要的操作。 回复:S32k324引导加载程序链接器(两个链接器文件的故事) 如果引导加载程序首先运行,应用程序是否可以重新初始化内存? 我的启动文件基于 S32K3_RTD_2_0_0_D2203_ASR_REL_4_4_REV_0000_20220331,适用于这两个应用程序。
View full article
U-Boot がデバイス ツリーのファイル名を変更しようとして起動しない i.MX 8M Plus System on Chip (SoC) と Linux を使用してカスタム ボードを起動する準備をしています。これを実現するために、メタレイヤーを作成し、既存の imx8mp-lpddr4-evk.conf を基にした custom-machine.conf ファイルを作成しました。さらに、u-boot-imx_2024.04.bbappend ファイルの SRC_URI 変数を変更して、元の u-boot-imx に基づいて変更された U-Boot ソース コードを含む GitHub リポジトリを指すようにしました。 新しいマシンとU-Bootが正しく機能していることを確認する初期段階で、i.MX 8MP EVKに関連するファイルを最小限の変更でコピーまたは変更しました。主に、i.MX 8MP EVKでの動作をテストするために、ボードの名前、アドレス、およびその他の必要な詳細を変更しました。ここで すべての変更を確認できます。 評価キット (EVK) で U-Boot を正常に起動できますが、imx8mp_evk_defconfig からコピーされた custom_board_defconfig ファイルに変更を加えない限り、U-Boot を起動できます。しかし、デバイスツリー名だけを変更しようとすると、U-Boot が EVK で起動せず、シリアルコンソールに出力がありません。 変更点は次のとおりです。 - CONFIG_DEFAULT_DEVICE_TREE: "imx8mp-evk" から "imx8mp-ifs" に変更 - CONFIG_DEFAULT_FDT_FILE: 「imx8mp-evk.dtb」から「imx8mp-ifs.dtb」に変更 Re:デバイスツリーのファイル名を変更しようとした後、U-Bootが起動しない こんにちは arch/arm/dts/imx8mp-evk-u-boot.dtsi を arch/arm/dts/imx8mp-ifs-u-boot.dtsi にコピーしてから、もう一度やり直してください。 よろしくお願いいたします 志明
View full article
U-Boot Not Booting After Trying to Change Its Device Tree File Name I am preparing to boot my custom board using the i.MX 8M Plus System on Chip (SoC) with Linux. To achieve this, I created a meta layer and established a custom-machine.conf file that builds upon the existing imx8mp-lpddr4-evk.conf. Additionally, I modified the SRC_URI variable in the u-boot-imx_2024.04.bbappend file to point to my GitHub repository, which contains the modified U-Boot source code based on the original u-boot-imx. In the initial stage of verifying that the new machine and U-Boot are functioning correctly, I copied or modified the files related to the i.MX 8MP EVK with minimal changes. I primarily changed the board name, addresses, and other necessary details to test its operation on the i.MX 8MP EVK. You can review all the modifications here. I can successfully boot U-Boot on the evaluation kit (EVK) as long as no modifications are made to the custom_board_defconfig file, which is copied from imx8mp_evk_defconfig. However, when I attempt to change only the device tree name, U-Boot fails to boot on the EVK, and there is no output on the serial console. The changes are as follows: - CONFIG_DEFAULT_DEVICE_TREE: Changed from "imx8mp-evk" to "imx8mp-ifs" - CONFIG_DEFAULT_FDT_FILE: Changed from "imx8mp-evk.dtb" to "imx8mp-ifs.dtb" Re: U-Boot Not Booting After Trying to Change Its Device Tree File Name Hello, Please copy arch/arm/dts/imx8mp-evk-u-boot.dtsi to arch/arm/dts/imx8mp-ifs-u-boot.dtsi and then try again. Best Regards, Zhiming
View full article
how to download binary file through S32DS Hello,    Two steps will achieve the download binary file through S32DS. 1.   Convert BIN file to S-record(S19) file     https://www.keil.com/download/docs/4.asp 2.  Download S-record(S19) file through S32DS    https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-download-separate-elf-srec-hex-file-to-microcontroller/ta-p/1127159 Re: how to download binary file through S32DS Enjoy the steps!
View full article
IMX8QM MEK How to set up the lpuart0 in device tree Hello, I'm having a hard time configuring the LPUART0 in the device tree. I started using the imx8 boards recently and have difficulties understanding the clock assigning in the device node. Does LPUART require an LPCG module? How do I know the clocks required by the LPUART? And the clock IDs in the clock specifier? Can you recommend me some documentation that I can read about? Thank you, let me know if this isn't the correct forum to post this question. Re: IMX8QM MEK How to set up the lpuart0 in device tree Hello, You may use the definition we already have for LPUART0 as a reference, just please note that in our MEK board we use this port for debug output: https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi#L130 https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/arch/arm64/boot/dts/freescale/imx8qm-mek.dts#L923 Also, regarding the forum, for i.MX processor questions I will suggest to use the following section: https://community.nxp.com/t5/i-MX-Processors/bd-p/imx-processors Best regards/Saludos, Aldo.
View full article
K32L2B3 I2C SCL appears to as push-pull instead of open-drain I am using the FRDM-K32L2B3 as master to communicate with a target slave I2C device. The target device needs to be able to hold the SCL line low for clock stretching. However, it appears that the K32L2B3 SCL line is being driven as push-pull: both the rising and falling edges of the SCL waveform are fast, in contrast to the slow rising edges on the SDA line (which indicate weaker pull-up action). (SCL on yellow CH1, SDA on green CH2) I have 10k resistors on both SCL and SDA. Below is the pin configuration. const port_pin_config_t portc1_pin44_config = {/* Internal pull-up resistor is enabled */ kPORT_PullUp, /* Slow slew rate is configured */ kPORT_SlowSlewRate, /* Passive filter is disabled */ kPORT_PassiveFilterDisable, /* Low drive strength is configured */ kPORT_LowDriveStrength, /* Pin is configured as I2C1_SCL */ kPORT_MuxAlt2}; /* PORTC1 (pin 44) is configured as I2C1_SCL */ PORT_SetPinConfig(PORTC, 1U, &portc1_pin44_config); const port_pin_config_t portc2_pin45_config = {/* Internal pull-up resistor is enabled */ kPORT_PullUp, /* Slow slew rate is configured */ kPORT_SlowSlewRate, /* Passive filter is disabled */ kPORT_PassiveFilterDisable, /* Low drive strength is configured */ kPORT_LowDriveStrength, /* Pin is configured as I2C1_SDA */ kPORT_MuxAlt2}; /* PORTC2 (pin 45) is configured as I2C1_SDA */ PORT_SetPinConfig(PORTC, 2U, &portc2_pin45_config); The Reference Manual states "IIC signals are automatically enabled for open drain when selected." However, my scope trace seems to show this is not the case. Am I missing an open-drain pin setting or I2C setting that permits slave clock stretching when the K32 is used as the I2C master?  Re: K32L2B3 I2C SCL appears to as push-pull instead of open-drain hi,aberger I suspect that the configuration of pin 44 (I2C1_SCL) on the K32L2B might be impacted by the PORT configuration of the MK20, because the MK20's PORT configuration could override the default I2C settings. You can use a multimeter to check if the PORT on the MK20 side has a pull-up. BR Xu Zhang Re: K32L2B3 I2C SCL appears to as push-pull instead of open-drain Hi @Joey_z , Thanks. Can you clarify why the connection of the SCL line to the MK20 pin was causing that behavior? Re: K32L2B3 I2C SCL appears to as push-pull instead of open-drain hi,aberger I'm glad you solved the problem and appreciate you sharing the detailed solution. I'll contact the internal team and take care of it. Wish you a happy life! BR Xu Zhang Re: K32L2B3 I2C SCL appears to as push-pull instead of open-drain I figured out the issue with pin 44. I am trying to use pin 44 as I2C1_SCL. A close look at the FRDM-K32L2B3 schematic shows that this pin is connected via 0 Ω resistor R24 to pin 31 of U7 (the on-board MK20DX128 that provides the OpenSDA interface for debugging the K32).  I don't know what this connection is providing, as it doesn't appear necessary for debug or flashing of the target MCU. (It is also strangely labeled as off-sheet connector `PTC1_SDA`, even though it is not used as an SDA line). Removing the 0 Ω resistor permits pin 44 to operate as an open-drain SCL for I2C1 as expected. My apologies for the wild goose chase on this issue. However, it does seem that there should be some documentation regarding the connection of U4_44 (K32) to U7_31 (MK20), especially since pin 44 is explicitly wired to J4_12 (the Arduino Header). Re: K32L2B3 I2C SCL appears to as push-pull instead of open-drain Hi,aberger  I have repeated your question and will get back to you as soon as possible. BR Xu Zhang Re: K32L2B3 I2C SCL appears to as push-pull instead of open-drain Actually, I just found a table in the K32 L2B Data Sheet: 4.3 Pin Properties. I summarize this table below for the pins I tested, all of which are marked as "N" for Open Drain. 64 LQFP Open Drain Observed as Open Drain? 1 N Y (strong pull-up, fast rise) 2 N Y (weak pull-up, slow rise) 35 N Y (weak pull-up, slow rise) 36 N Y (weak pull-up, slow rise) 44 N N 45 N N I see that "N" means "Disabled", with a footnote that reads "When I2C module is enabled and a pin is functional for I2C, this pin is (pseudo-) open drain enabled." So I've confirmed that all of the pins I tested should be configured for pseudo-open drain when routed as I2C. Why are these pins observed to behave differently?  Re: K32L2B3 I2C SCL appears to as push-pull instead of open-drain Hi @Joey_z  That is helpful, thank you. I was able to reproduce your result. I see open-drain behavior when I2C0 SCL is routed to PTB0 (pin 35). I also see open-drain behavior on I2C1 SCL when it is routed to PTE1 (pin 2). In the above two cases, I can successfully communicate with a target device that requires clock stretching. However, I still see push-pull behavior on I2C1 SCL when routed to PTC1 (pin 44). Is there something different about this pin? Perhaps open-drain configuration is only available on specific pins? If that is the case, please point me to a table that describes which pins have open-drain configuration available to them. Otherwise, maybe there is a hidden bit somewhere in the pin configuration that is responsible for the open-drain configuration? If so, please provide instructions for configuring a pin as open-drain. Below I show scope traces for the 3 scenarios described above, along with the pin configuration for each. Note that the pin configurations generated by MCUXpresso Config Tools are identical. 1. Successful communication with I2C0 (open drain SCL) /* PORTB0 (pin 35) is configured as I2C0_SCL */ PORT_SetPinMux(PORTB, 0U, kPORT_MuxAlt2); PORTB->PCR[0] = ((PORTB->PCR[0] & /* Mask bits to zero which are setting */ (~(PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK))) /* Pull Enable: Internal pullup or pulldown resistor is enabled on the corresponding pin. */ | (uint32_t)(PORT_PCR_PE_MASK)); /* PORTB1 (pin 36) is configured as I2C0_SDA */ PORT_SetPinMux(PORTB, 1U, kPORT_MuxAlt2); PORTB->PCR[1] = ((PORTB->PCR[1] & /* Mask bits to zero which are setting */ (~(PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK))) /* Pull Enable: Internal pullup or pulldown resistor is enabled on the corresponding pin. */ | (uint32_t)(PORT_PCR_PE_MASK)); 2. Successful communication with I2C1 (open drain SCL) /* PORTE0 (pin 1) is configured as I2C1_SDA */ PORT_SetPinMux(BOARD_I2C1_SDA_PORT, BOARD_I2C1_SDA_PIN, kPORT_MuxAlt6); PORTE->PCR[0] = ((PORTE->PCR[0] & /* Mask bits to zero which are setting */ (~(PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK))) /* Pull Enable: Internal pullup or pulldown resistor is enabled on the corresponding pin. */ | (uint32_t)(PORT_PCR_PE_MASK)); /* PORTE1 (pin 2) is configured as I2C1_SCL */ PORT_SetPinMux(BOARD_I2C1_SCL_PORT, BOARD_I2C1_SCL_PIN, kPORT_MuxAlt6); PORTE->PCR[1] = ((PORTE->PCR[1] & /* Mask bits to zero which are setting */ (~(PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK))) /* Pull Enable: Internal pullup or pulldown resistor is enabled on the corresponding pin. */ | (uint32_t)(PORT_PCR_PE_MASK)); 3. Unsuccessful communication with I2C1 (push-pull SCL) /* PORTC2 (pin 45) is configured as I2C1_SDA */ PORT_SetPinMux(PORTC, 2U, kPORT_MuxAlt2); PORTC->PCR[2] = ((PORTC->PCR[2] & /* Mask bits to zero which are setting */ (~(PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK))) /* Pull Enable: Internal pullup or pulldown resistor is enabled on the corresponding pin. */ | (uint32_t)(PORT_PCR_PE_MASK)); /* PORTC1 (pin 44) is configured as I2C1_SCL */ PORT_SetPinMux(PORTC, 1U, kPORT_MuxAlt2); PORTC->PCR[1] = ((PORTC->PCR[1] & /* Mask bits to zero which are setting */ (~(PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK))) /* Pull Enable: Internal pullup or pulldown resistor is enabled on the corresponding pin. */ | (uint32_t)(PORT_PCR_PE_MASK));    Re: K32L2B3 I2C SCL appears to as push-pull instead of open-drain hi,aberger I conducted some tests using the frdmk32l2b_i2c_polling_b2b_transfer_master demo in SDK.I configured the FRDM-K32L2B board as the I2C master to communicate with another board.The configuration and pin setting are as follows. I have tested the signal of SCL, this letter is without pull-up resistor, you can see the information in the picture, and yours is different. Hope it can help you. BR Xu Zhang Re: K32L2B3 I2C SCL appears to as push-pull instead of open-drain Hi @Joey_z , I have the 10kΩ resistors installed at both R81 and R82. However, you can see a clear difference in the traces from my original post: slow pull-up action on SDA, but fast edges on SCL. This is despite the identical pin configurations for the two pins (pull up enabled). So I can already see that SDA has been successfully configured for open drain, but SCL has not. Nevertheless, I t ried the test you suggested. Below is a comparison of the behavior with 10kΩ pull-up resistors in place, and with 10kΩ resistors removed.  With 10k pull-up resistors Without 10k pull-up resistors Summary: the SDA edges are slower without the 10k resistors (as expected... the pull-up strength is now provided only by the internal 20kΩ - 50kΩ). However, the SCL edges remain fast. As you said, this implies that the pin is still configured for push-pull, even though "IIC signals are automatically enabled for open drain when selected" (according to the Reference Manual).  In 36.1.1 I2C instantiation information, it states: When the package pins associated with IIC have their mux select configured for IIC operation, the pins (SCL and SDA) are driven either by true open drain or in a pseudo open drain configuration. However, only pseudo open drain configuration is for KLx3 family. What is "pseudo open drain"? Does that mean that the SDA behaves as open drain, but SCL is still driven push-pull? Is there any way to achieve true open drain operation for SCL as well on the K32? (Otherwise, target device clock stretching cannot be supported. This would also imply that SMBus 2.0 is not accurately supported). Note: I see that the I2Cx_C2[SBRC] (Slave Baud Rate Control) bit might enable/disable clock stretching, but I believe this only applies to use of the K32 as an I2C slave. I wish to operate the K32 as I2C master.  Re: K32L2B3 I2C SCL appears to as push-pull instead of open-drain hi,aberger Thank you for your interest in the FRDM-K32L2B3 product.I would like to provide service for you. You can try to remove the 10k resistors on SCL, and then observe the waveform changes. When the resistors are removed, the rising and falling edges of the SCL waveform are weak, which means the pin is set to open-drain in the program. When the resistors are removed, both the rising and falling edges of the SCL waveform are fast, which means the pin may be set to push-pull. Wish it helps you. BR Xu Zhang
View full article
SYSCON document and SDK code mismatch In MCXNX4XRM Rev. 4, the SYSCON0 base address is 4000_0000h However, in mcux-sdk, the address is 0x50000000. Which one is correct? MCXN Re: SYSCON document and SDK code mismatch I see, in 0x4000_0000 is non-secure, while 0x5000_0000 is secure.
View full article
S32DS Force re-generation of all code Hi! Is there a way to force re-generation of all code in the generated/ folder of a S32DS workspace project? It seems that S32DS somehow memorizes files that it has generated and only re-generates them when the underlying configuration has changed. This is not very practical for collaborative develoment and can create differences among different S32DS installations. I'd like to forcefully re-generate all code in generate/ in order to have a consistent status. I have tried: 1) to reload the SDK (Manage SDKs -> reload), but that did only overwrite some, but not all files. Siul2_Port_Ip_BOARD_InitPeripherals_PBcfg.h is one example, which isn't re-generated after that 2) deleting the generated/ folder. S32DS dosn't seem to care, but keeps on creating only files if I change the module configuration 3) cleaning the project I'm desperately lost. I believe I have tried every button and setting... any help is much appreciated! SDK I'm using is PlatformSDK_S32XX_4_0_0_S32G399A_M7_0 S32DS version: 3.5, Build id: 240529 (Update 12) Re: S32DS Force re-generation of all code Thank you Jiri, I've moved the generated files to another folder, but still S32DS was smart enough to relocate them in the new place - this is the reason why they have not been re-generated on my side. I've now moved the folder outside the workspace scope and it seems to re-generate the files... Re: S32DS Force re-generation of all code Hi,  deleting the generated and RTD folder should work. In project explorer right click on folder name and delete. Then go back into Config Tool and generate code again.  If it still doesn't work, try to create new workspace and import your project into it. 
View full article