AnsweredAssumed Answered

Implementing the new Application Note AN12657

Question asked by Joachim Kroeger on May 26, 2020
Latest reply on Jun 4, 2020 by Kan_Li

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,