S32K1 LPSPI half duplex without using SDK or RTD

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K1 LPSPI half duplex without using SDK or RTD

ソリューションへジャンプ
531件の閲覧回数
Jembed
Contributor II

Hello @danielmartynek,

I want to use S32K148 LPSPI module to communicate with a RF module. I don't want to use SDK or RTD drivers. The module interface is based on 3-wire SPI (half duplex). The communication method is that first I send a byte(register address) on the data line and then the slave module puts a byte(register read data) on the SDIO (data line) in response. 

The image below is a part of the slave module datasheet. As shown in the picture, the manufacturer recommends that the MCU changes the state of its data line to the input before the last falling edge of the clock, so that it does not overlap with the time, slave turns to output state (which occurs after the mentioned falling edge). 

Jembed_0-1700367835846.png

 

As I have specified in the image above, I guess that the MCU changes the state of the SDIO line to input, after the recommended edge, and there is an interval of time in which both sides are at output state.

I want to use the register level routine, introduced in this topic:

https://community.nxp.com/t5/S32K/S32K-3-Wire-SPI-Drivers/td-p/1342666

What should I do to make sure that the warned contention will not occur on the SDIO line?

Thanks a lot

0 件の賞賛
返信
1 解決策
464件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Jembed,

Please find my test project attached.

It sends one 16b frame (RXMSK = 1) and reads one 16bit frame (TXMSK = 1) in continous mode (CPHA = 0, CPOL = 0, PINCFG = 2, OUTCFG = 1 ).

SOUT (PTB16) is connected to a voltage divider, SOUT = 2.7V in High-Z mode.

As you can see, the SOUT is released (High-Z) at the last falling edge of SCK.

danielmartynek_0-1700661299534.png

 

Regards,

Daniel

 

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
465件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Jembed,

Please find my test project attached.

It sends one 16b frame (RXMSK = 1) and reads one 16bit frame (TXMSK = 1) in continous mode (CPHA = 0, CPOL = 0, PINCFG = 2, OUTCFG = 1 ).

SOUT (PTB16) is connected to a voltage divider, SOUT = 2.7V in High-Z mode.

As you can see, the SOUT is released (High-Z) at the last falling edge of SCK.

danielmartynek_0-1700661299534.png

 

Regards,

Daniel

 

0 件の賞賛
返信
435件の閲覧回数
Jembed
Contributor II
Hi @danielmartynek,
Thanks for your response. Is this behavior confirmed in the S32K1 reference manual or any other official documents from NXP?
0 件の賞賛
返信
428件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Jembed,

It is not explicitly stated in the S32K1xx documentation.

 

Regards,

Daniel

0 件の賞賛
返信