S32K知识库

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

S32K Knowledge Base

标签

讨论

排序依据:
S32K1xx   S32K144 Example S32K144 CMP Round-robin S32DS2.0  Example S32K144 Verify Backdoor Access Key S32DS1.3  Example S32K144 FlexCAN0 RXFIFO DMA nonSDK S32DS13  Example S32K144 PDB ADC trigger DMA ISR S32DS  Example S32K144 Flash RW simple S32DS  Example S32K144 DMA memory copy test S32DS  Example S32K144 EEEPROM usage Example S32K144 EEEPROM usage - No SDK  Example S32K144 RTC VLPS  Example S32K144 WDOG RCM interrupt  Example S32K144 SRAM ECC Injection  Example S32K144 RAM Retention S32DS.R1 Example S32K144 I2C Master MPL3115A2 S32DSR1_v3  Example S32K144 FlexCAN RXFIFO DMA S32DS.ARM.2018.R1  Example S32K144_printf_implementation - S32DS_1.0  Example S32k144 UART printf/scanf under FreeRTOS - S32DS Example S32K144 SDK Function call on configurable period using LPIT timer.  Example S32K144 .noinit section usage Example S32K144 PDB ADC DMA S32DS.ARM.2018.R1   Example S32K144 RAM selftest simple S32DS 2018.R1  Example S32K144 Position Independent Code  Example S32K144 FlexCAN Pretended Networking STOP mode test S32DS.ARM.2.2  Example S32K144 LPIT DMA LPSPI  Example S32K144 FlexCAN TX/RX/Error ISR test S32DS2.2  Example S32K144 FlexIO Idle Detection S32DS2.2   S32K142 Example_S32K142_LMEN_Cache_v1_0_S32DS3.6_RTD300  Lauterbach_Script_For_MDM_AP_Mass_erase_S32K142    S32K146 Example S32K146 Set_whole_FlexRAM-as_RAM S32DS.ARM.2.2   S32K148 Example S32K148 PDB0-PDB1 ring S32DS3.4 RTM4.0.3  Example S32K148 PDB0-PDB1 ring DMA S32DS3.4 RTM4.0.3  Example S32K148 GPIO Interrupt     S32K116 Example S32K116 WDOG Fast Test  Example S32K116 LPUART LIN Slave TXRX ISR S32DS.ARM.2.2  Example S32K116 FlexCAN PN STOP S32DS.ARM.2.2 Example S32K116 FlexCAN VLPR test S32DS.ARM.2.2   S32K118 Example S32K118-SRAM-keep_data_over_SW_reset v0_1 S32DS.ARM.2.2   S32K3xx   S32K312 Example S32K312 ADC_IP Continuous Scan DMA S32DS36 RTD600    S32K344 Example S32K344 PIT BTCU ADC DMA DS3.4 RTD100   Example S32K344 FlexCAN_Ip TX/RX/EnhanceRXFIFO test S32DS3.4 RTD200     Example Siul2_Port_Ip_Example_S32K344_ITCM_DTCM S32DS3.4 RTD300   Example S32K344 LPUART RX/TX ISR FreeRTOS S32DS36 RTD600    Example_S32K344_MCAL_MCU_ClockMonitor_v1_0_S32DS36_RTD600    Example_S32K314_DTCM1_Backdoor_RTD201_DS34_v3    Example_Reg_Prot_Flash_Controller_S32K344   Example S32K344 PIT SWtrig ADC ANAMUX S32DS 3.6.0 RTD 6.0.0   Example S32K344 EMAC lwIP FreeRTOS miniEVB S32DS 3.6.1 RTD 6.0.0   Example S32K344 EMAC lwIP FreeRTOS MRCANHUB S32DS 3.6.1 RTD600   Example_S32K344_BIST_eMCEM_SPD106_v2_0_S32DS365_RTD700  Example S32K344EVB_T172 UART_ETH_Gateway HLD S32DS368 RTD701   Example_S32K344_CMU_FM_POR_WDG_v1_0_S32DS369_RTD701    Example_S32K344_FLS_Integrity_Margin_Check_v1_0_S32DS36_RTD701    S32K358 Example S32K358 FlexCAN TXRX ISR S32DS35 RTD400/500   Example S32K358 GMAC 100M lwIP FreeRTOS S32DS 3.6.1 RTD600   Example S32K358 GMAC 1G lwIP FreeRTOS S32DS 3.6.1 RTD600   Example S32K358 GMAC lwIP FreeRTOS RDBESS S32DS 3.6.1 RTD600   Example_S32K358_XRDC_SEMA42_Multicore_v1_0_S32DS369_RTD701    S32K388 Example S32K388 GMAC0 lwIP FreeRTOS S32DS 3.6.1 RTD600   S32K389 Example S32K389 GMAC0 lwIP FreeRTOS S32DS 3.6.1 RTD 6.0.0   Example S32K389 GMAC1 SABRE lwIP FreeRTOS S32DS 3.6.1 RTD600  
查看全文
********************************************************************************************** * Detailed Description: * This example demonstrates the S32K344 internal flash UTest (User Test) sequence using the * Mem_43_INFLS AUTOSAR driver. It covers Array Integrity Check (MISR-based) and User Margin * Read Check, exercised over the full configured Block 3 address range (starting at * 0x00700000), as defined in the Mem_43_INFLS instance configuration. * * Setup: * ProgramBlock3() erases one sector (8 KB) at 0x00700000 and programs the first 512 bytes * with a sequential byte pattern (0x00..0xFF repeating). The remainder of the block * contains erased cells (0xFF). The UTest operations in Steps 1–3 are performed over the * entire Block 3 — not only the 512 programmed bytes. * * Step 1 — Array Integrity Check, Golden MISR Capture: * Runs the Array Integrity Check at NORMAL read margin using sequential addressing over * the full block. UM0–UM9 are seeded with 0xA5A5A5A5. MisrExpectedValues is intentionally * set to 0x0, so JOB_FAILED is the expected outcome. A custom wait function polls the AID * bit directly (without calling Mem_43_INFLS_MainFunction) so that the UM registers are * read before the driver clears them on job completion. The captured MISR becomes the * golden reference (goldenMisr) for Steps 2 and 3. * GETSTATEUTEST_JOB is called afterward to confirm no real hardware fault occurred * (ECC error, breakpoint, or suspension) during the capture run. * * Step 2 — Array Integrity Check, Verification Run: * Re-runs the identical Array Integrity Check over the full block (same seed, same * sequential addressing) with MisrExpectedValues = goldenMisr captured in Step 1. * JOB_OK confirms flash content is unchanged; JOB_FAILED indicates corruption. * GETSTATEUTEST_JOB is called to verify clean hardware completion. * * Step 3 — User Margin Read Check, Cell Margin Verification: * Re-reads the full block at a tighter read margin (C40_IP_MARGIN_LEVEL_PROGRAM). * Same seed and goldenMisr are used. If all cells retain sufficient voltage margin at * the tighter threshold, the MISR matches and JOB_OK is returned. A JOB_FAILED result * indicates one or more cells are degrading before they produce a detectable ECC error * under normal read conditions. * Note: both Array Integrity Check and User Margin Read Check must use sequential * addressing (C40_IP_SEQUENTIAL) to produce a comparable MISR signature. * * Results are accumulated in the utestResults structure (Utest_TestResultType), recording * both the MISR job outcome (Utest_JobResultType) and the hardware UTest state * (Utest_HwStateType) for each step independently. * * NOTE: This example must be executed from SRAM. The Mem_43_INFLS UTest operations * (Array Integrity Check, User Margin Read Check) place the internal flash controller * in UTest mode, during which the flash array is not available for normal read access. * ------------------------------------------------------------------------------------- * MCU: S32K344 * FX_OSC: 16MHz * RTD: S32K3_RTD_7_0_1_D2602_ASR_REL_4_9_REV_0000_20260206 * Debugger: Lauterbach Trace32 * Target: Internal_FLASH **********************************************************************************************
查看全文
This example is based on AN13458: Implement IPv6 + IPv4 Communication on One ENET Port based on LWIP. /* * Copyright 2017-2026 NXP * * NXP Confidential and Proprietary. This software is owned or controlled by NXP * and may only be used strictly in accordance with the applicable license terms. * By expressly accepting such terms or by downloading, installing, activating * and/or otherwise using the software, you are agreeing that you have read, * and that you agree to comply with and are bound by, such license terms. * If you do not agree to be bound by the applicable license terms, * then you may not retain, install, activate or otherwise use the software. ********************************************************************************* * File main.c * Owner Julián Aragón * Version 1.0 * Date 21-09-2026 * Classification General Business Information ********************************************************************************* * Detailed Description: * Updated the example lwip_baremetal_s32k344 to enable simultaneous IPv4 and * IPv6 pinging of the lwIP stack from the command window, based on AN13458. * * ping -4 192.168.0.200 * * Pinging 192.168.0.200 with 32 bytes of data: * Reply from 192.168.0.200: bytes=32 time<1ms TTL=255 * Reply from 192.168.0.200: bytes=32 time=1ms TTL=255 * Reply from 192.168.0.200: bytes=32 time<1ms TTL=255 * Reply from 192.168.0.200: bytes=32 time<1ms TTL=255 * * Ping statistics for 192.168.0.200: * Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), * Approximate round trip times in milli-seconds: * Minimum = 0ms, Maximum = 1ms, Average = 0ms * * ping -6 FE80::3DD7:9303:126c:0df0%23 * * Pinging fe80::3dd7:9303:126c:df0%23 with 32 bytes of data: * Reply from fe80::3dd7:9303:126c:df0%23: time<1ms * Reply from fe80::3dd7:9303:126c:df0%23: time<1ms * Reply from fe80::3dd7:9303:126c:df0%23: time<1ms * Reply from fe80::3dd7:9303:126c:df0%23: time<1ms * * Ping statistics for fe80::3dd7:9303:126c:df0%23: * Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), * Approximate round trip times in milli-seconds: * Minimum = 0ms, Maximum = 0ms, Average = 0ms * * EVB: * - All jumpers in default positions * * Configuration: * - Updated pin configuration * - Updated clock configuration * - IPv4 address: 192.168.0.200 * - IPv6 address: FE80::3DD7:9303:126c:0df0 (static link-local) * - Enabled LWIP_IPV6 in lwipopts.h * - Enabled LWIP_RAW in lwipopts.h * - Set has_IPv6 = 1 in netifcfg.c * * main.c * - Updated header only * device.c * - No changes * test.c * - Added IPv6 static address assignment in interface_init() * (IP6_ADDR + netif_add_ip6_address + netif_ip6_addr_set_state) * - Added icmp_led_init() call in apps_init() * - Added icmp_led_callback(): raw PCB for IPv4 ICMP (protocol 1) * flashes GREEN LED on ping receive * - Added icmp_led_callback(): raw PCB for IPv6 ICMPv6 (protocol 58) * flashes BLUE LED on ping receive * - Commented out TCP/IP stack shutdown timeout * * ----------------------------------------------------------------------------- * Test HW: FRDM-A-S32K344 SCH-94921 PDF: SPF-94921 Rev. C * MCU: S32K344 * Debugger: On Board * Target: internal_FLASH * EVB connection: EMAC <-> USB-to-Ethernet adapter <-> Laptop DELL, Windows 11 ********************************************************************************* * Revision History: * Ver Date Author Description of Changes * 1.0 Sep-21-2026 Julián Aragón Initial version **********************************************************************************/ Note: In order to ping with IPv6 from Windows 11 Command Prompt, you must specify Ethernet port Idx being used: ping -6 FE80::3DD7:9303:126c:0df0%<interface_index> You can find your numeric index with the following command: netsh interface ipv6 show interfaces.  
查看全文
**************************************************************************************************** * Detailed Description: * * CM7_0 Safety Core (Lockstep): * * Runs as Domain 0 on the CM7_0+CM7_1 lockstep core pair of the S32K358. * Acts as the system master: performs full initialization of clocks, XRDC * domain assignment and memory region protection (Rm_Init), Port, Platform, * and releases CM7_2 from reset via Mcu_SetMode(McuModeSettingConf_1). * * XRDC memory layout configured by Rm_Init: * - 0x20480000 (SHARED_VARIABLE): Domain 0 RW, Domain 1 RW — Sema42 Ch 0 protected * - 0x20480010 (SHARED_FAULT_FLAG): Domain 0 RW, Domain 1 RW — Sema42 Ch 1 protected * - 0x20490000 (CM_0_OWNED_VARIABLE):Domain 0 RW, Domain 1 NO ACCESS — exclusive to CM7_0 * * Two Sema42 channels are used: * - Channel 0: guards the shared counter at 0x20480000 (competed with CM7_2) * - Channel 1: guards the fault flag at 0x20480010 (CM7_0 monitors CM7_2 violations) * * Main loop (continuous): * - Writes to the owned SRAM region (0x20490000) directly, without a semaphore — * XRDC guarantees exclusive Domain 0 access. Blinks BLUE LED on each write. * - Acquires Sema42 Ch 0, increments the shared counter at 0x20480000, * releases Ch 0. Competes with CM7_2 for the gate — mutual exclusion * is visible as either core stalls while the other holds the semaphore. * * XRDC_ISR_Handler (triggered by XRDC interrupt when CM7_2 violates 0x20490000): * - Spins on Sema42 Ch 1 until CM7_2's HardFault handler sets the shared * fault flag at 0x20480010, confirming CM7_2 has handled the violation. * - Acquires Ch 1 and clears the fault flag, signaling CM7_2 to resume * its main loop cycle. * - Together with CM7_2's HardFault handler, this implements a lightweight * cross-core fault notification and recovery handshake. * * CM7_2 Application Core * * Runs as Domain 1 on the independent CM7_2 core of the S32K358. * Only Sema42 is initialized here — XRDC and full RM initialization * are handled exclusively by CM7_0 (Domain 0, lockstep) before this core is released from reset. * * Two Sema42 channels are used: * - Channel 0: guards the shared counter at 0x20480000 (competed with CM7_0) * - Channel 1: guards the fault flag at 0x20480010 (CM7_2 signals CM7_0) * * Main loop (repeating cycle of 10 iterations, i = 0..8 + violation): * - Before each iteration, CM7_2 reads the shared fault flag via Ch 0 * and spins until CM7_0 clears it (fault recovery synchronization). * - Iterations 0..8 (9x): acquires Ch 0, increments the shared counter, * releases Ch 0, blinks GREEN LED to indicate successful access. * - Iteration 9: deliberately writes 0xDEAD to CM7_0's owned SRAM region * (0x20490000), which has no XRDC access for Domain 1. * This triggers a HardFault on CM7_2. After fault handling, variable i is reset * to 0 and the cycle repeats indefinitely. * * HardFault handler (triggered by XRDC violation on iteration 9): * - Lights RED LED immediately. * - Calls Rm_XrdcGetDomainIDErrorStatus() to read and decode the XRDC * error registers (domain, faulting address, access type, attribute). * Error registers are cleared automatically inside this API call. * - Acquires Sema42 Ch 1 and sets the shared fault flag at 0x20480010 * to notify CM7_0 that a violation was detected. ------------------------------------------------------------------------------------------------ * MCU: S32K358 * FXOSC 16MHz * RTD: S32K3_RTD_7_0_1_D2602_ASR_REL_4_9_REV_0000_20260206 * Debugger: PE Micro Multilink * Target: Internal_FLASH ****************************************************************************************************
查看全文
As vehicles consolidate more software onto fewer chips, keeping safety-critical functions truly isolated is no longer optional. EL2 Monitor delivers hardware-enforced partitioning for Arm® Cortex®-R52 — without the complexity of a full hypervisor.
查看全文
********************************************************************************************** * Detailed Description: * CMU_FM minimum reference count requirement: * RCCR[REF_CNT]_MIN = CEILING(MAX(3 * (f_reference_clock / f_bus_clock), * 8 + 5 * (f_reference_clock / f_monitored_clock))) * where: * f_reference_clock = FXOSC clock frequency * f_bus_clock = AIPS_SLOW_CLK frequency (40 MHz) * f_monitored_clock = metered clock frequency * * CMU_1 * ----- * FIRC clock frequency (fmonitored) = 48 MHz * FXOSC clock frequency (fref) = 16 MHz * * 3 * (fref / fbus) = 3 * (16 / 40) = 1.2 * 8 + 5 * (fref / fmonitored) = 8 + 5 * (16 / 48) = 9.667 * RCCR[REF_CNT]_MIN = CEILING(MAX(1.2, 9.667)) = 10 * The first term would dominate only at f_bus_clock < 4.96 MHz, for example. * * CMU_2 * ----- * SIRC clock frequency fmonitored = 32 kHz * FXOSC clock frequency (fref) = 16 MHz * * 3 * (fref / fbus)= 3 * (16 MHz / 40 MHz) = 1.2 * 8 + 5 * (fref / fmonitored) = 8 + 5 * (16 MHz / 32 kHz) = 2508 * RCCR[REF_CNT]_MIN = CEILING(MAX(1.2, 2508)) = 2508 * * * SR_FMTO (Frequency Meter Time Out): * --------------------------------------------------------------------- * FMTO could theoretically be triggered by configuring RCCR[REF_CNT] * to a value lower than the minimum number of reference clock cycles * required to observe one full monitored clock period. * This however cannot be guaranteed by NXP as the value is lower then RCCR_MIN. * NXP guarantees the MCU functionality only if RCCR > RCCR_MIN * When SR_FMTO is set, the SR_FMC is never set, and therefore the CMU_FM interrupt is never called. * * CMU_FM_1: * RCCR[REF_CNT] < f_FIRC / f_FXOSC < (48 MHz / 16 MHz) < 3 * CMU_FM_2: * RCCR[REF_CNT] < T_SIRC / T_FXOSC < 31.25 µs / 62.5 ns < 500 * * * POR_WDG: * --------------------------------------------------------------------- * In case CMU_FM_1 ISR is not executed within POR_WDG timeout, the MCU is reset by the POR_WDG. * Read DCMROPP1-4 * To inject this reset, select CMUFM_1_POR_WDG = 1 and CMUFM_1. * ------------------------------------------------------------------------------------- * MCU: S32K344 * FX_OSC: 16MHz * RTD: S32K3_RTD_7_0_1_D2602_ASR_REL_4_9_REV_0000_20260206 * Debugger: Lauterbach Trace32 * Target: Internal_FLASH **********************************************************************************************
查看全文
**************************************************************************************** * Detailed Description: * * UART <-> Ethernet gateway demo for S32K344EVB-T172. * * UART messages are encapsulated into raw Ethernet frames * and transmitted over the Ethernet link. Received Ethernet * frames are decapsulated and forwarded to the UART terminal. * * Key Functionality: * - UART TX/RX interrupt driven communication. * - GMAC TX confirmation and RX indication interrupt processing. * - Four-deep message queue for UART/Ethernet decoupling. * - Runtime MAC address configuration. * - TJA1103 loopback, MASTER and SLAVE operation. * - Raw Ethernet frame transport (EtherType 0x88B5). * - RTD MCAL/HLD implementation (EthIf, Eth_43_GMAC, CDD_UART). * * Runtime status information including node configuration, * MAC addresses and link status is displayed on the UART terminal. * * Test Configurations: * * Single board: * GATEWAY_MODE_NODE_1_LOOPBACK * * Two-board setup: * Board 1 : GATEWAY_MODE_NODE_1_MASTER * Board 2 : GATEWAY_MODE_NODE_2_SLAVE * * Boards are connected using a 100BASE-T1 cable. * * Notes: * - EthIf.c contains custom gateway callback implementation. * - During S32 Configuration Tool code generation select "Keep Existing" for EthIf.c. * - Do not overwrite EthIf.c. * - On PC terminal enable local echo * * -------------------------------------------------------------------------------------- * Test HW: S32K3x4EVB-T172 Rev B * MCU: S32K344_172HDQFP * IDE: S32DS 3.6.8 * RTD release: S32K3_RTD_7_0_1_D2602_ASR_REL_4_9_REV_0000_20260206 * Debugger: Lauterbach, P&E Micro * Target: Internal_FLASH * Serial: 115200, 8N1 *****************************************************************************************   Terminal prints between two S32K344EVB-T172 boards In case of single board in PHY loopback    
查看全文
S32Kxxx   Excel configurators MPC5xxx/S32Kxx: CAN / CAN FD bit timing calculation   S32K1/S32M24x   Documents Solution for S32K14x which could be attached while couldn't be re-programmed Fault handling on S32K144 FRDM-S32K144 EVB Useful tips about S32DS for ARM v2018.R1 IDE and S32K1xx development Using S32K CMSIS-SVD Files in EmbSysRegView Eclipse Plugin FlexNVM used as code/data Flash   S32K3/S32M27x   Excel configurators S32K344 DCF Configurator   Debugger plugins Lauterbach FCCU_Utility plugin - S32K3xx    Documents Restrict the debug access with a password when HSE is not used S32K3/S32M27x – eMIOS Usage S32K3/S32M27x – eMIOS/BTCU/ADC/DMA – [RTD600] S32K3/S32M27x – eMIOS/TRGMUX/LCU – [RTD600] DOC_S32K3x1_S32K3x2_S32K3x4_EIM_Mapping_v1_0_SPD105_Unofficial  DOC_S32K3x1_S32K3x2_S32K3x4_eMCEM_DCM_Mapping_v1_0_SPD1.0.5_Unofficial    S32K39-37-36   Documents S32K39-37-36 – eMIOS/BTCU/SAR-ADC/DMA – [RTD600] S32K39-37-36 – eFlexPWM/TRGMUX/BCTU/SAR-ADC/DMA – [RTD600]  
查看全文
The attached spreadsheet provides mapping between EIM and DCM faults for the S32K3x1, S32K3x2, S32K344, S32K324, and S32K314 devices. Any support, information, and technology (“Materials”) provided by NXP are provided AS IS, without any warranty express or implied, and NXP disclaims all direct and indirect liability and damages in connection with the Material to the maximum extent permitted by the applicable law. NXP accepts no liability for any assistance with applications or product design. Materials may only be used in connection with NXP products. Any feedback provided to NXP regarding the Materials may be used by NXP without restriction.
查看全文
Application note AN5258 for the S32K1 describes how to implement external pulse counting using DMA and PORT modules. Referring to that application note, we will implement a similar function using SIUL2 and DMA on the S32K3.   1. Introduction This article describes how to perform pulse counting using Enhanced Direct Memory Access (eDMA) and the SIUL2 module on a 32-bit automotive MCU in the S32K3 series. Typically, signal pulses can be counted using the eMios module; however, eMios can also be used for PWM output, ICU, OCU, and GPT. If resources available for eMios are insufficient, consider using the SIUL2 and DMA modules to implement external pulse counting. In this note, the SIUL2 module will be used to capture multiple pulse inputs, and the current major loop iteration count(CITER) register of the eDMA channel will be used as a pulse counter.   2. SIUL2 supports DMA triggering. SIUL2, or System Integration Unit Lite2, is primarily responsible for controlling the electrical attributes, multiplexing functions, GPIO, EIRQ, etc., of external pins. For the S32K3, SIUL2 functions can be categorized as follows: Pin mux/pad control: Configures MSCR, IMCR, etc. GPIO input/output: Typically used via Siul2_Dio/Siul2_Port drivers. External interrupt EIRQ: Only pins with the EIRQn option support SIUL2 external interrupts. DMA is triggered by external edge events. When using SIUL2 pins to trigger DMA, note that: SIUL2 EIRQ[0-15] can be used for interrupt requests or DMA requests, while EIRQ[16-31] can only be used for interrupt requests. In other words, the SIU2L module can support up to 16 external edge events triggering DMA. The file "S32K3xx_IOMUX.xlsx" can be found in the datasheet appendix.   3. Basic Event Chain for SIUL2 Triggered DMA SIUL2 external events still rely on the EIRQ path: a pad needs to be connected to the corresponding EIRQ input via IMCR, input buffering needs to be enabled, rising/falling edge detection needs to be configured, and the relevant request needs to be enabled. In this example, PTB26 is configured as SIUL2 EIRQ13, and external interrupt configuration is completed through registers such as IREER/IFEER and DIRSR. IP_SIUL2->IREER0 |= (1 << 13); // IREER0[EIRE13] = 1 (Enable Rising Edge) IP_SIUL2->IFEER0 &= ~(1 << 13); // IFEER0[EIRE13] = 1 (Enable Falling Edge) IP_SIUL2->DIRSR0 |= (1 << 13); // Select DMA Request for PTB26 The above bare-metal code clearly shows how to configure the Siul2 module to trigger DMA. However, if using RTD, note that: the current "Siul2_Icu" driver does not support configuring the DMA option. Therefore, when using the "Siul2_Icu" component, you also need to manually add and modify the "DIRSRx" bit to 1, i.e., select to enable "DMA request". SIUL2->DIRSR0 |= (1<<13);/* Select DMA Request for PTB26 */   4. DMAMUX / RM Configuration After a DMA request is generated on the SIUL2 side, the request source needs to be connected to a DMA channel via DMAMUX. This path is described in “S32K3xx_DMAMUX_map.xlsx”: 1.EIRQ[0 ~ 7] corresponds to 1 to 7 of DMAMUX0 Source, and EIRQ[8 ~ 15] corresponds to 1 to 7 of DMAMUX1 Source. 2.TCD 0 ~ 15 can be configured with any channel corresponding to EIRQ[0 ~ 7], and TCD 15 ~ 31 can be configured with any channel corresponding to EIRQ[8 ~ 15].  eDMA is mainly used for data transfer between main memory and other peripheral register spaces without CPU intervention. Upon receiving a peripheral request, the eDMA module's second loop begins basic data transfer. We set an empty transfer; each time SIUL2 triggers DMA, an empty transfer is performed, and the CITER bit is decremented accordingly. At this time, the value of the CITER register reflects the actual pulse count. Based on the above principle, we can calculate the pulse count or pulse frequency by periodically reading the CITER register. Note:       The CITER register can only hold a maximum of 15 bits of data. Check the CITER register each time you read it to ensure its value is not zero. When the CITER register is zero, CITER will reload its value from the BITER register and continue decrementing.   5. Example Project Demonstration This example program is based on the S32K344, using RTD version 7.0.1. It implements the function of acquiring the pulse frequency input from PTB26, PTA18, and PTA19 pins. 1.The timer is set to 1 second; the count value read in 1 second can be directly used as the measured frequency. 2. The maximum value of the CITER register is 0x7FFF, or 32767. When the count value exceeds 0x7FFF, the register will be reloaded with an initial value of 0x7FFF.. 3. CITER triggers a DMA interrupt during reload. "g_DmaChx_CallbackCounter" can be used to record the number of overflow reloads. 4. Based on CITER and "g_DmaCh16_CallbackCounter", high-frequency pulse input counting can be achieved. 5. To measure an input frequency of 40kHz, connect the signal generator's output signal to PTB26, PTA18, and PTA19. 6. Test result in S32 DS.          Using the Siul2 module to trigger DMA for counting is a very efficient method, but it should be noted that if other eDMA transfers are enabled in your application, more testing is required to ensure stable execution of all eDMA channels.  
查看全文
This article provides a software package with additional example projects for wakeup use case using RTD6.0.0. All the wakeup example projects mentioned in this page are developed based on RTD, delivered with LLD and HLD.
查看全文
This example project will show user how to use and configure the basic functionalities of WKPU + SIUL2 (GPIO) for wake-up from Standby mode on the S32K358 MCU, with RTC time preservation across Standby and functional reset clock sourced through SIRC. Test HW: FRDM-A-S32K358 / S32K3X8EVB-Q289 MCU: S32K358 IDE: S32DS v3.5 & S32DS v3.6.x SDK release: RTD 6.0.0 Debugger: PE Micro Target: internal_FLASH This example routine configures the WKPU unit for GPIO interrupt wake-up using pins PTH1 (WKPU0) and PTH3 (WKPU15). RTC time is preserved across Standby via the VDDBY supply domain. After wake-up, the functional reset clock is sourced from SIRC before transitioning to the main PLL. No fast wake-up path is used. The routine waits for SW5 to be pressed, then turns off the green LED, and enters Wkpu_EnterStandby() function which: Switches core clock to FIRC. Initializes the WKPU instance. Configures WKPU0 (PTH1) and WKPU15 (PTH3) as wake-up sources. Enters Standby mode (normal wake-up). After pressing USER0/SW4(PTH1), MCU wakes up, resets and polls for USER1/SW5 (PTH3)  or USER0/SW4(PTH1) to be pressed again. Terminal output Settings: 115200 baud — 8 data bits — No parity — 1 stop bit — No flow control (LPUART6) The terminal interaction follows three distinct phases each cycle: boot/wake-up banner → SW6 to read RTC time → SW5 to enter Standby. A representative session is shown below. 1 — Initial power-on (cold start) RTC Standby example, press SW5 to enter standby......... Press SW6 to print RTC date & time......... Reset reason: 15 Current RTC date & time: year 1970 month 1 day 1 hour 0 minutes 0 seconds 0 Current RTC date & time: year 1970 month 1 day 1 hour 0 minutes 0 seconds 2 2 — Enter Standby → Wake-up → RTC time preserved MCU will enter standby........ RTC Standby example, press SW5 to enter standby......... Press SW6 to print RTC date & time......... Reset reason: 28 Current RTC date & time: year 1970 month 1 day 1 hour 0 minutes 0 seconds 13 Current RTC date & time: year 1970 month 1 day 1 hour 0 minutes 0 seconds 14 Current RTC date & time: year 1970 month 1 day 1 hour 0 minutes 0 seconds 14 3 — Multiple Standby cycles (RTC keeps incrementing) MCU will enter standby........ RTC Standby example, press SW5 to enter standby......... Press SW6 to print RTC date & time......... Reset reason: 28 Current RTC date & time: year 1970 month 1 day 1 hour 0 minutes 0 seconds 59 Current RTC date & time: year 1970 month 1 day 1 hour 0 minutes 1 seconds 0 MCU will enter standby........ RTC Standby example, press SW5 to enter standby......... Press SW6 to print RTC date & time......... Reset reason: 28 Current RTC date & time: year 1970 month 1 day 1 hour 0 minutes 1 seconds 4 Current RTC date & time: year 1970 month 1 day 1 hour 0 minutes 1 seconds 6 Disclaimer — PTH3 pin on S32K3X8EVB-Q289: The EVB button mapped to PTH3 may fail to trigger a wake-up event. This is caused by the button connected to the VDD_HV_B (3.3 V) rail, while PTH3 belongs to the VDD_HV_A domain, which defaults to 5 V. The signal level mismatch prevents correct wake-up detection. Workaround: switch Jumper J23 from position 1-2 (default, 5 V) to position 2-3 (3.3 V) to align VDD_HV_A with the button voltage level before testing wake-up via PTH3. This example is provided as is with no guarantees and no support.
查看全文
* Detailed Description: * Updated the example lwip_FreeRTOS_s32K358 to enable pinging the lwIP stack from the command window * on the board RD-BESSK358BMU * *ping 192.168.0.209 * *Pinging 192.168.0.209 with 32 bytes of data: *Reply from 192.168.0.209: bytes=32 time=2ms TTL=255 *Reply from 192.168.0.209: bytes=32 time=1ms TTL=255 *Reply from 192.168.0.209: bytes=32 time=1ms TTL=255 *Reply from 192.168.0.209: bytes=32 time=1ms TTL=255 * *Ping statistics for 192.168.0.209: * Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), *Approximate round trip times in milli-seconds: * Minimum = 1ms, Maximum = 2ms, Average = 1ms * * * RD-BESSK358BMU: * - All jumpers in default positions * - SW2 needs to be ON * * Configuration: * - Updated pin configuration * - Updated GMAC clocks * - IP address set to 192.168.0.209 and enabled UDP_ECHO, etc. * - Eth_43_GMAC: configured for RGMII 1G * - Added DIO * * main.c * - Updated only the header * * device.c * - Added RTD workaround for DCMRWF* registers * * test.c * - Commented out the code that shuts down the TCP/IP stack after its predefined timeout * - Added LED task * * ------------------------------------------------------------------------------------------------ * Test HW: RD-BESSK358BMU SCH-91654 REV B1 * MCU: S32K358 * Debugger: Lauterbach Trace32 * Target: internal_FLASH * EVB connection: RJ45 <-> USB-to-Ethernet adapter <-> Laptop DELL, Windows 11
查看全文
FRDM-A-S32K358 LwIP enablement with RTD 6.0.0.
查看全文
Mapping between SPD eMCEM and DCM for S32K311, S32K312, S32K314, S32K322, S32K324, S32K341, S32K342, S32K344.
查看全文
Hi all,   Many customers complained about the K3 FlexIO I2S can not support continuous transferring because there is a gap time between 2 times of invoking SendData. This gap time will break the audio continuity and bring jitters. It is gapped by the transfer API closing and re-entry time cost.   To avoid this gap and implement a real continuous transferring, we made some changes with eDMA configurations. Finally, it works!   Besides, we also enabled eDMA half-complete interrupt to support double-buffer (ping-pong buffer) operation for user's further development.   Attachments are the example projects and corresponding introduction slides, please kindly check if you are interested in. Any problem, just let me know. Welcome your comments here.   Best Regards, Shuailin Li NXP GPIS, AE   --- Additional topic: Regarding the use of S32K3 SAI I2S to receive continuous audio data, user can use DMA continuous or S/G mode + ping-pong buffer. For details, please refer to the attached file & related codes (Use Case Share-S32K3 SAI I2S is used for audio data reception.pdf). For reference only.
查看全文
This post is an additional project to the S32K3 Low Power Management AN and demos.  A simple FlexCAN routine is configured for RX/TX and wakeup through the CAN0_RX pin (PTA6/WKPU19). The example is based on the S32K3X4EVB-T172, meaning that transceiver TJA1443 is used. TJA1443 only needs CAN0_EN & CAN0_STB pins in HIGH for normal configuration. In the example, the GREEN led is used to indicate that the MCU is in RUN mode. Once SW5 is pressed, MCU enters low power (STANDBY), and led is turned off. BLUE led toggles each time a CAN frame is received. MCU can be woken up with SW6 (WKPU42) or through a CAN RX. Note that CAN is not enabled in low-power, rather PTA6 (WKPU19) is configured for wake up, and once a rising edge signal is detected on the pin, MCU wakes up and reconfigures CAN module.  ------------------------------------------------------------------------------ * Test HW: S32K3X4EVB-T172 * MCU: S32K344 * Compiler: S32DS3.6.2 * SDK release: RTD 6.0.0 * Debugger: PE Micro * Target: internal_FLASH  ------------------------------------------------------------------------------ This example is provided as is with no guarantees and no support.
查看全文
This example project will show user how to use and configure the basic functionalities of WKPU + FlexCAN.   ------------------------------------------------------------------------------ * Test HW: S32K3X4EVB-T172 (SCH-53148 REV B2) * MCU: S32K344 * IDE: S32DS3.5 & S32DS3.6 * SDK release: RTD 6.0.0 * Debugger: PE Micro * Target: internal_FLASH  ------------------------------------------------------------------------------ This example routine configures the FlexCAN0 instance for reception. Since RevB2 of the EVB was used for development, CAN TRXCVR used is TJA1443. TJA1443 is initialized in main code (CAN0_STB = 1 & CAN0_EN = 1). FlexCAN bitrate: Bitrate: 500 Kbps Sampling point: 81.25% Individual mask is set to 0x0, meaning all IDs are accepted. Main routine: Waits for SW5 to be pressed, or for FlexCAN interrupt. If SW5 is pressed, turns off green LED, disables FlexCAN and switches CORE_CLK to FIRC. It then configures both PTB19 (SW6) and PTA6 (CAN0_RX) for interrupt wakeups. If either SW6 is pressed or a CAN message is received (edge detect on PTA6), MCU wakes up and will wait for SW5 to be pressed again. FlexCAN is configured for INTERRUPT; If a CAN frame is received, bRxFlag is set to 1 inside the callback, blue LED is toggled, and an ACK frame is sent back. CAN communication can be tested either with another EVB, or with a PCAN analyzer connected to J32. PCAN-View log for dummy and ACK messages: This example is provided as is with no guarantees and no support.
查看全文
This example project will show user how to use and configure the basic functionalities of WKPU + LPCMP.   ------------------------------------------------------------------------------ * Test HW: S32K3X4EVB-T172 (SCH-53148 REV B2) * MCU: S32K344 * IDE: S32DS3.5 & S32DS3.6 * SDK release: RTD 6.0.0 * Debugger: PE Micro * Target: internal_FLASH  ------------------------------------------------------------------------------ This example routine configures the WKPU & LPCMP units for wake-up. The S32K3XX's LPCMP can operate in trigger mode in both standby and run mode to continuously scan the input channels. RTC-API and LPCMP must be configured before entering into standby mode as per below shown figure:   See chapters 61.1.5 Comparator Trigger Mode & 61.1.6 Interaction with RTC API to cause wakeup from the S32K3XXRM (Rev. 12) for further information.   The register configurations before entering Standby mode for LPCMP trigger mode operation is the following:   Configure RTC.APIVAL to set the period of the round robin operation. Execute standby mode entry. The routine waits for SW5 to be pressed, then turns off the green LED, and enters Wkpu_EnterStandby() function which: Switches CORE_CLK to FIRC. Initializes the WKPU instance. Configures WKPU2 & WKPU42 (PTB19). Initializes and enables interrupt for LPCMP. Initializes RTC and sets the timer value (in RTCC - APIVAL) to 100ms. Starts timer. Enters standby (or fast standby). While in standby, PTA0/1/2 are active; if a voltage higher than 2.5V is detected (ICU LPCMP DAC Voltage Level = 127), or SW6 is pressed MCU will wake-up.  After wake-up, MCU resets and polls for SW5 to be pressed again. The RTC timer value can be changed with RTC_PERIOD_DELAY_MS(x) macro defined in Wkpu.h. This example is provided as is with no guarantees and no support.
查看全文
This example project will show user how to use and configure the basic functionalities of WKPU + RTC API.  ------------------------------------------------------------------------------ * Test HW: S32K3X4EVB-T172 (SCH-53148 REV B2) * MCU: S32K344 * IDE: S32DS3.5 & S32DS3.6 * SDK release: RTD 6.0.0 * Debugger: PE Micro * Target: internal_FLASH  ------------------------------------------------------------------------------ This example routine configures the WKPU & RTC units for wake-up. The RTC is present in always ON domain, hence available in RUN mode as well as in STANDBY mode. The chip contains one instance of RTC (Real Time Clock) timer and API (Autonomous Periodic Interrupt) timer, where both can perform 32-bit comparisons. Both RTC and API timers can generate interrupts as well as wake-up from low power modes. The following figure highlights the path for RTC API wake-up. Please refer to Chapter 69.3.2 API functional description from the S32K3XX reference manual (Rev. 12) for further information. The routine waits for SW5 to be pressed, then turns off the green LED, and enters Wkpu_EnterStandby() function which: Switches CORE_CLK to FIRC. Initializes the WKPU instance. Configures WKPU2 & WKPU42 (PTB19). Initializes and enables interrupt for RTC. Enables RTC API and loads the APIVAL to 3000ms.  Starts timer. Enters standby (or fast standby). After the period defined, RTC API generates an interruption and MCU wakes up. After wake-up, MCU resets and polls for SW5 to be pressed again. The RTC API value can be changed with RTC_PERIOD_DELAY_MS(x) macro defined in Wkpu.h. This example is provided as is with no guarantees and no support.
查看全文