• Hello,

    I want to access the TI TRF7960 (a 13.56MHz RFID reader/writer) with Espruino running on a nucleo STM32F401RE. The TI chip can be accessed with SPI, but with an exotic trick : clock polarity has to change between a write and a read instruction. Below is a drawing from the application report "Using the SPI Interface With TRF7960" (http://www.ti.com/lit/an/sloa140a/sloa14­0a.pdf).

    How could I do that ? I tried the following but it doesn't work.

    var spi = new SPI();
    spi.setup({sck:B6, miso:A6, mosi:A7, mode:integer=0, order:'msb'});
    
    digitalWrite(SS, 0);
    spi.write(0b01000100);
    spi.setup({sck:B6, miso:A6, mosi:A7, mode:integer=3, order:'msb'});
    d = spi.write(0b01000100);
    
    digitalWrite(SS, 1);
    

    Thank you :)


    1 Attachment

    • Capture (1).PNG
About

Avatar for benoit @benoit started