S32K3_SPI_CS problem, when using GPIO to simulate CS

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

S32K3_SPI_CS problem, when using GPIO to simulate CS

ソリューションへジャンプ
927件の閲覧回数
wuxianlong
Contributor III

Hi, all

  When I used GPIO to simulate spi's CS, the data was wrong.Can you give me some help?
 

   In RTD2.0.0,  Lpspi_Ip_AsyncTransmit() calls Lpspi_TransmitTxInit() to initialize the transmission clock and reset. If the (CPOL = 1) mode is used, a low level pulse is generated each time on the SCK. If I use GPIO to simulate the CS pin of the chip, it will be interfered by this low pulse, resulting in abnormal data.

1.png2.png

BRs.

0 件の賞賛
1 解決策
911件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @wuxianlong

As seen in the Lpspi_TransmitTxInit function, it is necessary to reset all the registers due to errata ERR050456. As you saw, this is generating the low pulse that is interfering.
What I suggest is that you modify this function and send the CS after the reset to ensure that does not interfere with the data.

 

B.R.

VaneB 

元の投稿で解決策を見る

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

Hi @wuxianlong

As seen in the Lpspi_TransmitTxInit function, it is necessary to reset all the registers due to errata ERR050456. As you saw, this is generating the low pulse that is interfering.
What I suggest is that you modify this function and send the CS after the reset to ensure that does not interfere with the data.

 

B.R.

VaneB 

0 件の賞賛
820件の閲覧回数
S3RD4R
Contributor I

 

I am also using GPIO to simulate CS. I am trying to communicate with an external flash which has a flow chart of:

1 - Write command

2 - Read response

during which CS should be low. However, it is impossible in this case since in second step inevitably an extra pulse will be sent. 

Is there any workaround for this case?

0 件の賞賛
139件の閲覧回数
NemoZhang
Contributor I

I'm facing the same problem as you. Could you please tell me how you managed to resolve it?

0 件の賞賛