General running
While running XJEase code, there are a number of important runtime errors that could occur. These are generally fatal errors, and are used to try and make the system as safe (for the board and its devices) as possible.
Broken JTAG chain
This runtime error can occur at any time during the running of the JTAG chain, and is used to tell the user that for some reason the chain is not working correctly.
The chain integrity is continuously checked by clocking a set of extra test bits into the chain at each scan of the boundary scan register. The test bits are appended to the start of the chain and should be seen as the last bits read out of the chain. The chain is clocked by an extra amount to make sure that the data is correctly positioned into the scan chain.
Looking at the figure above, the JTAG chain contains N zeros before the scan, which are the bits we need to read. The new chain contains all ‘1’s, and we tag our K test bits (the chain tag) onto the start of the chain. We clock N+K bits into the JTAG chain and read N+K bits out, which includes the returned JTAG chain and the chain tag. The tag is then checked to make sure that the boundary scan register is complete (and is the correct length).
If the JTAG chain broke whilst the data was being scanned, it could be the result of one of the following errors:
- The previous JTAG chain asserted a net that set one of the JTAG devices into reset. Therefore, on this scan, the device was not in the EXTEST state and the length of the JTAG chain was wrong.
- The previous JTAG chain set two pins in contention with each other, increasing the source current and tripping the current limit on the power supply.