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: Is Innovatron Protocol supported? Cannot read Calypso Rev1 cards.

Part Number: TRF7970A
Other Parts Discussed in Thread: DLP-7970ABP

Also known as ISO14443 B' . I need to detect and interface CD97 transit cards which do use Innovatron Protocol. We are currently using the TRF7970A as RFID transceiver in our design.

I tried setting the device in ISO14443B mode but the transceiver doesn't seem to decode the ATR. Sending a "APGEN" command yields no success either. Basically, the card appears to not be interfaced correctly by the TRF7970A.

I'm thinking I might need to set the TRF7970A in Direct Mode in order to bypass standard ISO14443B framing & checksum and provide my own. Would it be necessary in my case?

Finally, I haven't found the answer elsewhere so I'll ask here, treat it as a bonus question! Do Rev1 Calypso cards reply to a ISO14443B Inventory command (REQB or WUPB)?

Thanks.

  • Hello,

    As far as I recall, the protocol can be support with proper firmware but we do not have any examples that do so, so you would need to develop software to handle the Calypso responses/protocol.

    Note the transceiver doesn't decode anything beyond the over-the-air signal. Whatever data it gets is sent to the host MCU to process
  • Thanks for the reply. I don't have any problem working toward a software solution on my own. I do need some info on TRF7970A interaction with Innovatron protocol.

    1. What I would like to know is if it is likely that Direct Mode 2/ISO Mode will work with Innovatron protocol? If not, would Direct Mode 1/SDM do the trick? I don't really want to go down to Direct Mode 0.

    2. From what I read in the documentation from Calypso, it seems "Start of frame" and "End of Frame" sequences are different from ISO14443A/B's. Is that the case?

    3. Also, they mention Innovatron protocol use CRC16 CCITT X25 checksum calculation. I wasn't able to find if it's the same checksum calculation as with ISO14443B. Do they use the same?

    On my end, I tinkered a bit with TRF7970A configuration and was able to generate a RX finished interrupt when energizing the TRF7970A configured in Direct Mode 2, ISO14443A 106kpbs and ASK 10% modulation depth without CRC. It receives garbage for now, which I think would most likely be due to SOF and EOF being different.

    4. Are there any kind of configuration of TRF7970A I should be aware that works best with Innovatron Protocol cards?

    Thanks again!

    Ben

  • Hello Ben,

    Looking back into prior discussions, I can confirm that Calypso tags work with DM2 based on another customers implementation.

    Not sure about the SOF/EOF sequence but the TRF7970A when configured for ISO14443B was capable to handle those.

    I am not sure if that CRC is used. I know the CRC's used as CRC_A and CRC_B, defined in ISO/IEC 13239. Please check that standard and ISO14443-3 for details.

    You can't use ISO14443A for an ISO14443B tag, so receiving garbage makes sense to me... even just getting an RX complete is surprising.
  • Well setting TRF7970A to ISO14443B doesn't generate any interrupt. Card seems invisible.

    In my case, I'm trying to interface Rev1 Calypso cards which work exclusively with Innovatron protocol. Rev2 and subsequent Calypso cards do support ISO14443B. Rev1 do not fully comply.

    I would rightly assume Rev2 and upwards are directly compatible with TRF7970A in ISO14443B mode. But I think Rev1 need some special configuration on TRF7970A to interface those properly.
  • Hello Ben,

    I see, there was no discussions of different versions for Calypso in the interactions we had with other customers. It looks like no one else has ever asked for Rev 1 Calypso support.

    Based on what you are saying, then you would may need to use either SDM + DM1, or DM0. If you think the issue is only on TX, then you can try tweaking the timings for the device at a register level first though, review Register 0x02 and see if that could be leveraged.
  • Well it does seem SDM + DM1 would do the trick but it Calypso Rev1 tags closely match 14443B tag modulation and coding properties. Framing seems a bit different though, especially when going from Tag -> TRF7970A.

    Is it possible to enter SDM + DM1 when setting ISO_CONTROL register to 14443B_106Kpbs? I ask because currently, it doesn't seem to work for me.

    I checked SLOA214 source code and matched sequence except for ISO_CONTROL register set to 14443B at 106kpbs. When pulling TX_EN high while in SDM mode, the TRF7970A doesn't generate a clock on BIT_CLK. As I understand in the various documentation, if TRF7970A is indeed correctly in SDM, it will start generate a clock on BIT_CLK (I/O5) for as long as TX_EN (I/O2) is high. Is that right?

    Does the TRF7970A need to be in a specific inital state before starting the "Enter Direct Mode" sequence? (Other than being already in Direct Mode, obviously!)

    Is SDM + DM1 only possible when in ISO14443A configuration?

    Thanks

    Ben
  • Hello Ben,

    Unfortunately we have not tested SDM for ISO14443B before, however based on the description of SDM I see no reason it can't be used for ISO14443B. I would recommend trying to replicate the setup for ISO14443A per the app note first. Once you have that functional, all you need to change is the ISO control register setting.

    The entire sequence for entering SDM is documented in SLOA214 and needs to be followed very precisely, that is the only known method to reliably enter SDM.

  • I can't seem to enter Direct Mode...

    I'm following the instructions in SLOA214, adapted to my project's code:

    void SDM_config (void)
    {
        uint8_t buf[2];
    
        // As per SLOA214 App Note
        // Step 1
    	// SDM_TX_EN Off
    	set_SDM_TX_EN_Pin(false);
    	// SDM_DATA_OUT Off
    	set_SDM_TX_DATA_Pin(false);
    
    	// Bonus Reset TRF7970A
    	trf7970_cmd_write(TRF7970_RESET_FIFO_CMD);
        trf7970_cmd_write(TRF7970_SOFT_INIT_CMD);   // re-initialize the device
        trf7970_cmd_write(TRF7970_IDLE_CMD);
        platform_delayms(4);        // allow some time for the device to become ready
    
    	// Step 2
    	// Disable No response IRQ
    	trf7970_reg_write(TRF7970_IRQ_MASK_REG, 0x3E);
    
    	// Step 3
    	// Set ISO register to 14443A 106kpbs
    	// Set Direct Mode 1
    	trf7970_reg_write(TRF7970_ISO_CONTROL_REG, (TRF7970_ISO_CONTROL_RX_CRC_N | TRF7970_ISO_CONTROL_14443A_106K));
    
    	// Step 4
    	// Enable RF
        trf7970_reg_write(TRF7970_CHIP_STATUS_CONTROL_REG, (TRF7970_STATUS_CTRL_RF_ON | TRF7970_STATUS_CTRL_RF_PWR_FULL | TRF7970_STATUS_CTRL_5V_OPERATION));
    #if 0
        // Set the SYSCLK to 6.78MHz and the Modulation 10% ASK.
        trf7970_reg_write(TRF7970_MODULATOR_CONTROL_REG, TRF7970_MOD_CTRL_SYS_CLK_6_78MHZ | 0x00);
    
        // Configure the Special Settings Register.
        // Band-pass 450 kHz to 1.5 MHz
        trf7970_reg_write(TRF7970_RX_SPECIAL_SETTINGS_REG, 0x20);
    
        // DEBUG
        // MOD becomes Sub-Carrier data (Rx and TX)
        trf7970_reg_write(TRF7970_TEST_SETTING1_REG , 0x40);
    #endif
        // Step 5
        // Stop ISO decoders
        trf7970_cmd_write(TRF7970_STOP_DECODERS_CMD);
    
        // Step 6
        // Clear IRQ Status Register
        trf7970_reg_read(TRF7970_IRQ_STATUS_REG, buf);
    }

    void SDM_Enter (void)
    {
        uint8_t buf[3];
    
        // Step 7
        // Enable Special Direct Mode (SDM) in special Func 1 register (0x10)
        trf7970_reg_read(TRF7970_SPECIAL_FUNC1_REG, buf);
    	trf7970_reg_write(TRF7970_SPECIAL_FUNC1_REG, *buf | 0x08);
    
    	SetGPIO(true, true);
    
    	buf[0] = TRF7970_CHIP_STATUS_CONTROL_REG;
    	buf[1] = TRF7970_STATUS_CTRL_DIRECT | TRF7970_STATUS_CTRL_RF_ON | TRF7970_STATUS_CTRL_5V_OPERATION;
    	buf[2] = 0x00;  // Extra byte as per documentation.
    
    	trf7970_cont_write_start();         // Drop SS
    	trf7970_cont_write_resume(buf, 3);  // Write 3 bytes
    	// Do not raise SS as long as we're in Direct mode.
    
    	BufBitCount = 0;
    
    	platform_delayms(40);
    }

    SetGPIO(true, true); is there only to enable interrupts on Bit_Clk once I get it working. Right now, it's not doing anything.

    and finally, after running both functions, running the following, I should see Bit_Clk signal toggles. I don't see anything, even on an oscilloscope probing Bit_Clock IO line on the TRF7970A.

        set_SDM_TX_EN_Pin(true);
        while(1)
        {
            volatile bool state = get_SDM_BIT_CLK_Pin();
        }

    Like that, I don't see what I'm doing wrong so Direct Mode isn't enabled.

    The TRF7970A is already interfaced in our project to read standard RFID tags so it's been previously proven to be interfaced properly.

  • Hello,

    SDM entry can be pretty timing dependent, can you send a logic capture with timings as well as all the lines that are used in SLOA214 so I can compare your timings to my own capture from a TRF7970AEVM?

    Also what MCU are you using, and what system clock speed is it running at?

  • Unfortunately, we don't have a TRF7970AEVM board. We've asked our TI representative for a replacement but to my knowledge, he hasn't provided us with one yet.

    TRF is interfaced with a STM32L152RE, it's a Cortex-M3 running at 32MHz.

    At the moment, most of the code in our project is commented out so the CPU is dedicated almost exclusively to interfacing the TRF.

    We don't have a logic analyzer on hand. I'll have to get mine from home and provide the captures.

    Concerning the timing, at what frequency should the SPI clock be set at? TRF7970A's datasheet mentions 2MHz clock speed but would a different SPI clock speed yield better results?

  • Hello Ben,

    That actually raises a good point, are you using the DLP-7970ABP to interface with your MCU?

    Regarding the SPI Clock, yes 2MHz was used.

    Also the example is done at 8 MHz so any timings like delays etc. would need to be adjusted for 32MHz, however that will only affect data results when entering SDM if I remember right.
  • I managed to get ahold of a logic analyzer and generate captures. Software isn't all that great so here it is in 4 parts. This is the sequence to config and enter Special Direct Mode following SLOA214 document procedure steps 1 to 9.

    Please note that right before that, a FIFO flush, Soft reset and NOP command sequence was sent to the TRF7970A in order to reset it to its initial state.

    So here are steps 1 to 6(SDM Config) in 2 part screenshots:

    Here are the steps 7-9(SDM Enter) in the following screenshot:

    And finally, raising TX_EN. After that, I would be expecting the TRF7970A to start generating a clock on BIT_CLK... but it doesn't:

    SPI clock speed is at 2MHz.

    As the timeline in the screenshot indicates, the whole sequence up until the raising of TX_EN signal takes roughly 460us. It does seem to take a bit more time than what I can see on the screenshots in SLOA214 document but is timing really that critical?

  • I was fainally able to enable Direct Mode. Turns out TX_EN line needs to be toggled high before starting the "Enter Direct Mode" squence...

    Now, I want to get it Direct Mode but using different settings than those used to read MIfare cards.

    In my case, I need to use modulator and coding settings that are more related to ISO14443B standard. Mainly ASK 10% & NRZ @ 847KHz for TX and BPSK for RX.

    I tried simply setting ISO control reg to 14443B 106kbps but doing so, I cannot seem to enter Direct Mode anymore. Currently that's the only thing that differs from the procedure described in SLOA214...

    Can't direct mode be used to decode tags that are not Mifare?

  • Hello Ben,

    Direct Mode 0 will definitely be usable. Special Direct Mode is a different story, we never tested it outside of MIFARE Classic as that was the sole use case that we had use for it. There may be other means to make it work, but it's not something we've test nor test for such a legacy tag.

    If you can't get SDM working, your only option will be DM0.

  • Thanks, but is it intended to be working with tags others than MiFare? Is the chip theoritically capable of working in DM1 or SDM using different modulations and bit-coding than what is used on Mifare?
  • Hello Ben,

    SDM was not intended to be used outside of MIFARE Classic. We had thought it may be possible to use it for other protocols but no testing was ever performed to verify this as there was no use case that required such investment of time & effort. So we don't know one way or another if it is possible.

  • Hi Jacob,

    Ok. I'll try to make it work on my own. See if it will work with other types of modulation and bit coding.

    Another question. Can we enable the receiving Direct Mode 1 without previously going through sending Special Direct Mode 1 activation and deactivation as SLOA214 suggest? I want to go straight to receiving as the Calypso cards I have will emit an ATR upon being powered by the RF field.

    In either SDM or DM1, can we enable the debug feature to have the bitcoded data frames output to MOD and/or ASK pins (in TEST1, 0x1A register)?

    Finally, is there some way to know if receiving Direct Mode 1 has properly been entered. On my setup, "bitclk" doesn't seem to toggle when I bring a card near the antenna.

    Thanks

  • Hello Ben,

    None of that is functionality we have tested, we have tested SDM + DM1 and just DM0.

    Regarding debug feature and outputting on MOD/ASK, the outputs will be on MOD/ASK only in DM0.

    That is all I can offer really.

    Ultimately outside of MIFARE Classic we have not supported non ISO compliant tags because of the challenges they present like what you are running into, and this is really beyond our capability to help with any further, it is too far beyond typical device operation.