SLOA227B October 2015 – March 2019 TRF7964A , TRF7964A , TRF7970A , TRF7970A
There are four different state machines available for reading and writing tags: T2T_stateMachine, T3T_stateMachine, T4T_stateMachine, and T5T_stateMachine. Since Type 4A and Type 4B tags use the same memory structure, after activation and selection the same process can be used to read and write either T4TA or T4TB platforms.
When a state machine is called, it automatically attempts to read a tag of that technology by default. It first checks for NDEF content on the tag and, if an NDEF message is found, then reads it. If no NDEF content is found, then the state machine proceeds to read the raw data from the tag. The firmware sends the received data to the USB interface to display it on the TI NFC Tool GUI (see Section 8).
If a user needs to access the read data for an application specific purpose, it is possible to copy the data read from the tag by finding the correct read within the state machine. Each state machine is designed to output received tag data to the USB interface, so the most recently received data can be found at any Serial_printBuffer function call.
To keep the memory sizes at reasonable levels, the amount of data that is stored from reading tags at any time is limited. At the top of each state machine is a declaration for a buffer labeled as g_pui8TXTRxBuffer, where the X represents the tag type number.
When a tag has been fully read, then the state machine enters an IDLE state. During this state, the state machine can enter a write state to write new data onto the tag. However, this behavior could be modified if desired.
When the tag state machine has finished reading and, if applicable, writing the tag, it exits and returns back to the main application code. No further polling, reads, or writes take place until the tag is removed from the RF field. When the tag is removed, then the reader reinitializes the state machines to reset them and resumes polling for each enabled technology (see Section 7.2.3).