iwanders / MFRC630

A library for NXP's MFRC630 NFC IC.
MIT License
59 stars 22 forks source link

CLRC663 #7

Closed arunsss123 closed 5 years ago

arunsss123 commented 5 years ago

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

iwanders commented 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.

arunsss123 commented 5 years ago

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 .

iwanders commented 5 years ago

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.

arunsss123 commented 5 years ago

Sir,i am done the following method to get the data about version and sub version register,

arunsss123 commented 5 years ago

Still not getting the version and subversion ID through the SPI, please provide any examples.

arunsss123 commented 5 years ago

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();

iwanders commented 5 years ago

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.