Cannnot receive more than 509 bytes on PN7462

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Cannnot receive more than 509 bytes on PN7462

1,417件の閲覧回数
lram
Contributor I

Hi,


I'm working on an ISO RFID reader with the PN7462, making use of the NxpNfcRdLib. My requirements state that the reader must be able to receive up to 2048bytes in a single frame.

I have configured FSDI to 0xB for both ISO 14443-A as well as ISO-14443-B cards and have increased the RX buffer to 2048bytes.
But for some reason, I only ever receive 509bytes, regardless of the actual message length.

I have been debugging this quite a bit, and always end up at the same point:
In phhalHw_PN7462AU_Exchange(), the relevant values look okay (pDataParams->wRxBufSize = 2048)

After the call to phhalRf_PCD_Exchg(), the status is 0 (PH_ERR_SUCCESS) and gphhalRf_RxParams.wRxBytes = 509.

As I don't have access to the source of phhalRf_PCD_Exchg(), I cannot debug this further.

I have additionally measured the waveform during the exchange and it it quite clear that the reader just stops receiving the message long before it actually ends, and even starts to respond while the card is still sending data.

I have read both the hardware- and software user manual and I cannot find anything that would explain this behavior.
Is there anything I might be missing?

 

0 件の賞賛
返信
5 返答(返信)

1,336件の閲覧回数
lram
Contributor I

Hi again,

I've done some more testing and apparently it is not possible to set PHHAL_RF_CONFIG_RX_MAX_LENGTH to anything larger than 508?
Could you confirm that please?

It the PN7462 generally supposed to be able to receive more than 508 byte frames?

 

See example code below: When I set RX_MAX_LENGTH to 504, the value is correctly applied and when I read it back I get 504.
But when I set RX_MAX_LENGTH to 512, the value is changed to 508.

status = phhalRf_SetConfig(PHHAL_RF_CONFIG_RX_MAX_LENGTH, 504);
// status == PH_ERR_SUCCESS (0x0)

status = phhalRf_GetConfig(PHHAL_RF_CONFIG_RX_MAX_LENGTH, &maxlen);
// status == PH_ERR_SUCCESS (0x0)
// maxlen == 504

 

status = phhalRf_SetConfig(PHHAL_RF_CONFIG_RX_MAX_LENGTH, 512);
// status == PH_ERR_SUCCESS (0x0)

status = phhalRf_GetConfig(PHHAL_RF_CONFIG_RX_MAX_LENGTH, &maxlen);
// status == PH_ERR_SUCCESS (0x0)
// maxlen == 508

0 件の賞賛
返信

1,312件の閲覧回数
Fabian_R
NXP TechSupport
NXP TechSupport

Hello sir,

The capability to receive a frame larger than 256 bytes (which is defined by ISO 14443). Requires to perform frame chaining. This corresponds to the ISO specification and, I cannot provide further information regarding this.

Additional to this, the implementation of a larger frame, will entirely depend on the buffer allocation and, how you are building the architecture of the memory management.

 

Best Regards,
Fabian
0 件の賞賛
返信

1,114件の閲覧回数
lram
Contributor I

Hi Fabian,

yes, the default framesize defined in ISO 14443 is 256bytes. But ISO 14443 also defines the value of FSDI, which is used to configure larger framesizes (512byte, 1024byte, 2048byte) on the reader.

What I am trying to achieve here is to set this FSDI to 0xB, which means the max receive framesize is 2048bytes (in one frame, without chaining).

I have allocated the required buffers and adapted the memory management accordingly.

The only part of this operation that is failing the setting the buffer size in the hardware.
I have found that there is a register defined at address 0x40004020UL (CLIF_RX_BUFFER_REG).
It is not possible to read or write this register directly with PH_REG_GET/PH_REG_SET.
Can you confirm or deny that this is the register that is addressed via the config option PHHAL_RF_CONFIG_RX_MAX_LENGTH?

I am using the NxpNfcRdLib v05.19.00
In PN7462AU/phCommon/inc/PN7462AU/PN7462AU_clif.h I see:

#define CLIF_RX_BUFFER_REG (0x40004020UL) /**< rw*/
#define CLIF_RX_BUFFER_REG_RX_BUFFER_LENGTH_MASK (0x007F0000UL) /**< rw - Defines the length of the Rx buffer (in data words). */
#define CLIF_RX_BUFFER_REG_RX_BUFFER_LENGTH_POS (16UL)

Judging from the MASK, the largest value that can be set here is 0x7F (127 in decimal), and the comment in the same line states that this value is given in data words. As one data word is 4 bytes, we can deduce that the maximum value we can set here is 127*4=508

Can you confirm this?

Thanks and best regards,
lram

0 件の賞賛
返信

1,351件の閲覧回数
lram
Contributor I

Hello Fabian,

Thanks for your response. I have tried setting PHHAL_RF_CONFIG_EXCHG_TIMEOUT_VALUE_US but the phhalRf_SetConfig always returns PH_ERR_INVALID_PARAMETER.

I haven't found any real documentation on this setting either, would you mind letting me know what range this expects?

 

But in debugging this, I have found what I now assume is the base of the issue:
In phhalHw_PN7462AU_Init(), I'm setting the max Rx length to 2048 with

status = phhalRf_SetConfig(PHHAL_RF_CONFIG_RX_MAX_LENGTH, wRdlibRxBufSize);

This function returns PH_ERR_SUCCESS, but when I then read the set value back using

status = phhalRf_GetConfig(PHHAL_RF_CONFIG_RX_MAX_LENGTH, &maxlen);

it returns 508.

 

I would very much appreciate any ideas you can provide.

Best regards

0 件の賞賛
返信

1,390件の閲覧回数
Fabian_R
NXP TechSupport
NXP TechSupport

Hello sir,

I believe the issue might be related to the RF configurations.

Sure, you have to configure the RF settings of the board you can configure the Exchange Timeout value.

Please review the User Manual (UM10913) Section 4.10 RF register settings.

In order for you to have a better understanding, please check the API: SW3683/docs/PN7462AU/PN7462AU-FW-apiguide/index

Best Regards,
Fabian
0 件の賞賛
返信