marcus905 / libnfc

Automatically exported from code.google.com/p/libnfc
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Implement WriteBack cache for PN53x registers #155

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We can greatly speed up communication by reduce the number of 
WriteRegiter/ReadRegister using an host-cache then apply almost all settings in 
a row.

Original issue reported on code.google.com by neomil...@gmail.com on 7 Mar 2011 at 1:01

GoogleCodeExporter commented 9 years ago

Original comment by romu...@libnfc.org on 9 May 2011 at 7:29

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1058.

Original comment by romu...@libnfc.org on 9 May 2011 at 7:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
For the record:
With a PN532 breakout board (from microBuilder.eu):
r1057 (w/o cache):
$ examples/nfc-list 2>&1 | grep "TX: 00  00  ff  ..  ..  d4  06" | wc -l
45
$ examples/nfc-list 2>&1 | grep "TX: 00  00  ff  ..  ..  d4  08" | wc -l
4

r1060 (w cache):
$ examples/nfc-list 2>&1 | grep "TX: 00  00  ff  ..  ..  d4  06" | wc -l
8
$ examples/nfc-list 2>&1 | grep "TX: 00  00  ff  ..  ..  d4  08" | wc -l
3

r1070 (w cache and optimisations):
$ examples/nfc-list 2>&1 | grep "TX: 00  00  ff  ..  ..  d4  06" | wc -l
5
$ examples/nfc-list 2>&1 | grep "TX: 00  00  ff  ..  ..  d4  08" | wc -l
1

Original comment by romu...@libnfc.org on 11 May 2011 at 5:03

GoogleCodeExporter commented 9 years ago
With a SCL3711:
r1057 (w/o cache):
$ examples/nfc-list 2>&1 | grep "TX: 00  00  ff  ..  ..  d4  06" | wc -l
50
$ examples/nfc-list 2>&1 | grep "TX: 00  00  ff  ..  ..  d4  08" | wc -l
7

r1060 (w cache):
$ examples/nfc-list 2>&1 | grep "TX: 00  00  ff  ..  ..  d4  06" | wc -l
13
$ examples/nfc-list 2>&1 | grep "TX: 00  00  ff  ..  ..  d4  08" | wc -l
7

r1070 (w cache and optimisations):
$ examples/nfc-list 2>&1 | grep "TX: 00  00  ff  ..  ..  d4  06" | wc -l
8
$ examples/nfc-list 2>&1 | grep "TX: 00  00  ff  ..  ..  d4  08" | wc -l
3

Original comment by romu...@libnfc.org on 11 May 2011 at 5:07

GoogleCodeExporter commented 9 years ago
About execution speed, with a PN532 breakout board:
r1057 (w/o cache):
$ time examples/nfc-list > /dev/null 2>&1

real    0m1.560s
user    0m0.010s
sys     0m0.000s

r1070 (w cache and optimisations):
$ time examples/nfc-list > /dev/null 2>&1

real    0m0.780s
user    0m0.000s
sys     0m0.000s

Original comment by romu...@libnfc.org on 11 May 2011 at 5:22