PCA9502 read back gpio using spi not working

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

PCA9502 read back gpio using spi not working

792件の閲覧回数
subrahmanyapere
Contributor I

pastedImage_1.png

i am trying to do a read back  of gpio lines using spi and it is not working.I have attached the spi commands i am sending.Please let me know what i am doing wrong .

pastedImage_2.png

タグ(2)
0 件の賞賛
3 返答(返信)

654件の閲覧回数
subrahmanyapere
Contributor I

I am still having the same issue can you please help me fix this .I just want to read the gpio ports  and these are the spi transactions i send 

pastedImage_1.png

0 件の賞賛

654件の閲覧回数
reyes
NXP TechSupport
NXP TechSupport

Hi,

The usual steps on the master side for writing are:

* Configure desired speed within slave spec

* Assert SS/CS

* Send write command

* Start sending data/Ignore incoming data

* Stop by de-asserting SS/CS

 SPI write.png

The usual steps on the master side for reading are:

* Configure desired speed within slave spec

* Assert SS/CS

* Send read command

* Send dummy data/received data

* Stop by de-asserting SS/CS

 SPI read.png

In the image you sent I cannot see the SS/CS configuration unless is the “SPI EN” signal in which case is not doing what it supposed to do.

Regards,

Jose

NXP Semiconductor

0 件の賞賛

654件の閲覧回数
subrahmanyapere
Contributor I

pastedImage_1.png

i still have the same problem.you can see my spi enable line goes low during the transaction .but my miso line returns ff.

I write to reg A abd read on reg B.

0 件の賞賛