S32K148 LPSPI AUTOPCS

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

S32K148 LPSPI AUTOPCS

1,009 次查看
SONGTAOSI
Contributor I

Hi,

I counfig LPSPI1 as slave, LPSPI0 as master ,and LPSPI0 transfer data to LPSPI1,and LPSPI1_AUTOPCS bit is set,   TCR[CPHA]=1.The SCK(LPAPI0 produce )remain more than 4 LPSPI clock cycle between word. But when i do not connect LPSPI0_PCS0 to LPSPI1_PCS0, the transfer between LPSPI0 and LPSPI1 is failure,LPSPI1 can't receve data which from LPSPI0. 

Whether my understand correctly about ?  :  LPSPI1_AUTOPCS = 1,and TCR[CPHA]=1,andThe SCK(LPAPI0 produce )remain more than 4 LPSPI clock cycle between word. If the above conditions are met,Even if the LPSPI1_PCS0 not connect to LPSPI0_PCS0,LPSPI can receve data from LPSPI0.

ooking forward to your reply!

0 项奖励
7 回复数

1,002 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @SONGTAOSI,

Have you scoped the bus? Can you show the oscillograms?

What is the LPSPI functional clock and CCR, TCR configuration?

Have you tried increasing the SCKPCS, PCSSCK or DBT parameters?

 

Regadrs,

Daniel

0 项奖励

992 次查看
SONGTAOSI
Contributor I

Hi,

Thank fou your reply.

my bus clock is 48MHz, and Function clock is 8M.

LPSPI0_CCR 

SONGTAOSI_0-1678755760114.png

LPSPI1_TCR

SONGTAOSI_1-1678755823838.png

Are there any other conditions required to configure AUTOPCS?

Thanks!

 

0 项奖励

983 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Thanks @SONGTAOSI, this seems to be correct.

Did you configure the polarity of the selected PCS as described here:

danielmartynek_0-1678796899588.png

 

Regards,

Daniel

0 项奖励

923 次查看
SONGTAOSI
Contributor I

Hi,

I  configure the polarity of  PCS0 = 1,selected PTD3 as PCS0,but i configure  PTD3  as GPIO .

SONGTAOSI_0-1680081702246.png

SONGTAOSI_1-1680081786534.png

 

 

标记 (1)
0 项奖励

919 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @SONGTAOSI,

Does it mean it works now?

 

 

0 项奖励

916 次查看
SONGTAOSI
Contributor I

Hi,

Sorry,It still can't work now. Could you please provide a Demo about LPSPI AUTOPCS?Thank you very much!

0 项奖励

810 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @SONGTAOSI,

I'm sorry for the delay.

Please find the test project attached (S32DS 3.4, SDK RTM 4.0.3)

The slave receives 4 8bit frames in the AUTOPCS mode (1MHz).

danielmartynek_0-1681478844969.png

 

Regards,

Daniel

0 项奖励