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.
LMH1297: OUT0 VOD and De-emphasis Register Control
Part Number: LMH1297
Different devices programming guide use RAW command syntax to modify registers. What is the detailed explanation of this command syntax and its parameters?
Programming guide command syntax uses a specific format to change a device register. Description below goes into details as to how this is done.
Essentially there are two methods to change device register settings:
A). Read/Modify write operationB). Write only operation
A). Let's first discuss Read/Modify write operation:
For example, below register settings selects certain section of the device registers 0xFF and 0x69 and then modifiesbits within these two registers. To make this clear, let's review a couple of examples:
RAW FF 05 07 //change 0xFF[2:0]=101’bRAW 69 10 30 //change 0x69[5:4]=01'b
RAW: Identifies a register operation0xFF or 0x69: Indicate register addresses which need to be changed0x05 or 0x01: Indicates register content change using mask of next operand.0x07 or 0x30: Indicates mask or register bits that need to be changed. For example, mask = 0x07 shows bits 2 through 0 of register 0xFF need to be changed. By the same reasoning, mask of 0x30 indicates bits 5 through 4 of register 0x69 is going to be changed.
Now that we have a good understanding of the command syntax, let's look deeper to see how this would get implemented.RAW command syntax uses read/modify format. This command performs three difference operations:1). First we read contents of registers 0xFF or 0x69.2). Use mask to change register setting as needed.3). Finally, write back the changed value. For example, RAW FF 05 07 means we have to do the followings:1). Read content of register 0xFF. As an example, let's say we read back a value of 0x042). Because of mask 0x07, FPGA or micro-controller preserves bits 7 through 3 and concatenate with changed bits 2 through 0.In our example, since we read back 0x04 it means after bit operation we would have 0x05.3). Write back the value. In this example we would write back 0x05 into register 0xFF. The same procedure is used for register 0x69 or other registers.
B). Write only operation:Next let's discuss changing register settings using write only operation.Unlike previous method, we use a single write command to update register with our changes. However, given there are certainbits within register which are reserved bits we must preserve these bits and update only register bit with changes we needto make. To be clear, let's use the above two examples that we used earlier:
The same syntax/meaning applies as it was mentioned earlier. Since we need to change reg 0xFF[2:0] and reg 0x69[5:4] only, we should preserve bits 0xFF[7:3], 0x69[7:6], and 0x69[3:0]. Now the question ishow do know what are default or register settings for these bits? There are two ways:1). During development process, read content of register and then change register bits that are needed only.2). Refer to the programming guide and note default settings and then change bits as needed.For example, reading LMH1297 programming guide specifies values of 0x00 and 0x10 for reg 0xFF and 0x69 respectively.Therefor we can do a single write and directly set reg 0xFF = 0x05 and 0x69=0x10.
Note: Direct write operation can be performed if there is no reserved or dynamic bit within the register.
In summary, there are two ways to modify register content:
Read/Modify write: In this case, for each RAW operation we need to execute three operations: 1). Use FPGA or micro-controller to read register value from the device2). Use FPGA or micro-controller to change register value based on mask settings3). Finally write back the value into the device register
Direct write operation:This method reads register content directly from the device or programming guide. Then we modify only register bitsas needed on FPGA or micro-controller side and write back the value. Please note this method can be used if the register does not have a dynamic or reserved bit. Please refer to the programming guide device register tablefor details about each register and bit definitions.
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.