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:
Writing the data to the spr registor:
Reading the spr registor back:
Solved! Go to Solution.
Hello,
Thank you for using the NXP community.
Regards,
David
Hello,
Thank you for using the NXP community.
Regards,
David
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.
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
Hi 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.