Doc ID022016 Rev 4
29/47
AN3954
Description of functions
46
C/C++ language
Declaration
:
__declspec(dllimport) int __stdcall
CR95HFDll_STCmd(char *StringCmd, char *StringReply);
Prototype
:
int iresult;
char strRequest[50]="";
char strAnswer[50]="";
iresult = CR95HFDll_STCmd(strRequest ,strAnswer);
Input parameter
:
strMCUrequest: Request to be sent by the STM32 MCU to the
CR95HF IC following the Datasheet.
Example 1: Send RdReg (Read Wakeup Register) command to read
CR95HF wakeup flags: “010803620100”
Where:
“01” is the transparent command header byte
“0803620100” is the request to be sent to the CR95HF IC
“08” is the RdReg command
“03” is the request length
“62” is the wakeup register value
“01” is the register size
“00” ST reserved
Example 2: Select ISO 15693 protocol: “010202010D”
Where:
“01” is the transparent command header byte
“0202010D” is the Protocol Select ISO 15693 frame
“02” is the Protocol Select command
“02” is the request length
“010D” are the Protocol Select command parameters
Example 3: IDLE mode:
“01070E0B21007801180020606064743F01”
Where:
“01” is the transparent command header byte
“01070E0B21007801180020606064743F01” is the Idle frame
for Tag Calibration
Output parameter
:
strCR95HFanswer: Answer of the CR95HF IC
Example 1: Answer to RdReg command = “000102”
Where:
“00” is the status byte (see
“01” is the size of the answer
“02” is the register value
Example 2: Answer to Select ISO 15693 protocol = “0000”
Where:
“00” is the status byte (see
“00” is the size of the answer