Jump to content
43oh

TRF7970A NFC booster now in eStore


Recommended Posts

@@Fred

 

i have no issues with the pin configuration.the only problem is timmers and its registers..there is bcsctl and dcoctl in msp430 , i dont how to replace them in cc3200

 

can u please clarify me regarding this,

 

in "Modulator and SYS_CLK Control Register (0x09)"

 

what should be the value to be written

 

in TRF7970_demo---> i found ;0x01 it means 100%ask and no sysclk

in some pdfs ---> i found ;0x31 it means 100%ask and 13.5MHZ default clock

 

should we have to provide 13.5MHZ from microcontroller or it self (TRF7970) has an internal 13.5MHZ clock please help me..

Link to post
Share on other sites

I doubt it'd require the MCU to provide a 13.5MHz clock, it should have its own.

 

For CC3200 clocking if you need it, look at the CC3200's Peripheral Driver API documentation - http://software-dl.ti.com/ecs/cc31xx/APIs/public/cc32xx_peripherals/latest/html/index.html

 

This provides the ROM-based API used to configure the CC3200's MCU hardware (similar to TivaWare for the Tiva-C series MCUs).

 

FYI- Energia sets up the CC3200 at 80MHz, its max speed, by default.  If the TRF7970A uses SPI for its comms there should be a way to implement a driver for it using Energia's own SPI library.

Link to post
Share on other sites

@spirilis

   thanks for your help 

i wrote a program in energia to find ISO15693 by taking this pdf as reference (http://dangerousprototypes.com/forum/download/file.php?id=10030)

#include<SPI.h>

#define enable P2_2
#define CS P2_1
#define interrupt P2_0
#define CS_LOW digitalWrite(CS,LOW)
#define CS_HIGH digitalWrite(CS,HIGH)
 byte temp = 0;
 volatile int flag = LOW;
 
//#define LED RED_LED
void setup()
{
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(CS,OUTPUT);
  pinMode(enable,OUTPUT);
  digitalWrite(enable,HIGH);
  pinMode(interrupt, INPUT_PULLDOWN);
  SPI.setDataMode(SPI_MODE1);
 SPI.setClockDivider(SPI_CLOCK_DIV8);
  SPI.setBitOrder(MSBFIRST);
  attachInterrupt(interrupt,function,RISING); 
  SPI.begin();
}

void loop()
{
  // put your main code here, to run repeatedly:
 
 //digitalWrite(LED,LOW);
  flag=LOW;
 Serial.print("started");
 
    CS_HIGH;
   let();
}
void let(void)
{
  
  CS_LOW;
  SPI.transfer(0x83);//reset
  CS_HIGH;
  CS_LOW;
  SPI.transfer(0x09); //sys_clk
  SPI.transfer(0x31);//100% osk and 13.5MHZ 
  CS_HIGH;
  CS_LOW;
 SPI.transfer(0x01); //iso control
  SPI.transfer(0x02);
  CS_HIGH;
  CS_LOW;
  SPI.transfer(0x40);//turn rf on
  SPI.transfer(0x00);
  CS_HIGH;
  CS_LOW;
  SPI.transfer(0x00);
  SPI.transfer(0x20);
  CS_HIGH;
  CS_LOW;
  SPI.transfer(0x40);
  SPI.transfer(0x00);
  CS_HIGH;
   CS_LOW;
 SPI.transfer(0x8F); ///Inventory Command 8 Bytes
  SPI.transfer(0x91);
  SPI.transfer(0x3D);
  SPI.transfer(0x00);
  SPI.transfer(0x30);
  SPI.transfer(0x26);
  SPI.transfer(0x01);
  SPI.transfer(0x00);
  CS_HIGH;
  delay(2);
  CS_LOW; 
  SPI.transfer(0x6C);  //read&clear IRQ
  SPI.transfer(0x00);
  SPI.transfer(0x00);
  CS_HIGH;
  CS_LOW;
 SPI.transfer(0x5C); //read FIFO status
 SPI.transfer(0x00);
  CS_HIGH;
CS_LOW;
 SPI.transfer(0x7F);//read FIFO
SPI.transfer(0x00);
 SPI.transfer(0x00);
 Serial.println(SPI.transfer(0x00),HEX);
 Serial.println(SPI.transfer(0x00),HEX);
 Serial.println(SPI.transfer(0x00),HEX);
 Serial.println(SPI.transfer(0x00),HEX);
 Serial.println(SPI.transfer(0x00),HEX);
 Serial.println(SPI.transfer(0x00),HEX);
 Serial.println(SPI.transfer(0x00),HEX);
 Serial.println(SPI.transfer(0x00),HEX);
CS_HIGH;
delay(10);
CS_LOW;
SPI.transfer(0x6C); //reset IRQ
SPI.transfer(0x00);
temp=SPI.transfer(0x00);
CS_HIGH;
CS_LOW;
 SPI.transfer(0x5C);   //FIFO
SPI.transfer(0x00);
CS_HIGH;
CS_LOW;
SPI.transfer(0x8F);
CS_HIGH;
CS_LOW;
SPI.transfer(0x4F); //RSSI
Serial.println(SPI.transfer(0x00),HEX);
CS_HIGH;

}
void function()
{
  Serial.println("interrupt raised");
  flag = LOW;
}

but i'm getting completely zeros (0....) in serial monitor..i suspect there might be an error in using interrupts..kindly please correct me if i'm wrong in any where..

Link to post
Share on other sites

@@led Not sure if you're still having problems with this or not, but all you should need to worry about with the booster pack is the enable line, interrupt line and SPI communication. You'll find my code at the link below. There's a port of the TRF7970ABP_Demo code for the F5529 which should show you the bit you'll need to be concerned with. There's also my LoginNFC code with extends it to return a properly formatted tag ID.

https://bitbucket.org/fredmurphy/public/src

Link to post
Share on other sites

Yes, the interrupt is mandatory. Look at the Trf7970PortB(void)  method in trf7970.c - this is set to be run on an interrupt from port 2 for the msp430 (as defined by the prefix #pragma vector = PORT2_VECTOR)

 

I don't know what pin on the CC3200 is linked to the appropriate one on the booster pack, but you'll need to use that for an interrupt. Actually - I just looked it up for you. You can use the IRQ SEL jumper to switch the interrupt between P08 or P62. Use whichever one is easier but ensure that an interrupt on that pin runs the Trf7970PortB method.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...