Design Details
68
SBAU337 – May 2020
Copyright © 2020, Texas Instruments Incorporated
Macro
1.1.1.1
Macro Execution
The Macros used for controlling AFE79xx are initiated using SPI writes into specific set of registers
dedicated to Macro functionality. The details on SPI interface is given in
. SPI allows a 15-bit
addressing range for read/write as mentioned in
. Since the addressing space in AFE79xx is
larger than that, the register access through SPI is done through a two level addressing mechanism. The
address space of AFE79xx is split into multiple pages on SPI each providing a 15 bit address space. The
host can write to a selected page. To write to a different page, the host modifies the content of the Page
Select register and issues a read/write transaction. This register is available on all SPI pages. The
registers of interest for Macro Interface interactions are grouped into two pages – one (Customer Macro
Interface Page) containing Macro opcode and Macro operand and the other (Macro_MEM Page)
containing the Macro memory for transferring large data. Macro Interfaces not accessing the Macro
memory do not need to switch the SPI page.
AFE79xx allows for one Macro command execution to be initiated at a time, hence the Macro command
initiation can be done only when the previous Macro execution has been completed. The general process
of executing most of the Macro Interfaces follows a two-step protocol listed in
.
The two steps in initiating a Macro command are as follows:
1. [Macro Op Macro Memory] - Write the parameters/data in Macro operands and/or Macro
Memory spaces
2. [Macro Opcode] - Write the Macro opcode in the Macro Opcode register.
The Macro operand and Macro Memory provides additional parameters required for execution of the
Macro command. The write to the Macro opcode register serves two purposes – initiate a trigger to the
AFE79xx controller and also indicate the Macro command to be executed. This trigger step is mandatory,
and has to be the last step in the Macro initiation.
Since the second step triggers an interrupt to the microcontroller, the parameters – mentioned in the first
step - need to be programmed before triggering the Macro command.
The acknowledgment for Macros is described in
.
Additionally the operands are not overwritten or reset by the Macro Interface. This feature enables multiple
triggering of the same Macro Interface by writing to the Macro Opcode register.
1.1.1.2
Large Data Transfer Using Macro Memory
A large data transfer mode is used to initiate Macro commands with input parameter/configuration that
does not fit in 640 bits. This can be used for transferring Calibration Look Up Tables (LUT), factory
calibration data, etc. This mode uses the Macro memory bank which is 4 KBytes in size. The Macro
opcode determines how the contents of the Macro memory will be interpreted. Since the Macro Memory is
in a different SPI page, the write to the Macro Memory space needs to be performed after the page
selection is done. The SPI page selection needs to be restored to the Customer page once the writes to
the Macro Memory area are done.
It is recommended that the Host make use of the SPI streaming mode (see
) to write to Macro
memory and Macro operand registers to reduce the overhead in transferring the data through SPI.
1.1.1.3
Macro Interface Structure
The structure of the data written into the Macro Interface is specified in the description of each Macro
command. The Macro control word consists of an 8 bit Macro Opcode field along with a variable length
configuration (Maximum 640 bits – accessed as bytes). A write to the Macro opcode register triggers an
interrupt to the AFE79xx microcontroller, which in turn executes the command. To reduce the time taken
for Macro configuration, it is recommended that the SPI streaming (burst) mode be used to program the
Macro operands.