Timing delay in the command sequence for extracting values for LPCD using the CLRC663

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

Timing delay in the command sequence for extracting values for LPCD using the CLRC663

1,202 Views
Anjary
Contributor I

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.

 

0 Kudos
Reply
4 Replies

1,165 Views
Anjary
Contributor I

Thank you again for looking at this. I have used this document and it doesn't go into any detail on checking for the LPCD having finished. I have also used this document for trying to communicate to the card. This is another question that I have posted.

I will play around with the idle interrupt to see if that is triggered once the "Execute LPCD auto trimming" command has been sent. If this doesn't work I will stick with the delay.

 

0 Kudos
Reply

1,174 Views
Anjary
Contributor I

Thank you for your response. But I'm trying to communicate to the CLRC663 directly via the SPI interface without using the NXP library.   There appears to be very little information on the operation of the chip and how it operates. Everything sends me back to the NXP library.  I have searched the web for sample code with minor success which is how I worked out the LPCD in the first place. But this did not mension anything about a delay for the chip to complete the processing. I worked this out after several days of frustration.   Is it possible that I just need to check the Idle bit in Interrupt 0 to know when the LPCD processing has completed?

0 Kudos
Reply

1,169 Views
fangfang
NXP TechSupport
NXP TechSupport

Hello,

Please refer to the code which may be useful.

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

 

-------------------------------------------------------------------------------
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
Reply

1,179 Views
fangfang
NXP TechSupport
NXP TechSupport

Hello,

Please refer to the related library NxpNfcRdLib_RC663_LPC1769_v06.11.01_Full\NfcrdlibTst12_Rc663Lpcd as the link.

URL:https://nxp.flexnetoperations.com/control/frse/product?entitlementId=547970147&lineNum=1&authContact....

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
Reply