In the file NxpNfcRdLib/comps/phalMfNtag42XDna/src/Sw/phalMfNtag42XDna_Sw.c
In function phalMfNtag42XDna_Sw_ReadData
You will find:
if (bIns == 0x00)
{
bCmdBuff[wCmdLen++] = PHAL_MFNTAG42XDNA_CMD_READ_DATA;
}
else
{
bCmdBuff[wCmdLen++] = PHAL_MFNTAG42XDNA_CMD_READ_DATA_ISO;
}
Additionally in phalMfNtag42XDna_Int.h
#define PHAL_MFNTAG42XDNA_CMD_READ_DATA 0xBD /**< MFNTAG42XDNA Read Data cmd. */
But 0xBD is an invalid command for NTAG424
Prior validation at a higher layer should reject usage of bIns == 0x00 and force the usage of the supported command code:
#define PHAL_MFNTAG42XDNA_CMD_READ_DATA_ISO 0xAD /**< MFNTAG42XDNA Read Data cmd using ISO chaining. */\\
Also note a related write command is also not supported and should throw an early validation error
#define PHAL_MFNTAG42XDNA_CMD_WRITE_DATA 0x3D /**< MFNTAG42XDNA Write data cmd. */
Suggest code cleanup in the internal Sw/Int layers as well to remove the if() condition since the invalid code path is "dead code"
Thank you for your recommendations, sir. I'm communicating this with the respective team. We appreciate the help that the community can provide to us.
We are very happy to receive this type of comment that will help us keep our API updated.