Other Parts Discussed in Thread: MSP-EXP430G2ET
Hi ,
I am using the code from TRF7970ABP_RFID_Reader_Demo\NFC for ISO14443a card reading. When I reach the function ISO14443A_sendSelectCmd (shown below), g_sTrfStatus never equals RX_COMPLETE. Up until this point it seems ok. Can you offer any help?
Attached are the MISO, CLK, and MOSI for the communication during this function. It seems that I am getting collision even though only one tag is being presented. At any rate, the MISO in the last image does not seem to be synced correctly.



Thanks,
Becky
uint8_t ISO14443A_sendSelectCmd(tISO14443A_UidStatus sCascade, uint8_t * pui8UID, bool bSendCT)
{
uint8_t ui8Offset = 0;
uint8_t ui8Status = STATUS_FAIL;
uint8_t ui8Select = SEL_CASCADE1;
if (sCascade == CASCADE1)
{
ui8Select = SEL_CASCADE1;
}
else if (sCascade == CASCADE2)
{
ui8Select = SEL_CASCADE2;
}
else if (sCascade == CASCADE3)
{
ui8Select = SEL_CASCADE3;
}
else
{
return ui8Status = STATUS_FAIL;
}
g_pui8TrfBuffer[ui8Offset++] = 0x8F; // Reset FIFO
g_pui8TrfBuffer[ui8Offset++] = 0x91; // Transmit with CRC
g_pui8TrfBuffer[ui8Offset++] = 0x3D; // Write Continuous
g_pui8TrfBuffer[ui8Offset++] = 0x00; // Length of packet in bytes - upper and middle nibbles of transmit byte length
g_pui8TrfBuffer[ui8Offset++] = 0x70; // Length of packet in bytes - lower and broken nibbles of transmit byte length
g_pui8TrfBuffer[ui8Offset++] = ui8Select; // Select Command; can be 0x93, 0x95 or 0x97
g_pui8TrfBuffer[ui8Offset++] = NVB_FULL; // Number of valid bits
if (bSendCT == true)
{
g_pui8TrfBuffer[ui8Offset++] = 0x88; // CT
g_pui8TrfBuffer[ui8Offset++] = *pui8UID; // UID Bytes
g_pui8TrfBuffer[ui8Offset++] = *(pui8UID + 1);
g_pui8TrfBuffer[ui8Offset++] = *(pui8UID + 2);
g_pui8TrfBuffer[ui8Offset++] = ( 0x88 ^ *pui8UID ^ *(pui8UID + 1) ^ *(pui8UID + 2) ); // Calculate BCC Byte
}
else
{
g_pui8TrfBuffer[ui8Offset++] = *pui8UID; // UID Bytes
g_pui8TrfBuffer[ui8Offset++] = *(pui8UID + 1);
g_pui8TrfBuffer[ui8Offset++] = *(pui8UID + 2);
g_pui8TrfBuffer[ui8Offset++] = *(pui8UID + 3);
g_pui8TrfBuffer[ui8Offset++] = ( *pui8UID ^ *(pui8UID + 1) ^ *(pui8UID + 2) ^ *(pui8UID + 3) ); // Calculate BCC Byte
}
TRF79xxA_writeRaw(&g_pui8TrfBuffer[0], ui8Offset); // Issue the Select Command
g_sTrfStatus = TRF79xxA_waitRxData(5,15); // 5 millisecond TX timeout, 15 millisecond RX timeout
if (g_sTrfStatus == RX_COMPLETE)
{
ui8Status = STATUS_SUCCESS;
g_ui8Iso14443aSAK = g_pui8TrfBuffer[0];
}
else
{
// Do nothing
}
return ui8Status;
}




