Q_VAL = 0x40
I_VAL = 0x00
In mfrc663_calibrate() we calculate the I and Q values and set them in mfrc663_card_detect() routine.
We referred to AN11022 for Initialization sequence and wrote the function mfrc663_init() .We want to detect the MIFARE / 14443A card and loaded the appropriate protocol numbers (0 , 0).
We are using NXP - CLEV663B Blueboard 3.0 version. We are trying to interface this to PIC18F controller. We made the required H/W modifications and figured out that SPI READ and SPI WRITE are functioning properly.
We loaded the values 0x00,0x00 (which corresponds to MIFARE/14443A) in register 0x05.We referred to AN11145 for calibration and detection sequence and wrote the functions mfrc663_calibrate() , mfrc663_card_detect() .
Since we got I_VAL = 0x00, we considered bIMin = 0x00 (We assumed TH = 1).We set the bIMin = 0x00, bQMin = 0x39, bQMax = 0x41 and went for card detection.
We calibrated the values once in mfrc663_calibrate() and use it multiple times in mfrc663_card_detect().
In function mfrc663_card_detect() we are waiting in a loop to detect LPCD_IRQ and doesnt come out of the loop, even on showing the MIFARE card .
When we read the error register, we dont see any errors reported.
Please refer to 663_code.c for our code snippets. attached it to this case.
Please clarify on below points
a) Are the I_VAL and Q_VAL proper? Are the calcualted bIMin, bQMin, bQMax values are with in range (considering TH = 1)?
b) Do you have any PC Tool/Desktop application and scripts to communicate with the NXP - CLEV663B Blueboard 3.0 version board.
Original Attachment has been moved to: 663_code.c.zip