Communication to CLRC663 via SPI interface

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

Communication to CLRC663 via SPI interface

Jump to solution
935 Views
Anjary
Contributor I

I'm working on a project to interface to the CLRC663 chip using the SPI interface. So far I have procured a CLEV663OARD board as I was unable to get any chips for several months so I'm using this to interface to the processor that I will be using. I'm writing the commands directly into the processor that I am using to interface instead of using the NXP library.

I have been working on the board for a week now with limited success. So I'm now at the stage to check what I am doing is correct and understand further on how I can move forward.

I'm using the SPI interface and the board/chip is power via a 3.3V supply. To verify that my communication interface is operating correctly I have used the command "Read Version" to extract the version of the chip from the unit. This works correctly and I get the answer 1Ah telling me that the chip is CLRC66303 with LPCD options. Which is the chip that I require. With this working I believe that the communications is operating correctly.

Where my issues arise is in the detection of the card, both ISO1443A and ISO15693, also with the setting and operation of the LPCD. I have checked the signals going to the chip via a CRO and decoded the value to confirm that they are correct.

I have used the document AN12657 which outlines the detection of an ISO1443A card. I have followed the sequence on page 7 sending the commands to the card and then waiting for the card response, monitoring the IRQ0 register. What I find is that the response that I get back from the IRQ0 register does not indicate when a card is on the field. Often I am getting 7Ah in response to reading the IRQ0 registry which indicates that the command has terminated itself. I have checked the output of the CLRD663 Pin 15 (TX2) and the 13.56MHz signal is being transmitted. So I believe that the configuration sequence is correct

In looking at the SPI interface on the documentation it states that the SPI can go up to 10Mhz/bit. This has me a little confused given that the given that as far as I can tell the CLRC663 chip clock is running at 27.12MHz, this doesn't give many clock cycles for the commands to be processed. I have run the SPI interface at 1.5MHz and down to 500kHz, but this doesn't seem to change anything. Is there a minimum period in sending each command to the unit so it has time to process the last command? At the moment I'm sending each command in a continuous stream, with a break in the Chip select (NSS) between each command.

I have also tested the LPCD operation using the sequence in the document AN11145. Each time I run the sequence I get the results: I = 00h, and Q = 40h. Which to me doesn't sound like valid responses.

To step back and verify the communications further I have tested the Random number generation using the following commands:
WriteRegister(00, 00) - Set Idle and clear command
WriteRegister(02, 0B) - Clear the FIFO
WriteRegister(00, 1C) - Start Random number generation
Check for data being loading into the FIFO
ReadRegister(02, 00) - Read FIFO control to test for highwater mark (added in case loading of the FIFO took time)

ReadRegister(05, 05, 00) -- Read 5 bytes out of the FIFO

I find that I'm not getting inconsistent results with the data that I would expect each time this is run. In fact after the first three bytes I'm getting zeros are always returned. Therefore not very random.

I have now run out of ideas on what else to check to get this going. Playing with the chip as a blackbox and only getting the "Version" back constantly makes me think that that maybe my writing to the registers is not working. I have verified the data stream going in via a CRO and I'm happy that the data is being sent correctly. So I'm looking for some information on the timing of the commands, and if they need to be spaced further apart for processing? Any other advise on how to proceed would be appreciated. Unfortunately I only have one board so I can't do a comparison against another board (chip) to validate that it isn't a board issue.

0 Kudos
1 Solution
914 Views
fangfang
NXP TechSupport
NXP TechSupport

Hello,

Please refer to the more information as the document.

URL:https://community.nxp.com/t5/NFC-Knowledge-Base/how-to-communicate-between-LPC1769-and-RC663-via-SPI....

Hope it help you.

Have a nice day.

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-----------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
915 Views
fangfang
NXP TechSupport
NXP TechSupport

Hello,

Please refer to the more information as the document.

URL:https://community.nxp.com/t5/NFC-Knowledge-Base/how-to-communicate-between-LPC1769-and-RC663-via-SPI....

Hope it help you.

Have a nice day.

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-----------------------------------------------------------------------------

0 Kudos