2 ## This file is part of the libsigrokdecode project.
4 ## Copyright (C) 2019-2020 Benjamin Vernoux <bvernoux@gmail.com>
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 2 of the License, or
9 ## (at your option) any later version.
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ## GNU General Public License for more details.
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program; if not, see <http://www.gnu.org/licenses/>.
19 ## v0.1 - 17 September 2019 B.VERNOUX using ST25R3916 Datasheet DS12484 Rev 1 (January 2019)
20 ## v0.2 - 28 April 2020 B.VERNOUX using ST25R3916 Datasheet DS12484 Rev 2 (December 2019) https://www.st.com/resource/en/datasheet/st25r3916.pdf
21 ## v0.3 - 17 June 2020 B.VERNOUX using ST25R3916 Datasheet DS12484 Rev 3 (04 June 2020) https://www.st.com/resource/en/datasheet/st25r3916.pdf
23 ## ST25R3916 Datasheet DS12484 Rev 3 (04 June 2020) §4.4 Direct commands
34 # Transmit Without CRC
40 # NFC Initial Field ON
42 # NFC Response Field ON
48 # Mask Receive Data / Stops receivers and RX decoders
50 # Unmask Receive Data / Starts receivers and RX decoders
52 # Change AM Modulation state
60 # Calibrate Driver Timing
68 # Enter Transparent Mode
70 # Calibrate Capacitive Sensor
74 # Measure Power Supply
76 # Start General Purpose Timer
80 # Start Mask-receive Timer
82 # Start No-response Timer
86 # Stop No-response Timer
90 # Register Space-B Access
92 # Register Test access
94 # Other codes => RFU / Not Used
97 ## ST25R3916 Datasheet DS12484 Rev 2 (December 2019) §4.5 Registers Table 17. List of registers - Space A
98 ## ST25R3916 Datasheet DS12484 Rev 2 (December 2019) §4.3.3 Serial peripheral interface (SPI) Table 11. SPI operation modes
101 # §4.5 Registers Table 17. List of registers - Space A
105 # Operation control and mode definition
109 # Protocol configuration
116 # Receiver configuration
129 # Interrupt and associated reporting
131 0x17: 'MSKTIMNFCIRQ',
132 0x18: 'MSKERRWAKEIRQ',
142 # Definition of number of transmitted bytes
146 # A/D converter output
148 # Antenna calibration
149 0x26: 'ANTTUNECTRL1',
150 0x27: 'ANTTUNECTRL2',
151 # Antenna driver and modulation
154 # External field detector threshold
159 # Receiver state display
175 0x39: 'PHASEAAVGDISP',
179 0x3D: 'CAPAAAVGDISP',
183 ## ST25R3916 Datasheet DS12484 Rev 2 (December 2019) §4.3.3 Serial peripheral interface (SPI) Table 11. SPI operation modes
186 0xAC: 'PT_memLoadTSN',
190 ## ST25R3916 Datasheet DS12484 Rev 2 (December 2019) §4.5 Registers Table 18. List of registers - Space B
193 # §4.5 Registers Table 18. List of registers - Space B
194 # Protocol configuration
195 0x05: 'EMDSUPPRCONF',
197 # Receiver configuration
204 # Antenna driver and modulation
207 # External field detector threshold
209 0x2B: 'TXDRVTIMDISP',
219 ## ST25R3916 Datasheet DS12484 Rev 2 (December 2019) §4.4.17 Test access
222 # §4.4.17 Test access (Typo in datasheet it is not register 0x00 but 0x01)
226 ## Optional TODO add important status bit fields / ANN_STATUS
227 ## Interrupt and associated reporting => Registers Space A from Address (hex) 0x16 to 0x21
228 ## §4.5.58 RSSI display register
229 ## §4.5.59 Gain reduction state register