Closed arunsss123 closed 5 years ago
If it's a custom board and the SPI communication looks fine with a logic analyzer it's likely a hardware problem. It can be a lot of things, from incorrect interface selection to the crystal not providing a stable clock. There's little I can do besides saying double-check the circuitry, check if the pins are at the appropriate logic levels. In particular check that the IFSEL
pins are set up correctly for SPI, check all the power pins and the PDOWN
pin.
I used the mfrc630_read_fifo
, mfrc630_fifo_length
and mfrc630_write_fifo
functions to confirm that the chip was responding to my SPI signals when I worked on this. If you can write data and read the same back you've confirmed the chip works and your communication works.
Thanks for replaying me,i am sending the 0x7f command for the getting version of the clrc663 reader it is not responsing ,what are the commands need to send to get the product information.
On Sat, Apr 13, 2019 at 6:36 AM Ivor Wanders notifications@github.com wrote:
If it's a custom board and the SPI communication looks fine with a logic analyzer it's likely a hardware problem. It can be a lot of things, from incorrect interface selection to the crystal not providing a stable clock. There's little I can do besides saying double-check the circuitry, check if the pins are at the appropriate logic levels. In particular check that the IFSEL pins are set up correctly for SPI, check all the power pins and the PDOWN pin.
I used the mfrc630_read_fifo, mfrc630_fifo_length and mfrc630_write_fifo functions to confirm that the chip was responding to my SPI signals when I worked on this. If you can write data and read the same back you've confirmed the chip works and your communication works.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/iwanders/MFRC630/issues/7#issuecomment-482809892, or mute the thread https://github.com/notifications/unsubscribe-auth/AZrU8IOgBY20HdGGByvPxp1jI5epIhCdks5vgd1jgaJpZM4crxTS .
I think 0x7f
is correct, you should be able to rely on the functions from this library and do:
const uint8_t ic_version = mfrc630_read_reg(MFRC630_REG_VERSION);
If the SPI communication is setup correctly this should be all you need to do.
Sir,i am done the following method to get the data about version and sub version register,
i am taken Temp as variable in code,i am attaching the code spi_cmd_send(0x7f);//sending the command 7f Temp=0;//restting the variable while (!SPI_GetFlagStatus(HT_SPI0, SPI_FLAG_RXBNE)); Temp=SPI_ReceiveData(HT_SPI0);//receving the data through the spi recieve function spi_cmd_send(0x01); Temp=0; while (!SPI_GetFlagStatus(HT_SPI0, SPI_FLAG_RXBNE)); Temp=SPI_ReceiveData(HT_SPI0); spi_cmd_send(0x00); Temp=0; while (!SPI_GetFlagStatus(HT_SPI0, SPI_FLAG_RXBNE)); Temp=SPI_ReceiveData(HT_SPI0);
each time i am checking the temp variable.
Still not getting the version and subversion ID through the SPI, please provide any examples.
i have checked following method also sir,still i am getting oxff only
spi_active();
spi_cmd_send(0xFF);
while (!SPI_GetFlagStatus(HT_SPI0, SPI_FLAG_RXBNE));
Temp=SPI_ReceiveData(HT_SPI0);
spi_inactive();
spi_active();
spi_cmd_send(0x00);
while (!SPI_GetFlagStatus(HT_SPI0, SPI_FLAG_RXBNE));
Temp=SPI_ReceiveData(HT_SPI0);
spi_inactive();
I presume spi_cmd_send
is a raw SPI command, in that case it is wrong. You have to set the bit to read the register. See the read_reg implementation. Read the datasheet to understand how to talk to this chip.
You are not using this library, neither do you take the effort to format your posts such that they are conveniently readable. I'm closing this issue as it is off-topic as it does not pertain to this library. I don't want to provide general help in how to talk to an IC over SPI.
We are using the custom board with the Reader ic is CLRC663 and SPI is used for the interfacing with microcontroller. SPI is configured as mentioned in the Datasheet of the clrc663 reader.The issue is there is no response from the reader.SiPI is working FIne.
**need help for the communication