I have been testing the interface with the CLRC663 NXP chip and I have a question on the timing for the commands.
Using the Application note document AN11145 I have extracted the Q and I values for IMin, IMax, QMin and QMax. The question is that to extract the values I need to add a delay within the command stream.
An extract from the example on page 11 is:
31 SR 24 00 // Write min. T4 reload value Hi
32 SR 25 05 // Write min. T4 reload value Lo
33 SR 23 F8 // Config T4 for AutoLPCD&AutoRestart.Set AutoTrimm bit.Start T4.
34 SR 43 40 // Clear LPCD result
35 SR 38 52 // Set Rx_ADCmode bit
36 SR 39 03 // Raise receiver gain to maximum
37 SR 00 01 // Execute Rc663 command "Auto_T4" (Low power card detection and/or Auto trimming)
38 // Flush cmd and Fifo
39 SR 00 00
40 SR 02 B0
41 SR 38 12 // Clear Rx_ADCmode bit
42 //> ------------ I and Q Value for LPCD ----------------
43 //> ----------------------------------------------------
44 GR 42 //> Get I
45 GR 43 //> Get Q
46 //> --------------LPCD_Config - done. -------------------
What I have found is that I need to add a delay between lines 37 and 39, between executing the LPCD extract and the clearing of the command. What I would like to know is how long a period should I wait? I have left a substantial delay of about 300ms to make sure that the command completes. Is there anything that I can check in the registers; polling, or interrupt; to know when it has finished so I executing the Auto trimming? The document doesn't give any mention of a delay being required.
After the delay and extraction of the values, using the values calculated work fine with the LPCD operation and the interrupt triggers once a card is within the field.