Hello lianying zhang,
If the test fails to measure the length of the instruction register, Error measuring IR length is thrown.
The error might be due to one or more of the following reasons:
• TRST stuck low: This may hold the target JTAG logic in reset, preventing any shifts to occur.
• TMS disconnected or stuck: This may prevent the target from making any JTAG state changes.
• TCK disconnected or stuck: This may prevent any state changes or clocking of data.
• TDI disconnected or stuck: This may prevent the test pattern data from getting into the target.
• TDO disconnected or stuck: This may prevent the test pattern data from getting out of the target.
If the test fails, then it is possible that there is a physical connection problem with the JTAG pins, or the JTAG frequency is too high.
Please refer to JTAG interface Connection as the following.

Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------