Implementing the new Application Note AN12657

Showing results for 
Search instead for 
Did you mean: 

Implementing the new Application Note AN12657

Contributor II

Hello, (probably Kan) 

I open a new question, because you might not see further additions to the recent dialog.
Kan, you proposed me 2 options to replace library code against short codes given, one in script format, one in pseudocode given in AN12657.
What I did: I implemented both variants. What I got: No card detection, no receive interrupt, even no transmit interrupt.
Background: I only use a specific, ISO15693 tag with an NXP chip inside. It is a small, great Murata tag. I work with the blueboard, unmodified, original antenna. The project in MCUXpresso is based on the (working) ISO15693 example.

The functions for setRegister / getRegister use the working library (bal layer) base code for the SPI interface. Since I get the correct chip version, this seems working to me.
Whenever the FIFO shall be written more then one byte, I split the writes to a series of single writes to the FIFO register address, like this is done in the script example.

I do not know, if the CLRC663 (my chip is version 0x1A) automatically does the correct bitrate towards the tag or if I have to adjust that, depending on some reaction to the tag ? There are two supported variants in the CLRC663 datasheet.
I tested the chip initialization code by embedding the new C code as a new file in the existing project, which is still working in the detection loop, if I replace the library initialization of the CLRC663 with that from script or pseudocode. The library detection loop is then still working with the initialization, done by my code.
If I use the detection from script or pseudocode, I don't get any interrupt flags in IRQ1/IRQ0 registers except for those of the timers. Even the transmission done Interrupt is not set. It seems, I miss something essential.
What about the external IRQ line - if the pseudocode enables the (wired!) IRQ line, some unwanted callback code from within the library might kill my interrupt bits, before I detect them ?

See this pseudocode fragment from AN12657 with my comments: 

13: writeRegister(0x00, 0x07);  // do a transmission, with content of fifo
14: for(counter = 0; counter < 16; counter++);  // comments state, there are 16 time slots - WHAT IS MEANT - timer reloads ? Why repeating just 16 times ? I tried to give much more loops, without change
{  // loop start
15: if(CardResponded()) // this function seems far too short described, it states to read IRQ1 - BUT THERE IS NO IRQ other then timer related

    (I have no idea, how this function shall or could be synchronized to timer events, related to mentioned time slots)
16: readRegister(0x05, UID);  // my fifo is always empty when read. Is it is meant, that a single read shall be done, or length of known fifo content ?
17: writeRegister(0x33, 0x0C);
18: writeRegister(0x2E, 0x00);   // resetting the fifo during transfer seems a bad idea to me ?
19: writeRegister(0x02, 0xB0);
20: writeRegister(0x00, 0x07);
} // loop end
21:writeRegister(0x28, 0x86); // switch off RF

Thanks for your help, I learned a lot already, but the project was interrupted again and again. So my late response.

Best Regards,

0 Kudos
2 Replies

Contributor II

In the library code is the external interrupt enabled for the CPU (LPC1769).
I commented out, those 2 codelines, which enable external interrupts - the library stops working. So the library depends on the CLRC663 Interrupt line. But my code is still not working, without external interrupt enable for the CPU.

0 Kudos

NXP TechSupport
NXP TechSupport

Hi Joachim,

I am checking with the author for this issue, and will let you know when I have any more information.

Thanks for your patience!

Have a great day,

- 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