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.

TRF7970A EVM sample code interfacing with on board MSP430F2370

Other Parts Discussed in Thread: TRF7970A, MSP430G2553, MSP430F2370, MSP430F5529

Hi, I just recently bought TRF7970A EVM for a school project,we're trying to develop an NFC application allong with Android. The problem I'm having it's that I'm a little lost with te coding and the addressing, as far as I know, in this board we only had ports 4.0 to 4.7 of the MSP430 , and the interact via parallel . Can you please gave me some sample code to make the interaction between both chips , and maybe a basic operation like a card reading?

Thanks.

  • Carlos - 

    The EVM comes already with reader FW, standalone mode and GUI available. You can get the docs, GUI, etc off the product page. The EVM comes wired default for parallel mode, but you can move the zero ohm jumpers to make it SPI easily as well. 

    Here are two working samples of doing standalone CE (Type A or Type B) with the EVM. (no GUI required), one parallel based, the other SPI  w/SS based

    1781.Card Emulation TRF7970EVM Jan 2013.zip

    0714.Card Emulation TRF7970EVM Jan 4.zip

    just code in your own BT MAC address and present an NFC handset phone! other ideas you could do here is to open up the UART and get the MAC address in via terminal, etc. or make your own message types and NDEF messages...have fun with it and repost if you get something cool going. 

    here is example of what you will be able to do - but this is with an ez430-TRF7970A style version of what the EVM does with this code..

    https://www.youtube.com/watch?v=cu6GLnegVEU&feature=youtube_gdata_player 

  • Thanks fot the information, but right now I'm still trying to understand the code and looking for a JTAG interface. Of both codes, wich one is the parallel one? because the header of the main.c of both zip's says the same , "using a SPI interface" and same date, so I'm confused. An regarding the bluetooth connection, how it is connected? becase the UART pins are already used by the configuration between the MCU and the USB for the PC.

    Another question, I also have an msp430 launchpad , can i connect this to the TRF7970A EVM so I no longer need the JTAG interface? And also, how it is done?

    And last, maybe it's very basic , but, , of all the code examples, is there one that can make this module act as a card, so a cellphone can recognize it?

    Thanks in advance.

  • Hi. Josh

    I just tested your two driver program. But they didn't work with Android Smart Phone.

    It looks like that the two codes supports only SPI. But the original TRF7970A-EVM has  parallel interface.

    Can you provide a source code which support parallel interface.

    Thanks.

     

  • Hi Josh...

    Dongbeom Shin is right!!! When I'm testing with two codes on my EVM, one of them gets no response,

    the rest just card type displaying on LEDs (for card A display 2nd red LED and for card B display 3th orange LED).

    But I'm testing with with reader, none of them responses as a card or detecting the card existance.

    Which part should I try to change the code EVM to response as a 14443A/14443B card emulation???

    Thanks!!!

     

    Brs...

    Johnathan, Chen.

  • Hello Jonathan,

    Please see the reference firmware attached for using a MSP430G2553 + TRF7970A  supporting both Card Emulation Type A / B.

     0456.ez430_TRF7970_UART_Card_Emulation_Type_A_or_B.zip

    Best regards,

    Erick M.

  • Dear Erick...

    Thanks for your information!!! I'll have a try on it.

    Brs...

    Johnathan, Chen.

     

  • Hi

    I'm developing a project using TRF7970EVM (MSP430F2370 + TRF7970A). The code you have attached is designed for MSP430G2553 as I see. I would like to know if there is a version for MSP430F2370?

    Regards

  • Hello,

    I am trying to get these samples working on the TRF7970EVM with Android devices. I have a problem on setting EVM into emulation state. At the beginning EVM waits for an IRQ, then we read IRQ state register and  NFC target protocol. We expect to get 0xC9 for Type A and 0xC5 for Type B. The problem is that I've used two Android phones, the first one gave me 0x05 and the second one 0xC0. I have never seen 0xC5 on 0xC9. How can I solve this issue? And what does these bytes mean?

    Here is the function I am talking about.

    /******************************************************************************
     * @brief Waits for a radio IRQ
     * This function will lock the mcu while waiting for IRQ. Note that the
     * microcontroller is not expected to do anything else in BSL
     *
     * @return  none
     *****************************************************************************/
    void Radio_Wait_IRQ(void) {
      u08_t Register[4];
      static unsigned char retry_counter = 0;
    
      // Wait for an IRQ forever
      while (!IRQ_IS_SET())
      {
    //    TRF_DISABLE;
        __bis_SR_register(GIE);
      }
    
      if (g_i2c_busy_flag  == TRUE_s) {
        NFC_State = POWER_OFF_STATE;
        return;
      }
    
      do {
        // Clear Buffer
        Register[0] = IRQ_STATUS;
        Trf797xReadCont(Register, 2); /* IRQ status register address */
    //    Trf796xReadSingle(&Register[0], 1);
    
        Register[2] = NFC_TARGET_PROTOCOL;
        Trf797xReadSingle(&Register[2], 1);
    
    #if CARD_EMULATION_TYPE_A
        if (Register[2] == 0xC9) {
    #endif
    #if CARD_EMULATION_TYPE_B
          if (Register[2] == 0xC5) {
    #endif
          retry_counter = 0;
          Radio_Process_IRQ(Register[0]);
           break;
        }
        //
        // Reset the TRF7970 when :
        // 1. Target Protocol Register has the RF_h and RF_l enabled but incorrect bit rate ( not 106 kbps)
        // 2. Target Protocol Register
        //
        else if (((Register[2]) & 0x0F) != 0x00 || Register[2] == 0xC0 || Register[2] == 0x40 || Register[1] != 0x3E) {
          Trf797xInitialSettings();
          NFC_State = SENSE_STATE;
        }
        else if( Register[2] == 0x80)
        {
          Trf797xInitialSettings();
        }
        else
        {
          //
          // Increment retry counter, once it reaches 10 then reset
          //
          retry_counter++;
          if(retry_counter == 10)
          {
            retry_counter = 0;
            Trf797xInitialSettings();
          }
          NFC_State = SENSE_STATE;
        }
    
      } while (IRQ_IS_SET() && g_i2c_busy_flag == FALSE_s);
    
      return;
    }

  • Hello Ilia,

    The TRF7970AEVM does not work for Card Emulation

    Please the following app note which includes the correct hardware setup+example software for Card Emulation: www.ti.com/lit/pdf/sloa208

  • Hi, Ralph.

    I am getting a controversial information here. In this thread were already posted source codes for firmware for TRF7970A EVM which implements card emulation. So it looks for me like it is possible.

  • Hello Ilia,

    This thread was made 4 years ago before any of the collateral I provided had ever been generated.

    During development of a fully functional Card Emulation example that works with Android handsets, it was discovered that the MCU on the TRF7970A (MSP430F2370) did not have sufficient resources to run the NFC stack required for the Card Emulation application.

    Therefore a larger MCU (MSP430F5529) was used along with (new at that time) TRF7970A's BoosterPack.
  • Hello, Ralph
    Ok, I understand. Is it possible to have not full, but very limited card emulation functionality? Say, one type of card, one type of data
  • Hello Ilia,

    Possibly? It was very crudely working with the examples posted before, but nothing that was reliable or useful. Feel free to try if you wish I suppose, but that's not something I will offer guidance on when we have a properly working example published.