Example S32K311 SPI Sbc_fs23 MCAL S32DS3.5.8 RTD4.0.0

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

Example S32K311 SPI Sbc_fs23 MCAL S32DS3.5.8 RTD4.0.0

Example S32K311 SPI Sbc_fs23 MCAL S32DS3.5.8 RTD4.0.0

*****************************************************************************
*Detailed Description:
*This example will show you how to configure Sbc_fs23 Driver.
*It initialization of Sbc_fs23 with watchdog window disabled. The Sbc_fs23_InitDevice() must be done within the dedicated 256 ms INIT window.
*It Disable regulator V2, then re-enable it again. FS0b pin is asserted due to V2 Undervoltage reaction setting configured in FailSafe Init Configuration tab.
*If the example runs without errors, the D12 LED on S32K31XEVB-Q100 will light up Green; otherwise, it will light up Red.
*The SPI data between FS23 and S32K311 are captured and attached to the project.
*Use the analog input of a logic analyzer or an oscilloscope to monitor the signals of FS23_V2 (TP27) and FS23_FS0 (TP8) on the KITFS23SKTEVM board.
*------------------------------------------------------------------------------
*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 Documentation:
*	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
*	This example is migrated from Sbc_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
*****************************************************************************
* Revision History:
* Ver Date Author Description of Changes
* 0.0 10-26-2025 Robin Shen Initial version
* 0.1 11-21-2025 Robin Shen Upgrade FS23 RTD 1.0.0 from S32K3xx_SBC_FS23_R21-11_1.0.0_DS_updatesite_D2402_updated_D250115.zip to S32K3xx_SBC_FS23_R21-11_1.0.0_D2508_DesignStudio_updatesite.zip
*****************************************************************************

Example_S32K311_SPI_Sbc_fs23_HLD_v0_1_S32DS358_RTD400 Connections.jpgExample_S32K311_SPI_Sbc_fs23_HLD_v0_1_S32DS358_RTD400 saleae Logic 2.png

Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-2198717%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3EExample%20S32K311%20SPI%20Sbc_fs23%20MCAL%20S32DS3.5.8%20RTD4.0.0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2198717%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E*****************************************************************************%0A*Detailed%20Description%3A%0A*This%20example%20will%20show%20you%20how%20to%20configure%20Sbc_fs23%20Driver.%0A*It%20initialization%20of%20Sbc_fs23%20with%20watchdog%20window%20disabled.%20The%20Sbc_fs23_InitDevice()%20must%20be%20done%20within%20the%20dedicated%20256%20ms%20INIT%20window.%0A*It%20Disable%20regulator%20V2%2C%20then%20re-enable%20it%20again.%20FS0b%20pin%20is%20asserted%20due%20to%20V2%20Undervoltage%20reaction%20setting%20configured%20in%20FailSafe%20Init%20Configuration%20tab.%0A*If%20the%20example%20runs%20without%20errors%2C%20the%20D12%20LED%20on%20S32K31XEVB-Q100%20will%20light%20up%20Green%3B%20otherwise%2C%20it%20will%20light%20up%20Red.%0A*The%20SPI%20data%20between%20FS23%20and%20S32K311%20are%20captured%20and%20attached%20to%20the%20project.%0A*Use%20the%20analog%20input%20of%20a%20logic%20analyzer%20or%20an%20oscilloscope%20to%20monitor%20the%20signals%20of%20FS23_V2%20(TP27)%20and%20FS23_FS0%20(TP8)%20on%20the%20KITFS23SKTEVM%20board.%0A*------------------------------------------------------------------------------%0A*Test%20HW%3A%0A*%09S32K31XEVB-Q100%20Board%20SCH-55131%20REV%20A%09P32K311HV%200P98C%0A*%09KITFS23SKTEVM%20Dev-kit%20SCH-53096%20REV%20B2%09MFS2320BMBB1EP%0A*%09My%20S32K31XEVB-Q100%20has%20an%20onboard%20PFS2320A0L1W1%2C%20but%20Step%2013%2F14%20of%20AN14041%20mention%20that%20A0%20devices%20are%20not%20supported%2C%20so%20S32K311%20communicate%20with%20the%20FS23%20on%20the%20KITFS23SKTEVM.%0A*Connections%3A%0A%09KITFS23SKTEVM%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20S32K31XEVB-Q100%0A%09------------------------------%7C--------------------%0A%09SPI_CSB%20%20%20%20J28-2%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20J12-5(PTB-17)%0A%09SPI_MOSI%20%20%20J29-2%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20J12-7(PTB-16)%0A%09SPI_SCK%20%20%20%20J31-2%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20J12-11(PTB-14)%0A%09SPI_MISO%20%20%20J32-2%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20J12.9(PTB-15)%0A%09VCC%20%20%20%20%20%20%20%20J6-1%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20J40-15%0A%09GND%20%20%20%20%20%20%20%20J6-2%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20J40-13%0A%09-%20KITFS23SKTEVM%3A%20SW1%20-%20position%202-3%20%2C%20J30%20-%20ON%2C%20J26%205-6%20ON%2C%20J26%209-10%20ON%20.%0A%09-%20Connect%20KITFS23SKTEVM%20Dev-kit%20and%20S32K3%20MCU%20via%20on-board%20Arduino%20headers.%0A*SDK%3A%0A*%09S32K3%20RTD%204.0.0%20(SW32K3_S32M27x_RTD_R21-11_4.0.0_D2311_DS_updatesite.zip)%0A*%09FS23%20RTD%201.0.0%20(S32K3xx_SBC_FS23_R21-11_1.0.0_D2508_DesignStudio_updatesite.zip)%0A*Debugger%3A%20%09S32DS%203.5.8%2C%20OpenSDA%2F%20PEmicro%20Multilink%20Universal%20FX%0A*Target%3A%20%09internal_FLASH%0A*Reference%20Documentation%3A%0A*%09AN14041%20FS23%20quick%20start%20guide%20(Rev.%202.0%20%E2%80%94%2023%20January%202025)%0A*%09AN14129%20FS23%20implementation%20and%20behaviors%20(Rev.%202.0%20%E2%80%94%2013%20December%202024)%0A*%09FS23%2C%20Safety%20System%20Basis%20Chip%20(SBC)%20with%20Power%20Management%2C%20CAN%20FD%20and%20LIN%20Transceivers%20Data%20Sheet%20(Rev.%208.0%20%E2%80%94%2030%20June%202025)%0A*%09RTD_SBC_FS23_UM.pdf%09%09C%3A%5CNXP%5CS32DS.3.5%5CS32DS%5Csoftware%5CPlatformSDK_S32K3%5CSW32K3_FS23_R21-11_1.0.0_D2312%5CSbc_fs23_TS_T40D34M10I0R0%5Cdoc%0A*%09This%20example%20is%20migrated%20from%20Sbc_fs23_example_HLD_S32K344.%20The%20method%20of%20migrating%20refers%20to%20the%20video%20%222.S32DS%20CT%20MCAL%20demo%20porting%20K344%20to%20K312%20based%20on%20RTD500%22%3A%20https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FS32K3-Tools-Part-How-to-port-RTD-s-existing-MCAL-demo-to-other%2Fta-p%2F1966315%0A*****************************************************************************%0A*%20Revision%20History%3A%0A*%20Ver%20Date%20Author%20Description%20of%20Changes%0A*%200.0%2010-26-2025%20Robin%20Shen%20Initial%20version%0A*%200.1%2011-21-2025%20Robin%20Shen%20Upgrade%20FS23%20RTD%201.0.0%20from%20S32K3xx_SBC_FS23_R21-11_1.0.0_DS_updatesite_D2402_updated_D250115.zip%20to%20S32K3xx_SBC_FS23_R21-11_1.0.0_D2508_DesignStudio_updatesite.zip%0A*****************************************************************************%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Example_S32K311_SPI_Sbc_fs23_HLD_v0_1_S32DS358_RTD400%20Connections.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Example_S32K311_SPI_Sbc_fs23_HLD_v0_1_S32DS358_RTD400%20Connections.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F366753i5001F49727EDC2D9%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Example_S32K311_SPI_Sbc_fs23_HLD_v0_1_S32DS358_RTD400%20Connections.jpg%22%20alt%3D%22Example_S32K311_SPI_Sbc_fs23_HLD_v0_1_S32DS358_RTD400%20Connections.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Example_S32K311_SPI_Sbc_fs23_HLD_v0_1_S32DS358_RTD400%20saleae%20Logic%202.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Example_S32K311_SPI_Sbc_fs23_HLD_v0_1_S32DS358_RTD400%20saleae%20Logic%202.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F366752iC0A6C86B37EFF242%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Example_S32K311_SPI_Sbc_fs23_HLD_v0_1_S32DS358_RTD400%20saleae%20Logic%202.png%22%20alt%3D%22Example_S32K311_SPI_Sbc_fs23_HLD_v0_1_S32DS358_RTD400%20saleae%20Logic%202.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
2 weeks ago
Updated by: