
NXP Semiconductors
PT2001SWUG
PT2001 programming guide and instruction set
PT2001SWUG
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2019. All rights reserved.
User guide
Rev. 3.0 — 29 April 2019
122 / 153
stgn
Description:
Sets the gain of an operational amplifier with the Gain operand used to measure the
current flowing through the actuator sense resistor. The operational amplifier is selected
according to the OpAmp operand.
The operation is successful only if the microcore has the right to access the related
current measurement block. The access right is granted by setting the related bits in the
Cur_block_access_part1 register (188h), and Cur_block_access_part2 Register (189h).
The other channel is selected by SPI register bit (refer to Dac_rxtx_cr_config (112h,
132h))
The Gain reset value is gain 5.8.
Assembler syntax:
stgn Gain OpAmp;
Operands:
•
Gain – Operand defines the current measure operational amplifier gain
Operand label
Operand description
Operand binary value
gain5.8
Operational amplifier gain set to 5.8
00
gain8.7
Operational amplifier gain set to 8.7
01
gain12.6
Operational amplifier gain set to 12.5
10
gain19.3
Operational amplifier gain set to 19.3
11
•
OpAmp – Operand defines the current measure operational amplifier gain to be set
Operand label
Operand description
Operand binary value
sssc
Current measure operational amplifier of
the same microcore same channel
00
ossc
Current measure operational amplifier of
the other microcore same channel
01
ssoc
Current measure operational amplifier of
the same microcore other channel
10
osoc
Current measure operational amplifier of
the other microcore other channel
11
Table 108. stgn instruction format
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
0
0
1
1
0
1
0
1
0
0
1
1
Gain
OpAmp
Source code example: