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.

[参考译文] TRF7970A:原始写入的工作原理

Guru**** 2454220 points
Other Parts Discussed in Thread: TRF7970A

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/other-wireless-group/other-wireless/f/other-wireless-technologies-forum/1114925/trf7970a-how-raw-write-works

器件型号:TRF7970A

您好!

我正在编写 sloc297c 示例代码。 我主要了解 trf7970a 的工作原理。 我无法理解是对 IC 进行 SPI 原始写入。

uint8_t ISO14443A_sendPollCmd(uint8_t cmd)
{
    uint8_t offset = 0;
    uint8_t status = STATUS_FAIL;

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

    // Issue the ISO14443A Polling Command
    TRF79xxA_writeRaw(g_pui8TrfBuffer, offset);

    g_sTrfStatus = TRF79xxA_waitRxData(3, 10); // 3 millisecond TX timeout, 10 millisecond RX timeout

    if (g_sTrfStatus == RX_COMPLETE) // Tag detected - could be either a single or collided tag
    {
        status = STATUS_SUCCESS;
    }
    else if (g_sTrfStatus == COLLISION_ERROR)
    {
        status = STATUS_SUCCESS; // "A PCD detecting a collision in any bit of (b16 to b1) shall commence with the first step of the anticollision loop."
    }

    return status;
}

上面的函数向 PICC 发送 REQ 命令。 但在 Req cmd 之前、有5 个额外的字节。 写入该数据时未指定寄存器地址。 如何处理该数据。 例如、第一个数据是0x8F、它会重置 FIFO、看起来它是一个命令、但我们不为此过程指定寄存器。 您能否解释或提供任何资源来帮助我理解它?

此致。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Kadir、

    请参阅 数据表中的第6.14章

    命令代码(表6-19)需要嵌入到地址和命令字(表6-20)中。 对于0x8F 的示例、它是命令控制位0x80和命令代码0x0F -> 0x80 | 0x0F = 0x8F 的组合。

    如果命令控制位未置位、则它对寄存器寻址。 如果连续地址模式位被置位、那么无需手动递增地址即可写入一行中的多个寄存器。 例如、0x3D 寻址从地址0x1D 开始的连续寄存器写入。 0x00进入寄存器0x1D、0x0F 进入寄存器0x1E、cmd 进入地址0x1F 的 FIFO。

    此致、

    Andreas。