Delay between frames on LPSPI

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

Delay between frames on LPSPI

Jump to solution
1,683 Views
Grzechu81
Contributor I

Hello,

 

uC: MWCT2016S (S32K312)

When using 32 bit data width for ExternalBuffer in SPI Channel configuration I've noticed that there is still a 6us delay between 4 bytes frames on SPI (see attachment).

Interesting thing is that delay length is the same as frame length (6,23 us).

I am using Spi_SyncTransmit API.

How to get rid (if possible) of this delay ?

0 Kudos
Reply
1 Solution
1,653 Views
PavelL
NXP Employee
NXP Employee

Hi @Grzechu81 ,

you need to setup LPSPI CCR1 register - field PCSPCS - please find detailed description in S32K3 RM rev9, chapter 70.6.1.13 .

Best regards,

Pavel

View solution in original post

2 Replies
1,654 Views
PavelL
NXP Employee
NXP Employee

Hi @Grzechu81 ,

you need to setup LPSPI CCR1 register - field PCSPCS - please find detailed description in S32K3 RM rev9, chapter 70.6.1.13 .

Best regards,

Pavel

1,632 Views
Grzechu81
Contributor I

Yes, this was it, I was using default timings in Tresos SPI configuration because i thought they are not taken into consideration since I'm not using CS driven by SPI engine but the GPIO.

Thanks a lot, have a nice day

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1976038%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EDelay%20between%20frames%20on%20LPSPI%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1976038%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EuC%3A%20MWCT2016S%20(S32K312)%3C%2FP%3E%3CP%3EWhen%20using%2032%20bit%20data%20width%20for%20ExternalBuffer%20in%20SPI%20Channel%20configuration%20I've%20noticed%20that%20there%20is%20still%20a%206us%20delay%20between%204%20bytes%20frames%20on%20SPI%20(see%20attachment).%3C%2FP%3E%3CP%3EInteresting%20thing%20is%20that%20delay%20length%20is%20the%20same%20as%20frame%20length%20(6%2C23%20us).%3C%2FP%3E%3CP%3EI%20am%20using%26nbsp%3B%3CSPAN%3ESpi_SyncTransmit%20API.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EHow%20to%20get%20rid%20(if%20possible)%20of%20this%20delay%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1976790%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Delay%20between%20frames%20on%20LPSPI%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1976790%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYes%2C%20this%20was%20it%2C%20I%20was%20using%20default%20timings%20in%20Tresos%20SPI%20configuration%20because%20i%20thought%20they%20are%20not%20taken%20into%20consideration%20since%20I'm%20not%20using%20CS%20driven%20by%20SPI%20engine%20but%20the%20GPIO.%3C%2FP%3E%3CP%3EThanks%20a%20lot%2C%20have%20a%20nice%20day%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1976191%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Delay%20between%20frames%20on%20LPSPI%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1976191%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F211267%22%20target%3D%22_blank%22%3E%40Grzechu81%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3Eyou%20need%20to%20setup%20LPSPI%20CCR1%20register%20-%20field%20PCSPCS%20-%20please%20find%20detailed%20description%20in%20S32K3%20RM%20rev9%2C%20chapter%2070.6.1.13%20.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E