CLRC663 ISO15693 File Issues

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

CLRC663 ISO15693 File Issues

Jump to solution
3,000 Views
mgaschler
Contributor II

Hi,

Last week, I posted asking about a script to read ISO15693 tags over I2C. I was able to access the registers of the CLRC663 over I2C but was looking for a guide on how to configure the registers to successfully read the tag. An NXP employee responded and provided me the attached file, which was a good start. However, when running the script in NFC Cockpit, I would get an error on line 72. I believe it was a syntax error due to a missing colon. Since I corrected it, I no longer obtain an error but every time I run the script, it crashes Cockpit. After doing some testing, I discovered it was because the value of IRQ1_REG is 0x43, not 0x40, so it gets stuck in an infinite loop. Do you know how I can fix this? If I change the 0x40 value to 0x43, it fixes the infinite loop problem but then I receive no data in the FIFO when trying to read an NFC tag. Thanks.

Labels (2)
0 Kudos
1 Solution
2,959 Views
mgaschler
Contributor II

Found a solution on this topic:

https://community.nxp.com/t5/NFC/CLRC663-Commands/m-p/1419338#M9221

As mentioned in the above link, I used AN12657 and followed the examples in there which provide a concise method of using the registers to read a tag. Therefore, I had no need for the text file I posted about here and instead followed the example code in AN12657.

View solution in original post

0 Kudos
11 Replies
2,960 Views
mgaschler
Contributor II

Found a solution on this topic:

https://community.nxp.com/t5/NFC/CLRC663-Commands/m-p/1419338#M9221

As mentioned in the above link, I used AN12657 and followed the examples in there which provide a concise method of using the registers to read a tag. Therefore, I had no need for the text file I posted about here and instead followed the example code in AN12657.

0 Kudos
2,747 Views
madid
Contributor I

Hello,

I implemented the example 4.2.1 example code - Inventory -ISO15693 of the application note AN12657 about the NFC reader MFRC630 without success. Please, can you clarify step 15 The function CardResponded reads the IRQ0 register, which indicates if a card has responded or not? What are the IRQ0 register bits to test?

Can you help me?

Thank you

0 Kudos
2,745 Views
AlexanderB
NXP Employee
NXP Employee

Hi @madid ,

the MFRC630 is a ISO/IEC 14443A, Type-A, reader only. ISO15693 is another technoloy (Type-V) which this reader is not capable of! 

Best regards,
Alexander

0 Kudos
2,743 Views
madid
Contributor I

Hello,

I'm sorry, my reader is CLRC663 and support ISO15693. I've checked with NFC Cockpit. Can you help me about the step 15 of example 4.2.1 of application note AN12657?

Thank you

Best regards

0 Kudos
2,738 Views
AlexanderB
NXP Employee
NXP Employee

Hi @madid ,

did you check the software example "Anticollision register layer for CLRC663"?

In this example you will find one way to read the IRQ0 to check for an answer:

void waitForCardResponse()
{
	uint8_t IRQ0 = 0x00;
	uint16_t counter = 0x00;

	/* Continuous Loop, which exits if the IRQ0 == 0x3c or IRQ0 == 0x03e or the counter is bigger than 1000
	 *
	 * Register 0x06 is the IRQ0 (Interrupt Register 0)
	 *
	 * When the Card has responded following bits will be set in IRQ0.
	 * The value 0x3c (0011 1100) translates to: FIFO data number has reached the bottom level as configured by the register WaterLevel
	 * 											 Command terminated by itself
	 * 											 Data transmission is completed
	 * 											 Receiver detects end of data stream
	 *
	 * The value 0x3e (0011 1110) translates to: same as 0x3c + An Error has occurred
	 *
	 * If the Card hasn't responded after 10000 loop cycles then exit the loop to prevent getting stuck in an infinite loop.
	 */
	while(IRQ0 != 0x3c && IRQ0 != 0x3e && counter < 10000)
	{
		readRegister(0x06, &IRQ0);
		counter++;
	}
}

 

I hope this answers your question  

Greetings, Alex

0 Kudos
2,736 Views
madid
Contributor I

Hello,

I didn't, but now I implemented the routine "waitForCardResponse" and did not work. The IRQ0 is always 0x28. Where I can found the example "Anticollision register layer for CLRC663"?

Thanks

0 Kudos
2,727 Views
AlexanderB
NXP Employee
NXP Employee

Hi @madid ,

if you go to the CLRC663 product page, click on "Design Resources" and scroll down to "Software" you will find software examples, libraries and the associated PSP. 

Link: https://www.nxp.com/products/rfid-nfc/nfc-hf/nfc-readers/clrc663-iplus-i-family-high-performance-nfc...

I don't know what your host controller is. But if your main concern is not memory you might have a look into the NFC Reader Library. It will ease up your integration effort by a lot.

Best regards,
Alexander

0 Kudos
2,720 Views
madid
Contributor I

Hello,

I saw the NxpNfcRdLib library. It seems very complex to me for what I need. It consists of 464 .c and .h files. What I need is to read the UID and read and write the memory blocks of the TAG. My host is a micro STM32. Is there no documentation on the operations to be done to get what I need? From the application note AN12657 it would seem that about twenty operations on the registers are needed. It seems absurd to me to reverse engineer the NxpNfcRdLib library just because I use a micro that is not NXP

Best regards

0 Kudos
2,713 Views
AlexanderB
NXP Employee
NXP Employee

Hi,

Yes, the NFC Reader Library is big. That is because it supports all protocols and different operation modes, such as EMVCo, NFC Forum or ISO/IEC. 
Within the package is a DoxyGen documentation of it. The overview gives a good idea of its architecture and structure. 

If you look at some examples they use only a subset of the NFC Reader Library to fullfill the needs of this particular example. 

Operating on register level is for sure the slimest version. But implementation a anti-collision with it is also not easy. 

I don't want to push you towards the NXP NFC Reader Library. I only wanted to point it out that it might help. Maybe the HAL (Hardware Abstraction Layer) for the CLRC663 will help you already a great deal to ease the process of operating the controller. If you stack the ISO/IEC-15693 protocol layer on top you need only a couple of APIs for all you described. 

Porting the nfclib is actually quite easy. You only need to abstract the phDriver layer. Which consists of an GPIO Input (IRQ), Timers and BAL (Bus Abstraction Layer, which is the hardware interface to your front-end; Like SPI). 

On the question if there is no documentation for your use-case at register level; The answer is unfortunately simple: No
For that exact purpose the reader library was developed. To ease the process of tag operations and not having to bother with the registers. Usually in a commercial reader you have to take care of a lot more as only the simplest tag operation. You have to take care of your analog parameters, power management, complying with different certification institutions, etc... 

Of course if you need help with anything feel free to ask  

Best regards,
Alexander

0 Kudos
2,708 Views
madid
Contributor I

Hello,

is there a tutorial to import the library to make it work with a host that is not NXP?

Thanks

Best regards

0 Kudos
2,578 Views
AlexanderB
NXP Employee
NXP Employee

Hi @madid ,

unfortunately there isn't. But it is only as much as porting the phDriver (DAL) layer. 

Best regards,
Alexander

0 Kudos