cancel
Showing results for 
Search instead for 
Did you mean: 

st25ru3993 the program demo

Shi gan
Associate
Posted on May 08, 2018 at 08:26

st25ru3993 the program demo

void gen2Select(gen2SelectParams_t *p)

{ buf_[i] |= ((p->truncation<<3)&0x08); /* Truncate */}

how to use p->truncation,i do not known its meaning.

1 ACCEPTED SOLUTION

Accepted Solutions
Finnley Harris
ST Employee
Posted on June 04, 2018 at 09:43

The truncation is implemented based on Gen2 standard, from Gen2 2.0.1 protocol standard document, 6.3.2.12.1.1 (Description of mandatory Select command):

[...]Truncate indicates whether a Tag’s backscattered reply shall be truncated to those EPC bits that follow

Mask. If an Interrogator asserts Truncate, and if a subsequent Query specifies Sel=10 or Sel=11, then a

matching Tag shall truncate its ACK reply to the portion of the EPC immediately following Mask, followed

by a PacketCRC[...]

In other words it is used to reduce the payload size of the tag reply by masking part of its EPC ID.

In our firmware the truncation parameter for select is set via a GUI command:

In selectTag(),

appl_commands.c

:

selParams[idx].truncation = cmdBuffer.rxData[7];

In the current GUI there is no control to set the truncation, but the functionality behind is done.

An example setting of truncation could be done e.g. by adding the following

line

to the code:

In STReader::selectTag(),

STReader.cpp

:

TagSelect selCmd(TagSelect::Clear_and_add);

selCmd.setTarget(m_Session);

selCmd.setAction(m_Action);

selCmd.setAddr(m_Addr);

selCmd.setTruncation(1);

View solution in original post

1 REPLY 1
Finnley Harris
ST Employee
Posted on June 04, 2018 at 09:43

The truncation is implemented based on Gen2 standard, from Gen2 2.0.1 protocol standard document, 6.3.2.12.1.1 (Description of mandatory Select command):

[...]Truncate indicates whether a Tag’s backscattered reply shall be truncated to those EPC bits that follow

Mask. If an Interrogator asserts Truncate, and if a subsequent Query specifies Sel=10 or Sel=11, then a

matching Tag shall truncate its ACK reply to the portion of the EPC immediately following Mask, followed

by a PacketCRC[...]

In other words it is used to reduce the payload size of the tag reply by masking part of its EPC ID.

In our firmware the truncation parameter for select is set via a GUI command:

In selectTag(),

appl_commands.c

:

selParams[idx].truncation = cmdBuffer.rxData[7];

In the current GUI there is no control to set the truncation, but the functionality behind is done.

An example setting of truncation could be done e.g. by adding the following

line

to the code:

In STReader::selectTag(),

STReader.cpp

:

TagSelect selCmd(TagSelect::Clear_and_add);

selCmd.setTarget(m_Session);

selCmd.setAction(m_Action);

selCmd.setAddr(m_Addr);

selCmd.setTruncation(1);