1. An apparatus for accessing hidden data in a boundary scan test interface, the boundary scan test interface operating with a predetermined state transition diagram to perform state transition based on an input, wherein the state transition performed has at least one invalid state transition loop, the apparatus comprising: a state detector, for monitoring the input so as to output a first data when a first predetermined input stream is detected and then output a second data when a second predetermined input stream is detected, wherein the first and the second predetermined input streams are different and both conform to the invalid state transition loop; a shifter register, for storing a combination of the first and the second data, wherein the combination has an input key; a hidden register, for storing data; and a comparison device, for comparing the input key with a predetermined write key and loading a specific write data into the hidden register when the input key equals to the predetermined write key.