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.

CCS/TRF7970A: TRF7970A SDM Bit Clock Problem

Part Number: TRF7970A


Tool/software: Code Composer Studio

Hello everyone.

TRF7970A chip  continues  make make me crazy. How hard to learn it.

I did not achive to pass authentication 14443A MIFARE CLASSIC TAG. And I tracked problem with logic analysor.

Problem is that, there is no any SDM Bit Clock pulse from TRF to MCU. Activatig TAG is OK because I saw 4 byte UID on my LCD and UID is corrected
with M302 RFID reader/writer.

MCU : FR6989

DCO Freq : 8 MHz

MCLK Freq : 8 MHz

SMCLK :8 MHz

SPI Freq : SMCLK / 4 = 2 MHz

Code derived from : SLOA214 DOC

Best regards.....

logicSDM.rar

  • Hello Mesut,

    You need to remove the half-power mode setting from Register 0x00. We have never tested if half power mode works for SDM and until you get it working, I would not attempt that. You can test this after you get it working.

    Also I don't see a high to low transition for TX DATA, that is required as well.

    Set TX_Data (I/O_3) Low (required for sending correct SOF when entering SDM)
    

    See attached capture, you may want to measure out the timings between events as well including when you set specific line states including when I/O_2 is set high to enable TX.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/667/4048.MIFARE_5F00_Classic_5F00_SDM_5F00_Auth.logicdata

  • Hi Ralph.

    Thank you for quick respond. 

    I tried full power mode and result is same. Actually, I use own design circuit and use 3.3V operation voltage


    As I mentioned above, activating tag result is OK. Problem is after SDM TX ENABLE ON pin high. There is no bit clock pulse (SOME TIMES ONLY TWO SDM BIT CLOCK PULSES !!!!!)

    And You said that above, "Also I don't see a high to low transition for TX DATA, that is required as well." 

    //from directmode.c file -->

    for(i=0; i<ui8ByteCount; i++) //Byte Count
    {
    for(j=0; j<ui8ByteWidth; j++) //Bit Count
    {

    while(SDM_BITCLK_PIN_STAT && (!TRF_IRQ_PIN_STAT) && (!g_timingTimeOutFlag));// wait for Falling edge.

    if(pui16TxData[i] & (0x01 << j)) // next bit '0' or'1'?
    {
    while((!SDM_BITCLK_PIN_STAT) && (!TRF_IRQ_PIN_STAT) && (!g_timingTimeOutFlag)); // wait for Rising edge
    SDM_DATA_ON; // "1" // Step 11
    }
    else
    {
    while((!SDM_BITCLK_PIN_STAT) && (!TRF_IRQ_PIN_STAT) && (!g_timingTimeOutFlag)); // wait for Rising edge
    SDM_DATA_OFF; // "0"
    }
    }
    }

    But, acording to code (derived from SLOA214), there is no chance changing SDM TX DATA before BIT CLOCK transition. Am I wrong?

    I also set TX DATA (I/O 3) to low you see my logicdata file. 

    And, I overviewed your logicdata file and there is no a lot of differencies between yours an mine (data, timing etc.)


    What can be the problem ? My brain stopped...  I am waiting help from yours urgently

  • Hello Mesut,

    In the code from SLOA214, at the start of the SDM config the following is done:

    #define SDM_PORT_SET  	P4DIR |= SDM_TXENABLE; 		\
    						P4DIR &= ~SDM_BITCLK_BIT; 	\
    						P4DIR |= SDM_DATA;	//		\

    The SDM_PORT_SET ensures that both TX Enable and TX Data lines are high to start. This then allows for the High to Low transition outlined in the steps. Make sure this is implemented with your project as well. That should resolve the issue.

  • Hi Ralph.

    I have already implemented codes like above. 

    But I does not understand you. I think SDM_PORT_SET macro sets only port directions as input or output. Where is  pin high setting ?

    Also, in Mifare_SDM_config() function, I see;

    SDM_TXENABLE_OFF;
    SDM_DATA_OFF;
    SDM_PORT_SET;

    macros. You see that TX EN and TX DATA is set to low.

    Additionaly, we overviewed old project that works well (r/w tag block etc. is ok). For old circuit, out RF signal at beginning of antenna Vpp is 6V (peak to peak)

    And now (current circuit), Tx signal is approximetly4.8V - 5V (peak to peak). Both circuit in full power mode an 3V3 supplied. May problem is related to this state?

  • Hello Mesut,

    You are correct that it only sets the direction, it looks like there isn't anything in the code which sets the state high even though I see that on my board.

    The RF field difference shouldn't explain the behavior but you should investigate the tuning on the coil.

    I've been stepping through your provided capture to try and compare it to my working one, and I don't see anything glaringly wrong.

    I know the developer had stressed that the whole operation was very timing dependent so all I can think to suggest is to play around the timing between commands a bit. Special Direct Mode in particular can be a very difficult mode.