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.

TRF7963 - SPI without SS problem

Other Parts Discussed in Thread: TRF7963A

Hi,

Im trying to communicate via SPI and for simple text Im just trying to read register 0x01. So Im sending 0x41, 0x00 and it returns 0x00 instead of 0x01.

Im attaching my schematics. May be somebody has an idea where I could start digging?

Thanks,

Sergey

  • VDD_X is an output...you may have damaged the IC at this point since you have it connected to VCC...if not blown, then you can place 10k pull down on EN line so it sees known low to high transition (assuming you are controlling that pin with an MCU). also, you need to put caps on VDD_X like what you have done with the other regulators on the part. (2.2uF + 0.01uF). Once those changes are made, check it out and let us know if you still get same result.

    also, you need to put 1k pulldowns on MOD and ASK/OOK pins. 

  • Thanks for the reply Josh, it didnt appear blown, but I had to implement a software SPI protocol. Im able to read the register now, however I think I have some problem with RF part.
    What would be the easiest test to check that antenna is working?

    Cheers,
    Sergey
  • first thing to do is turn on the transmitter by writing register 0x00 with a 0x21 (if running @ +5VDC) or 0x20 (if running @ 3VDC)

    then you can step through the circuit with scope to check your output signals with the attached. 

    TRF79xxA_Test points_05_2013.pdf

    for the antenna - you need to tune for 50Ohms @ 13.56MHz, with a nominal Q of 8 or 16, depending on the protocol. Since you are using TRF7963, make it Q of 8, since this means you will be using ISO14443A, B or FeliCa tags. 

  • There is still something fishy happening. I try to set ISO Control register.

    So first I write 0x41 0x00 -> I get 0x02 which is the default value
    then I try to turn on 14443 support by writing 0x01 0x08
    then i check register again by writing 0x41 0x00 and I get 0x01 in return.

    Any ideas what could be wrong?

    Thanks,
    Sergey
  • Hey Sergey,

    It seems you have some SPI comm issues.  I know in the past, a lot of customers have had issues using the SPI w/o SS.  

    Is connecting the SS line an option for your system?  I would strongly recommend going this route if it's at all a possibility.  

    Let me know,

    JD

  • Hi JD,

    may be for the next version I could add SS, but on the current board its hard to fix it, even in the hacking mode, since pins 18 and 19 are grounded.

    Id really like to test RX function before I create a new board, so would be great to make it work without SS. Any suggestions on this?

    Thanks,

    Sergey

  • Sergey -
    can you double check something now?
    Timing of your communication
    http://www.ti.com/lit/ds/symlink/trf7963a.pdf (page 32, Figure 5-16)
    and what your data clock speed is

    if you could get this with logic analyzer or scope that would be most helpful to see.

    thanks
  • Hi Josh,

    It was a stupid mistake on my side, missed the falling edge of the clock before sending the stop sequence. So the SPI part works fine now, can read and write registers.

    Now What would be the easiest way to test RX?

    I got the following sequence:

    1) Set 14443A mode - 0x01 0x08
    2) Set OOK 100% 6.78 Mhz - 0x09 0x21
    3) Turn on RX - 0x00 0x21
    4) Receive with no CRC- 0x01 0x88
    5)Receiver gain adjust - 0x1A 0x40
    6) WUPA - 0x8F 0x90 0x3D 0x00 0x0F 0x52
    7) Wait for IRQ pin to be set
    8)Read IRQ register and see what it contains - iterate a few times before i get something other than 0x01


    Would that be correct? Or am I missing something?

    Thanks,
    Sergey
  • Sergey -

    for the REQA/WupA...make the ISO Control register 0x88 so it matches the command you are sending out.

    meaning - the response back from the tag is not with CRC, and you are correctly sending without CRC (and this command is broken byte, this part is also correct) so ISO control register needs to match.

    see attached training slides on MFUL, MFULC tags which will get you started here.

    NFC Forum Type 2 Tag Platform Operations with TRF7970A_02_18_2014.pdf

  • Hi Josh,

    Thanks that helped a bit. So I went through to page 4. When I send 0x6C 0x00 0x00 I get 0x00 0xC0 0x3E back. So that means both RX and TX flags are set? And IRQ goes down at the end of this command.

    Then I clean FIFO with 0x8F 0x00 and wait for IRQ to go up, but it doesnt.

    So the question is why I get 0xC0 instead of 0x80 on reading IRQ register?

    Thanks,

    Sergey

  • let me confirm here - you set the ISO control register to 0x88, Mod register to 0x01 and Chip Status control register to 0x21 and you made all the hardware mods i suggested - then you send out 8F 90 3D 00 0F 26 or 8F 90 3D 00 0F 52 and you do not get an EOTX IRQ? is that correct? i would go back and double check the mods and the settings.
  • Josh,

    I get IRQ line pulled up. and when I check IRQ register I get this:
    Send: 0x6C 0x00 0x00
    Receive: 0x00 0xC0 0x3E

    In the pdf you showed me I was supposed to get 0x00 0x80 0x3E as a response if Im correct?

    Then I clean FIFO with 0x8F 0x00 and wait for IRQ to go up to service EORX but it doesnt.


    Cheers,
    Sergey
  • so that tells us that you are not completing the TX out,,,or you are too slow here and actually getting the EOTX and EORX at same time, which means you can test out that theory by reading out FIFO status then the FIFO itself and seeing if your ATQA is present.
  • Josh,

    Thanks a lot, I got ATQA finally! Indeed I was getting EOTX and EORX together.
    The problem was in the size of the tag. I cant get ATQA from a bigger tag, but a smaller one works fine. Is there any advice on the reader antenna size vs tag antenna size?
    Now there is a long way to actually reading uid and data from the tag. Any nice presentation on that part?:)

    Cheers,
    Sergey