Example S32K311 SPI Wdg_fs23 MCAL S32DS3.5.8 RTD4.0.0

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

Example S32K311 SPI Wdg_fs23 MCAL S32DS3.5.8 RTD4.0.0

Example S32K311 SPI Wdg_fs23 MCAL S32DS3.5.8 RTD4.0.0

*****************************************************************************
*Detailed Description:
*This example will show you how to configure Wdg_fs23 Driver.
*Sbc_fs23_InitDriver, Sbc_fs23_GoToInitState, Wdg_43_fs23_Init, Sbc_fs23_InitDevice initialize the Sbc device and external Wdg in SLOW MODE(This mode can e.g. be used during system startup/initialization phase).
*Sbc_fs23_InitDevice release FS0B, according to the configuration in Sbc_fs23 WatchdogConfig tab: Release safety outputs after init
*Sbc_fs23_TimeDelay delay for an amount of time, allow Gpt ISR to trigger watchdog externally.
*Wdg_43_fs23_SetMode(WDGIF_FAST_MODE); switch Wdg operation mode to FAST MODE(This mode can e.g. be used during normal operations of the ECU).
*Wdg_43_fs23_SetTriggerCondition(10000U); sets a new timeout value to 10 seconds, during which Wdg_fs23_Cbk_GptNotification0 continuously refresh the watchdog.
*To demonstrate the watchdog timeout, Wdg_43_fs23_SetTriggerCondition was not called again to set a new timeout value, and Wdg_fs23_Cbk_GptNotification0 no longer refreshed the watchdog.
*The watchdog error counter(WD_ERR_CNT) continues to increase reached its maximum value(WD_ERR_LIMIT), causing fault error counter(FLT_ERR_CNT) to increment by 1.
*FS23 eventually enters fail-safe mode because FLT_ERR_CNT >= max. At this point, it was observed that LEDs V1 (D7), V2 (D8), and V3 (D9) of KITFS23SKTEVM were turned off.
*The SPI data between FS23 and S32K311 are captured and attached to the project.
*------------------------------------------------------------------------------
*Test HW:
*	S32K31XEVB-Q100 Board SCH-55131 REV A	P32K311HV 0P98C
*	KITFS23SKTEVM Dev-kit SCH-53096 REV B2	MFS2320BMBB1EP
*	My S32K31XEVB-Q100 has an onboard PFS2320A0L1W1, but Step 13/14 of AN14041 mention that A0 devices are not supported, so S32K311 communicate with the FS23 on the KITFS23SKTEVM.
*Connections:
	KITFS23SKTEVM                 | S32K31XEVB-Q100
	------------------------------|--------------------
	SPI_CSB    J28-2              | J12-5(PTB-17)
	SPI_MOSI   J29-2              | J12-7(PTB-16)
	SPI_SCK    J31-2              | J12-11(PTB-14)
	SPI_MISO   J32-2              | J12.9(PTB-15)
	VCC        J6-1               | J40-15
	GND        J6-2               | J40-13
	- KITFS23SKTEVM: SW1 - position 2-3 , J30 - ON, J26 5-6 ON, J26 9-10 ON .
	- Connect KITFS23SKTEVM Dev-kit and S32K3 MCU via on-board Arduino headers.
*SDK:
*	S32K3 RTD 4.0.0 (SW32K3_S32M27x_RTD_R21-11_4.0.0_D2311_DS_updatesite.zip)
*	FS23 RTD 1.0.0 (S32K3xx_SBC_FS23_R21-11_1.0.0_D2508_DesignStudio_updatesite.zip)
*Debugger: 	S32DS 3.5.8, OpenSDA/ PEmicro Multilink Universal FX
*Target: 	internal_FLASH
*Reference:
*	AN14041 FS23 quick start guide (Rev. 2.0 — 23 January 2025)
*	AN14129 FS23 implementation and behaviors (Rev. 2.0 — 13 December 2024)
*	FS23, Safety System Basis Chip (SBC) with Power Management, CAN FD and LIN Transceivers Data Sheet (Rev. 8.0 — 30 June 2025)
*	RTD_SBC_FS23_UM.pdf		C:\NXP\S32DS.3.5\S32DS\software\PlatformSDK_S32K3\SW32K3_FS23_R21-11_1.0.0_D2312\Sbc_fs23_TS_T40D34M10I0R0\doc
*	RTD_WDG_43_FS23_UM.pdf 	C:\NXP\S32DS.3.5\S32DS\software\PlatformSDK_S32K3\SW32K3_FS23_R21-11_1.0.0_D2312\Wdg_43_fs23_TS_T40D34M10I0R0\doc
*	AUTOSAR_SWS_WatchdogDriver.pdf https://www.autosar.org/fileadmin/standards/R21-11/CP/AUTOSAR_SWS_WatchdogDriver.pdf
*	This example is migrated from Wdg_fs23_example_HLD_S32K344. The method of migrating refers to the video "2.S32DS CT MCAL demo porting K344 to K312 based on RTD500": https://community.nxp.com/t5/S32K-Knowledge-Base/S32K3-Tools-Part-How-to-port-RTD-s-existing-MCAL-demo-to-other/ta-p/1966315
*****************************************************************************

Example_S32K311_SPI_Wdg_fs23_HLD_v0_0_S32DS358_RTD400 connections.jpgExample_S32K311_SPI_Wdg_fs23_HLD_v0_0_S32DS358_RTD400 saleae Logic 2.png

Attachments
No ratings
Version history
Last update:
‎11-20-2025 01:57 AM
Updated by: