This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DLP7970 Booster Pack

Other Parts Discussed in Thread: TRF7970A, MSP430G2553, MSP430F5529

Hi everyone;

I'm working on the DLP7970 to read UID from tags. For ISO15693; I write register values initially ,then i send inventory sequences periodically;by this way, i can get UID from tags. But i am confused about some points. 

Firstly; My MCU and DLP7970 communicate with SPI. I wired only SCK,MOSI,MISO,SS and EN pins.  Am i need to control IRQ pin from DLP7970? 

Secondly; I need to read UIDs from MİFare Classic(ISO14443 Cards).  Can i read UIDs from ISO1443 in the same way with ISO15693?

Thanks;

  • Hi Emre,

    Yes you have to have the IRQ line connected between your MCU and the DLP7970, and ideally it should be connected to a GPIO which has interrupt capability so you can run an IRQ handler with an Interrupt Service Routine (ISR). This is the best method to implement the design, though you could also try polling instead for a less efficient design. Depending on your technology type, polling could also have timing issues which an ISR would not have.

    Regarding Mifare Classic, if the only thing you want to do is read a UID, then yes you could do it similar to ISO15693 with the correct commands (REQA/WUPA, Select etc.). However if you want to interact with the tag any further beyond getting only the UID, you will need to go through the Auth process for the Mifare Classic which requires putting the TRF7970A (the part on the DLP7970) into Special Direct Mode in order to handle the timings and tag responses. We have a firmware example which handles all of this available which you can request to access. The link to the firmware can be found in this app note which discusses Mifare Classic in detail: http://www.ti.com/lit/an/sloa214/sloa214.pdf

  • Hi Ralph;

    Thank you for this quick and explanatory answer.

    Firstly; I understand the necessity of ISR, actually i have confronted with the timing issues while working on the Iso15693 cards. I solved it with the proper delays. I should have check the ISR.,so I will follow your suggestion

    Secondly; it seems that i need to get only UID. So; i need to send only correct command. Do you have any suggestion for document these commands ?

    Thank you again; i will give the feedback here for my project process.

    Best regards.

    Emre.
  • if all you need is UID from the ISO15693 card, send Inventory Command 

    for TRF79xx, from the MCU, once configured for ISO15693 and with the transmitter on -(this would be ISO Control register set to 0x02 and Chip Status Control register set for 0x21 if running off +5VDC) 

    you would send the string 0x8F, 0x91, 0x3D 0x00 0x30 0x26 0x01, 0x00 (for single slot)

    basic code for this is in sloc297, for the MSP430G2553, have a look in iso15693.c

  • Hi Emre,

    To add onto what Josh mentioned since we weren't clear if your 'secondly' question referred to ISO15693 or ISO14443A (Mifare Classic Standard), you can check the following slides about how ISO14443A works to get a tag UID. The slides do not refer to Mifare Classic as they also include read/write information which is not valid for MF Classic, but the UID process would be the same.

    8037.NFC Forum Type 2 Tag Platform Operations with TRF7970A_02_2014.pptx

    And the firmware Josh referred to also handles ISO14443A so you can check that out for both ISO15693 tags as well as getting the UID for MF Classic tags.

  • Hi Josh ;

    Actually; i did it with polling method for ISO15693. For this, i send inventory command in every one second that followed by a dummy read after 2 ms and FIFO read command after 20 ms. This works well for me and I'm able to get UID numbers.

    But i want to use ISR pin for a better design. What parts i need to change?

    Am i check rising or falling edges of ISR? Is this sufficient that sending inventory command one time and after 1st interrupt and i send a dummy and after 2nd interrupt sending FIDO read command

    I'm waiting for your clues.

    Thank you again.
  • the document here will explain which IRQ jumper setting to use, based on your preference.

     the IRQ pin configuration is inside trf7970BoosterPack.h file (this is the example project which is for the MSP430G2553) and would be like this for using P2.0

    // IRQ on P2.0
    // rising edge interrupt
    #define IRQ_PIN_SET P2DIR &= ~IRQ_PIN;
    #define IRQ_PIN BIT0
    #define IRQ_PORT P2IN
    #define IRQ_ON P2IE |= IRQ_PIN

    #define IRQ_OFF P2IE &= ~IRQ_PIN
    #define IRQ_EDGE_SET P2IES &= ~IRQ_PIN
    #define IRQ_CLR P2IFG = 0x00
    #define IRQ_REQ_REG P2IFG

    and like this for P2.7

    // IRQ on P2.7
    // rising edge interrupt
    #define IRQ_PIN_SET P2DIR &= ~IRQ_PIN;
    #define IRQ_PIN BIT7
    #define IRQ_PORT P2IN
    #define IRQ_ON P2IE |= IRQ_PIN
    #define IRQ_OFF P2IE &= ~IRQ_PIN
    #define IRQ_EDGE_SET P2IES &= ~IRQ_PIN
    #define IRQ_CLR P2IFG = 0x00
    #define IRQ_REQ_REG P2IFG

    the ISR itself is already done and in that project. 

    we have other examples also with NFCLink (standalone) R/W codebase for MSP430F5529, TM4C or MSP432

  • Thank you again.

    But i am confused about the concept. In the given examples; multiple protokols are searched in a while loop by switching protokols. They sending findtag() functions for different protokols and each time it sends inventory or reqa or sel etc.relating to protokol. Interrupt is used only for servicing.

    For my design; i need only one protokol. So; is it enough that sending inventory command one time and waiting RX caused by a tag.? Is it enable to wait long-time ? Can i use the interrupt instead of sending inventory periodically? 

  • in your case, if you used the code example, you would comment out the # defines for the protocols you don't want to run in the project.
    polling loop is best way to detect tags - if you want to step through the code, breakpoints can be set so you can walk through it.

    for example, in main.c (with Type A and Type B deselected by commenting them out)

    ENABLE_TRF;

    // Must wait at least 4.8 ms to allow TRF7970A to initialize.
    __delay_cycles(40000);

    #ifdef ENABLE15693
    Iso15693FindTag(); // Scan for 15693 tags
    #endif

    // #ifdef ENABLE14443A
    // Iso14443aFindTag(); // Scan for 14443A tags
    // #endif
    //
    // #ifdef ENABLE14443B
    // Iso14443bFindTag(); // Scan for 14443B tags
    // #endif
  • Thank you for all answers.

    My code works well. But this code is waiting for an interrupt in a loop with a timeout duration. I dont want to make busy my mCu during this waiting time. Do you have an efficient way for this?

    For example; after sending REQA Command(0x8F, 0x90, 0x3D, 0x00, 0x0F, 0x26); Must "dummy read and service commands" be sended suddenly after the interrupt? For example, i want to send "dummy read and service commands" 5 ms later. Am i enable to do this?

    Best Regards.

    Emre
  • Hi Emre,

    If all you need to do is read the UID from a single tag at a time, I don't see any issue with waiting to read the response from the FIFO provided you are only planning to detect a single tag, so you could just remove the wait delay and exit the send command function, and then have your ISR handler deal with pulling in and storing the UID information. You may need to add one extra variable to track whether you sent an ISO14443A or ISO15693 polling command though, so you know the correct number of UID bytes to store when you get an IRQ with RX Complete.

    However, if you may need to handle having multiple tags present at once and use an anticollision sequence to see each UID from them, this would not work.

    Please let me know if you need to anticollision and need further details on what needs to be done for that.