Example S32K312 Continuous SPI Transmit & Receive Using DMA DS3.5 RTD300

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

Example S32K312 Continuous SPI Transmit & Receive Using DMA DS3.5 RTD300

Example S32K312 Continuous SPI Transmit & Receive Using DMA DS3.5 RTD300

*******************************************************************************

 The purpose of this demo application is to present a usage of the
 LPSPI IP Driver for the S32K3xx MCU.

 The example uses LPSPI2 for transmit & receive Twelve bytes using the DMA.
This above mentioned operation is performed 10 times continuously
MOSI MISO connected on Hardware in loopback.


 ------------------------------------------------------------------------------
* Test HW: S32K3X2EVB-Q172
* MCU: S32K312
* Compiler: S32DS3.5
* SDK release: RTD 3.0.0
* Debugger: PE micro
* Target: internal_FLASH
********************************************************************************

For S32K312, please use this correct clock HSE to AIPS clock should be ½.
Please make these changes in the below all example code clock setting.
HSE clock to 60 MHZ.

Dinesh_Guleria_0-1721124304036.png

 



Dinesh_Guleria_0-1705047952901.png

Dinesh_Guleria_1-1705047972487.png

 

Use this MACRO to enable disable the non cacheable region variable placement :--

Dinesh_Guleria_0-1736407682746.jpeg

 

Dinesh_Guleria_1-1736407682748.jpeg

 

Dinesh_Guleria_2-1736407682749.jpeg

 

Dinesh_Guleria_3-1736407682750.jpeg

 

 

Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-2024597%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20S32K312%20Continuous%20SPI%20Transmit%20%26amp%3B%20Receive%20Using%20DMA%20DS3.5%20RTD300%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2024597%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%0A%3CDIV%20class%3D%22lia-message-template-content-zone%22%3E%0A%3CP%3E%3CSPAN%3E*******************************************************************************%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3BThe%20purpose%20of%20this%20demo%20application%20is%20to%20present%20a%20usage%20of%20the%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3BLPSPI%20IP%20Driver%20for%20the%20S32K3xx%20MCU.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3BThe%20example%20uses%20LPSPI2%20for%20transmit%20%26amp%3B%20receive%20Twelve%20bytes%20using%20the%20DMA.%3CBR%20%2F%3EThis%20above%20mentioned%20operation%20is%20performed%2010%20times%20continuously%3CBR%20%2F%3E%3C%2FSPAN%3EMOSI%20MISO%20connected%20on%20Hardware%20in%20loopback.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3B------------------------------------------------------------------------------%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20Test%20HW%3A%20S32K3X2EVB-Q172%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20MCU%3A%20S32K312%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20Compiler%3A%20S32DS3.5%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20SDK%20release%3A%20RTD%203.0.0%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20Debugger%3A%20PE%20micro%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20Target%3A%20internal_FLASH%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E********************************************************************************%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EFor%20S32K312%2C%20please%20use%20this%20correct%20clock%20HSE%20to%20AIPS%20clock%20should%20be%20%C2%BD.%3CBR%20%2F%3E%3CSTRONG%3EPlease%20make%20these%20changes%20in%20the%20below%20all%20example%20code%20clock%20setting.%3C%2FSTRONG%3E%3CBR%20%2F%3EHSE%20clock%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E60%20MHZ.%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_0-1721124304036.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_0-1721124304036.png%22%20style%3D%22width%3A%20399px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F288743i65A818372B17B668%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_0-1721124304036.png%22%20alt%3D%22Dinesh_Guleria_0-1721124304036.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_0-1705047952901.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_0-1705047952901.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257953iC74AF4B53BABD750%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_0-1705047952901.png%22%20alt%3D%22Dinesh_Guleria_0-1705047952901.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_1-1705047972487.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_1-1705047972487.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257954iB3975C616D806BD3%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_1-1705047972487.png%22%20alt%3D%22Dinesh_Guleria_1-1705047972487.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3EUse%20this%20MACRO%20to%20enable%20disable%20the%20non%20cacheable%20region%20variable%20placement%20%3A--%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_0-1736407682746.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_0-1736407682746.jpeg%22%20style%3D%22width%3A%20371px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F318737i97A96F3C0B4D0600%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_0-1736407682746.jpeg%22%20alt%3D%22Dinesh_Guleria_0-1736407682746.jpeg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_1-1736407682748.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_1-1736407682748.jpeg%22%20style%3D%22width%3A%20355px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F318738iD2F770A62C32D76E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_1-1736407682748.jpeg%22%20alt%3D%22Dinesh_Guleria_1-1736407682748.jpeg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_2-1736407682749.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_2-1736407682749.jpeg%22%20style%3D%22width%3A%20340px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F318739i7103F354533F247C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_2-1736407682749.jpeg%22%20alt%3D%22Dinesh_Guleria_2-1736407682749.jpeg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_3-1736407682750.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_3-1736407682750.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F318740i329B563930EFBDCE%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_3-1736407682750.jpeg%22%20alt%3D%22Dinesh_Guleria_3-1736407682750.jpeg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CLI-WRAPPER%3E%3C%2FLI-WRAPPER%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3C%2FDIV%3E%0A%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎01-09-2025 12:29 AM
Updated by: