After manually sending several commands to PN548 , now on each startup when 2F 31 01 00 is sent by the controlling software, it returns
4F 31 01 01 - REJECTED and the software crashes there.
The software's startup sequence is:
TX: FF FF 20 00 01 00 (I'll be omitting FF FF from now on)
RX: 40 00 03 00 10 00
TX: 20 01 00
RX: 40 01 15 00 03 0e 03 00 04 00 01 02 03 02 c8 00 ff 02 00 04 08 02 01 26
TX: 2f 02 00
RX: 4f 02 05 00 00 00 93 e5
TX: 2f 00 01 00
RX: 4f 00 01 00
TX: 20 03 03 01 a0 0f
RX: 40 03 45 00 01 a0 0f 40 1d 01 26 01 a5 a5 c3 c3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
TX: 2f 02 00
RX: 4f 02 05 00 00 00 93 e5
TX: 2f 31 01 00
RX: 4f 31 01 01
whereas the response to that before , used to be
RX: 4f 31 03 00 00 10
After searching the logs, I found that the last command I sent that got a response was
2f 02 08 01 A0 0D 04 32 03 40 3D
with a reponse:
4f 02 05 09 00 00 93 e5
where I mistakenly used 2f instead of 20 trying to set an antenna register.
Does anyone know what 2f 31 does and in which manual its refereed, so I can reset some values and resolve the issue?
(I dont' have access to the controlling/driver software source code, so I probably need to set a value back to its defaults in order for this to get back to working)
Thank you in advance!
I found that A0 0E is the VBAT setting for 3.3, 5v etc.... Still I don't know what 2f 31 is. I've found in manuals:
2F 30 (TEST_PRBS_CMD), 2F 3D (TEST_ANTENNA_CMD), 2F 33 (TEST_GET_REGISTER_CMD) but not 2F 31...
To answer my own question, I managed to fix this by sending this command and restoring the value:
A0 0E 03 02 09 00
to
A0 0E 03 03 00 00
which I had thankfully backed up a list of all registers first.
Thanks.