S32K知识库

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

S32K Knowledge Base

标签

讨论

排序依据:
* 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
查看全文
Mapping between SPD eMCEM and DCM for S32K311, S32K312, S32K314, S32K322, S32K324, S32K341, S32K342, S32K344.
查看全文
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 ****************************************************************************************************
查看全文