Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

DLP-7970ABP: DLP-7970ABP

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

Tool/software:

Hi,

I'm developing RFID reader TRF7970a chip with stm32l0, The problem I'm encountering right now is that I seem to initialize chip incorrectly and thus no RF field is emitted. First of all, power supply is good because the green LED is on and the communication through SPI between stm32 and trf is good because I can write to a register and then read it and it all matches up. The thing is, a week before the code was working and I could see RF field on oscilloscope, but now nothing's been changed but no RF field is emitted...

Any help would be greatly appreciated.

int main(void)
{

  /* USER CODE BEGIN 1 */

  /* USER CODE END 1 */

  /* MCU Configuration--------------------------------------------------------*/

  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();

  /* USER CODE BEGIN Init */

  /* USER CODE END Init */

  /* Configure the system clock */
  SystemClock_Config();

  /* USER CODE BEGIN SysInit */

  /* USER CODE END SysInit */

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_USART2_UART_Init();
  MX_TIM22_Init();
  /* USER CODE BEGIN 2 */
  SLAVE_SELECT_LOW;
  HAL_Delay(2);
  SLAVE_SELECT_HIGH;
  // Wait until TRF system clock started
//  HAL_Delay(5);

  //set the enable Pin high
  TRF_DISABLE;
  HAL_Delay(4);
  TRF_ENABLE;

  // Set up TRF initial settings
  TRF79xxA_initialSettings();
  TRF79xxA_setTrfPowerSetting(TRF79xxA_3V_FULL_POWER);
  // Initialize all enabled technology layers
  NFC_init();

//  TRF79xxA_writeRegister(0x00, 0x20);

  log_message("Chip Status control register ");
  log_byteAsBits(TRF79xxA_readRegister(0x00));
  log_message("\r\n");
//  test_NFRFID_SPI_Communication();
  /* USER CODE END 2 */

  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  TRF79xxA_turnRfOn();
//
  log_message("Chip Status control register ");
  log_byteAsBits(TRF79xxA_readRegister(0x00));
  log_message("\r\n");

  log_message("IRQ register ");
  log_byteAsBits(TRF79xxA_readRegister(TRF79XXA_IRQ_STATUS));
  log_message("\r\n");

  log_message("RSSI levels register ");
  log_byteAsBits(TRF79xxA_readRegister(TRF79XXA_RSSI_LEVELS));
  log_message("\r\n");

//  IRQ_ON;
  while (1)
  {
    /* USER CODE END WHILE */

    /* USER CODE BEGIN 3 */
	  NFC_findTag();

//	  HAL_Delay(1000);
  }
  /* USER CODE END 3 */
}

  • The thing is, a week before the code was working and I could see RF field on oscilloscope, but now nothing's been changed but no RF field is emitted...

    Hi,

      Are you saying it was working fine with your existing code a week ago but suddenly it is not working anymore?

      To isolate the problem, can you run the same code on another board you have? Hopefully, you have another board to try out. This will give a great insight as to what happens. If another board has the same issue then it is probably due to your code. You might want to see if you could recall any changes made to the code since last week. Hopefully, you have some version control on your code to go back to an earlier version. If a different board is working with the same code but not the current board then it has something to do with the current board. 

      Please note it is a public US holiday this week. Please expect delay in response. 

  • Hi,

    I managed to solve the problem and at least have the RF field working. Now the thing is when I try to read any transponder, nothing's happening. No LED's on, no interrupt is generated, nothing's in the interrupt status register. I'm using the function NFC_findTag(); from TI TRF7970 library and expected it to work "out of the box" but it doesn't. So I then tried to send raw bytes myself to check it on my own, but had troubles finding steps to read tag of a protocol in the datasheet using TRF79xxA_setupInitiator(0x88) and then polling 

    g_pui8TrfBuffer[ui8Offset++] = 0x8F;				// Reset FIFO
    	g_pui8TrfBuffer[ui8Offset++] = 0x90;				// Send without CRC
    	g_pui8TrfBuffer[ui8Offset++] = 0x3D;				// Write Continuous
    	g_pui8TrfBuffer[ui8Offset++] = 0x00;				// Length of packet in bytes - upper and middle nibbles of transmit byte length
    	g_pui8TrfBuffer[ui8Offset++] = 0x0F;				// Length of packet in bytes - lower and broken nibbles of transmit byte length
    	g_pui8TrfBuffer[ui8Offset++] = ui8Command;		// Send the polling command from function input - either REQA (0x26) or WUPA (0x52)
    
        TRF79xxA_writeRaw(&g_pui8TrfBuffer[0], ui8Offset);	// Issue the ISO14443A Polling Command

    I'm sure that the transponders I use are mostly NFCa, and I set ISO control register for the ISO14443a, but am I missing some other steps? Where can I find them in datasheet?

    P.S. Sorry to bother U during holiday, I'm working from Europe.

  • And I think the problem is that the chip doesn't send the command REQA when I send it through the SPI, couldn't find it on oscilloscope. My steps are -> enabling RF field, setting ISO register to ISO14443A, and then sending the commands from the reply above.