AnsweredAssumed Answered

[MRFC630] Can't response from APDU command

Question asked by Jeongtae Park on Nov 4, 2019
Latest reply on Nov 5, 2019 by Alexander Baar

Greetings,

 

I have met the issue of response from APDU.

I checked the RATS's response.

However, when I send the APDU's command to mfrc630, I can't response anything.

command of APDU is as below.

APDU ={0x00, 0xA4, 0x04, 0x00, 0x07 ,_data 7byte,0x00}    // Commend[13byte]
I think about that I get the data with 0x90, 0x00 but I can't take a response.
Source code is as below.

     fifo_flush();

    mfrc630_write_reg(MFRC630_REG_TXCRCPRESET, MFRC630_RECOM_14443A_CRC | MFRC630_CRC_ON);
    mfrc630_write_reg(MFRC630_REG_RXCRCCON, MFRC630_RECOM_14443A_CRC | MFRC630_CRC_ON);


   uint8_t timer_for_timeout = 0;  // should match the enabled interupt.

   mfrc630_write_reg(MFRC630_REG_IRQ0EN, MFRC630_IRQ0EN_IDLE_IRQEN | MFRC630_IRQ0EN_ERR_IRQEN);
   mfrc630_write_reg(MFRC630_REG_IRQ1EN, MFRC630_IRQ1EN_TIMER0_IRQEN);


  mfrc630_timer_set_control(timer_for_timeout, MFRC630_TCONTROL_CLK_211KHZ | MFRC630_TCONTROL_START_TX_END);
  mfrc630_timer_set_reload(timer_for_timeout, 10000);  // 2000 ticks of 5 usec is 10 ms.
  mfrc630_timer_set_value(timer_for_timeout, 10000);

  uint8_t irq1_value = 0;
  uint8_t irq0_value = 0;

  mfrc630_clear_irq0();  // clear irq0
  mfrc630_clear_irq1();  // clear irq1

  mfrc630_cmd_transceive(DF_data, 13);
  while (!(irq1_value & (1 << timer_for_timeout))) {


    irq1_value = mfrc630_irq1();
    if (irq1_value & MFRC630_IRQ1_GLOBAL_IRQ)    break;    

  }


   mfrc630_cmd_idle();

   if (irq1_value & (1 << timer_for_timeout))   return 0;
   
  irq0_value = mfrc630_irq0();
  if (irq0_value & MFRC630_IRQ0_ERR_IRQ)     return 0;

Would you please let me know what problem do I have?

 

Thanks.

Outcomes