sc16is752 spi not working

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

sc16is752 spi not working

Jump to solution
930 Views
farooq
Contributor II

Hi forks,

In our company we are using sc16is752 as an spi bridege to rs232. I am writing data into the scr registor but while reading it back i am not able to get the same data back from the registor. I am using digital  osciloscope for that. I am sending the data to the sc16is752  from the nxp imx6q based som. The chip select signal is also changes the state during the data transfer. i have attached the screenshots. Please have a look into it. Thanks.  

 

 

CS issues:

farooq_0-1672251677951.png

Writing the data to the spr registor:

farooq_1-1672251901818.png

Reading the spr registor back:

farooq_2-1672251936739.png

 

 

 

 

0 Kudos
Reply
1 Solution
891 Views
diazmarin09
NXP TechSupport
NXP TechSupport

Hello,

Thank you for using the NXP community.

  1. Could you please share the status of the I2C/SPI pin? SPI interface is selected if this pin is at logic LOW.
  2. What is the SPI clock speed used?

Regards,

David

View solution in original post

0 Kudos
Reply
3 Replies
892 Views
diazmarin09
NXP TechSupport
NXP TechSupport

Hello,

Thank you for using the NXP community.

  1. Could you please share the status of the I2C/SPI pin? SPI interface is selected if this pin is at logic LOW.
  2. What is the SPI clock speed used?

Regards,

David

0 Kudos
Reply
920 Views
diazmarin09
NXP TechSupport
NXP TechSupport

Hello,

I hope all is great with you. Thank you for using the NXP communities.

Please review the image below. You may review the writing and reading procedure.

diazmarin09_0-1672334847216.png

 

Lets assume that you want to write to the Interrupt Enable Register (IER), which its is address is 0x01.

Based on the image above, the first bit to send should be 0 (writing). After that, the four bits of the register address, 0001 and finally the channel, 00.

Therefore, the sequence to write 0xFF to the IER register should be as follow:

< 0 0 0 0 1 0 0 0 > < 1 1 1 1 1 1 1 1 >

Using the same logic, the reading procedure should be as follow:

< 1 0 0 0 1 0 0 0 > < d a t a>

 

Could you please share your results?

I hope this information helps.

Regards,

David

0 Kudos
Reply
915 Views
farooq
Contributor II

3.JPGHi fork

Thanks for your quick reply. Yes, I am writing the same way you mentioned in your post. For example, I want to write into SPR with reg address 0x07 channel 00. So I am writing 00111000 (0x38) plus 0xAA (data)  to the register and reading it back with 10111000 (0xA8) with data 0xFF. The response from the SPR register should be 0xAA but it is always different. Thank you. The CS is also creating issues at some points while writing. 

0 Kudos
Reply