SWD_EXIT_ON_ERROR
The SWD_EXIT_ON_ERROR function provides a way to set whether SWD functions SWD_READ and SWD_WRITE will exit the test or continue immediately after encountering protocol errors. SWD_EXIT_ON_ERROR is enabled by default. When SWD_EXIT_ON_ERROR is disabled SWD_GET_LAST_RESPONSE, SWD_GET_RESPONSE_COUNTERS and SWD_READ with ack and parityError arguments should be used to check for SWD protocol errors.
An SWD protocol error is defined as any acknowledgement returned by the protocol that isn't the OK response (0b001). It is also an SWD protocol error if the parity check fails on a read scan.
Syntax
SWD_EXIT_ON_ERROR( INT enabled )
Parameters
- enabled
- TRUE to enable exit on error behaviour. FALSE to disable exit on error behaviour. It is TRUE by default.
When SWD_EXIT_ON_ERROR is called all outstanding requests are completed using the previous setting before it is changed. If SWD_EXIT_ON_ERROR is called within a HOLDOFF the HOLDOFF is temporarily disabled allowing all queued up requests to complete with the previous setting before it is changed.
Example
SWD_EXIT_ON_ERROR(FALSE); SWD SWD_READ(0, DPIDR[3..2])(id, ack, parityError); PRINT("id = ", FORMAT(id, "%#08x"), ", ack = ", FORMAT(ack, "%#03b"), ", parityError = ", parityError, "\n"); SWD_READ(0, STAT[3..2])(data, ack, parityError); PRINT("data = ", FORMAT(data, "%#08x"), ", ack = ", FORMAT(ack, "%#03b"), ", parityError = ", parityError, "\n"); END;
id = 0x2ba01477, ack = 0b001, parityError = 0 data = 0x00000000, ack = 0b001, parityError = 0
XJTAG v4.1.100