Skip to content

Commit 36086d1

Browse files
committed
text
1 parent bd8a407 commit 36086d1

File tree

2 files changed

+74
-5
lines changed

2 files changed

+74
-5
lines changed

doc/fpga_arm_notes.md

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
1-
# Notes on ARM & FPGA comms
1+
# Notes on ARM & FPGA communications
2+
<a id="top"></a>
3+
4+
# Table of Contents
5+
- [Notes on ARM & FPGA communications](#notes-on-arm--fpga-communications)
6+
- [Table of Contents](#table-of-contents)
7+
- [INTERFACE FROM THE ARM TO THE FPGA](#interface-from-the-arm-to-the-fpga)
8+
- [FPGA](#fpga)
9+
- [FPGA modes](#fpga-modes)
10+
- [ARM FPGA communications](#arm-fpga-communications)
11+
- [ARM GPIO setup](#arm-gpio-setup)
12+
- [FPGA Setup](#fpga-setup)
13+
- [HARDWARE OVERVIEW](#hardware-overview)
14+
- [ADC (ANALOG TO DIGITAL CONVERTER)](#adc-analog-to-digital-converter)
15+
- [FIELD PROGRAMMABLE GATE ARRAY, FPGA](#field-programmable-gate-array-fpga)
16+
- [MICROCONTROLLER](#microcontroller)
17+
- [](#)
18+
- [To behave like a READER](#to-behave-like-a-reader)
19+
- [To behave like a TAG](#to-behave-like-a-tag)
20+
- [To sniff traffic](#to-sniff-traffic)
21+
- [FPGA purpose](#fpga-purpose)
22+
223

324

425
https://github.com/RfidResearchGroup/proxmark3/blob/master/doc/original_proxmark3/proxmark3.pdf
@@ -34,6 +55,8 @@ LF analog path (MCP6294 opamp. This has a GBW of 10 MHz), all 'slow' signals.
3455

3556

3657
## FPGA
58+
^[Top](#top)
59+
3760
Since the SPARTAN II is a old outdated FPGA, thus is very limited resource there was a need to split LF and HF functionality into two separate FPGA images. Which are stored in ARM flash memory as bitstreams.
3861

3962
We swap between these images by flashing fpga from ARM on the go. It takes about 1sec. Hence its usually a bad idea to program your device to continuously execute LF alt HF commands.
@@ -50,19 +73,22 @@ In order to save space, these fpga images are LZ4 compressed and included in th
5073
This means we save some precious space on the ARM but its a bit more complex when flashing to fpga since it has to decompress on the fly.
5174

5275

53-
### FPGA modes.
76+
### FPGA modes
77+
^[Top](#top)
78+
5479
- Major modes
5580
- Minor modes
5681

57-
## ARM FPGA communications.
82+
## ARM FPGA communications
83+
^[Top](#top)
5884

5985
The ARM talks with FPGA over the Synchronous Serial Port (SSC) rx an tx.
6086

6187
ARM, send a 16bit configuration with fits the select major mode.
62-
6388

6489

6590
## ARM GPIO setup
91+
^[Top](#top)
6692

6793
```
6894
// First configure the GPIOs, and get ourselves a clock.
@@ -100,20 +126,28 @@ ARM, send a 16bit configuration with fits the select major mode.
100126
```
101127

102128
## FPGA Setup
129+
^[Top](#top)
130+
103131

104132
// Set up DMA to receive samples from the FPGA. We will use the PDC, with
105133
// a single buffer as a circular buffer (so that we just chain back to
106134

107135

108136

109137
# HARDWARE OVERVIEW
138+
^[Top](#top)
139+
110140

111141
## ADC (ANALOG TO DIGITAL CONVERTER)
142+
^[Top](#top)
143+
112144
The analogue signal that comes from the antenna circuit is fed into an 8-bit Analogue to Digital Converter
113145
(ADC). This delivers 8 output bits in parallel which represent the current voltage retrieved from the field.
114146

115147

116148
## FIELD PROGRAMMABLE GATE ARRAY, FPGA
149+
^[Top](#top)
150+
117151
The 8 output pins from the ADC are connected to 8 pins of the Field Programmable Gate Array (FPGA). An
118152
FPGA has a great advantage over a normal microcontroller in the sense that it emulates hardware. A
119153
hardware description can be compiled and flashed into an FPGA.
@@ -141,6 +175,8 @@ FPGA generates an electromagnetic field on power hi and drops the amplitude for
141175

142176

143177
## MICROCONTROLLER
178+
^[Top](#top)
179+
144180
The microcontroller is responsible for the protocol management. It receives the digital encoded signals
145181
from the FPGA and decodes them. The decoded signals can just be copied to a buffer in the EEPROM
146182
memory. Additionally, an answer to the received message can be send by encoding a reply and
@@ -185,13 +221,17 @@ Problems:
185221

186222
##
187223

188-
## To behave like a READER.
224+
## To behave like a READER
225+
^[Top](#top)
226+
189227
By driving all of the buffers LOW, it is possible to make the antenna
190228
look to the receive path like a parallel LC circuit; this provides a
191229
high-voltage output signal. This is typically what will be done when we
192230
are not actively transmitting a carrier (i.e., behaving as a reader).
193231

194232
## To behave like a TAG
233+
^[Top](#top)
234+
195235
On the receive side, there are two possibilities, which are selected by
196236
RLY1. A mechanical relay is used, because the signal from the antenna is
197237
likely to be more positive or negative than the highest or lowest supply
@@ -222,10 +262,13 @@ is the master) or its generic synchronous serial port (again, the ARM
222262
is the master). The ARM connects to the outside world over USB.
223263

224264
## To sniff traffic
265+
^[Top](#top)
225266

226267

227268

228269
## FPGA purpose
270+
^[Top](#top)
271+
229272
Digital signal processing.
230273
In short, apply low pass / hi pass filtering, peak detect, correlate signal meaning IQ pair collecting.
231274

doc/jooki_notes.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,35 @@
11
# Jooki Figurine Notes
2+
<a id="top"></a>
3+
4+
# Table of Contents
5+
- [Jooki Figurine Notes](#jooki-figurine-notes)
6+
- [Table of Contents](#table-of-contents)
7+
- [Jooki proxmark commands](#jooki-proxmark-commands)
8+
- [Decoding NDEF URL parameter](#decoding-ndef-url-parameter)
9+
- [Encoding NDEF record](#encoding-ndef-record)
10+
- [Simulation](#simulation)
11+
- [Cloning to a NTAG213 tag](#cloning-to-a-ntag213-tag)
12+
- [List of known figurine types](#list-of-known-figurine-types)
13+
14+
15+
216
- NTAG213 (Should be tested if other NTAG2xx work)
317
- A single NDEF record of type URL
418
- Physical figurines are Fox, Dragon, Knight, Ghost, Whale, Generic Flat. Than there are variations of those figures with different colors.
519

620
## Jooki proxmark commands
21+
^[Top](#top)
22+
723
You can `encode`, `decode` a NDEF record, write with `clone` a record to a card or simulate with`sim`.
824

925
### Decoding NDEF URL parameter
26+
^[Top](#top)
27+
1028
`hf jooki decode -d g+t07s57aX1bB6tk`
1129

1230
### Encoding NDEF record
31+
^[Top](#top)
32+
1333
You can either use figurine abbreviation arguments:
1434
```
1535
--dragon
@@ -49,13 +69,17 @@ Output:
4969
Use `-r` parameter to read UID directly from tag.
5070

5171
### Simulation
72+
^[Top](#top)
73+
5274
To simulate the above figurine use the encoded URL parameter given in `encode` output and type following command into your proxmark:
5375

5476
`hf jooki sim -b g+t07s57aX1bB6tk`
5577

5678
If no parameter is given to the simulation command, last loaded dump is used.
5779

5880
### Cloning to a NTAG213 tag
81+
^[Top](#top)
82+
5983
```
6084
hf jooki clone [-h] [-b <base64>] [-d <hex>] [-p <hex>]
6185
@@ -81,6 +105,8 @@ or use the base64 encoded parameter to clone:
81105
Note: Jooki doesn't like more than one NDEF record, so make sure you just have one. Check with `hf mfu ndefread`
82106

83107
### List of known figurine types
108+
^[Top](#top)
109+
84110
`Value`|`Figurine Type`|
85111
|------|---------------|
86112
**01** | Stones |

0 commit comments

Comments
 (0)