We have encountered a problem where a low level on PIO0_3 prior to external reset risks placing the LPC804M101JHI33 microcontroller into a mode where the output state of I/O pins above PIO0_5 is inaccessible from software.
Inaccessible pins behave either as sources, sinks or high-impedance inputs independent of GPIO, IOCON or PINENABLE configuration while digital input continue to operate normally. Reset does not recover normal operation.
The occurs intermittently across multiple devices and leaves the product in a state where power-cycling by disassembling the device is required for recovery.
I request help in establishing the root cause of this issue and assessing potential workarounds. Thank you in advance for your assistance.
Reproducing the problem
A minimal and self-contained repro case which exhibits this problem has been attached. This code operates by:
- Disabling pull-up and hysteresis on PIO0_3 (TCK/SWCLK).
- Waiting for the pin to settle.
- Looping by pulling down PIO0_5 (RESET) to generate a reset.
This causes PIO0_3 to slowly float towards ground. The fault occurs on crossing the ≈1.6V input threshold and at which point the digital input state is unstable due to the lack of hysteresis.
The actual target system disables SWD and sinks PIO0_3 (TCK/SWCLK). The fault is intermittent and difficult to reproduce in a lab environment in this configuration.
Additional findings:
- No abnormal supply voltages or other electrical deviations have been observed.
- SWD debugging operates normally after a fault.
- The fault does not occur if PIO0_3 is pulled high prior to the reset.
- The fault does not occur if SWCLK is disabled via PINENABLE0 prior to sinking PIO0_3.
- The fault occurs on the first edge and not if PIO0_3 is subsequently toggled during operation.
- Timing of the PIO0_3 reconfiguration and reset has no observable effect.
Traces
The below trace shows a test run from power-on. The fault can be seen where PIO0_12 (ISP) becomes a sink. The device traps into ISP mode and stops on the next reset.

Figure 1: CH1 = PIO0_5 (RESET), CH2 = PIO0_2 (TMS), CH3 = PIO0_3 (TCK), CH4 = PIO0_12 (ISP)
The next trace shows the same failure mode with a narrower time base. The accelerated RESET rise after the fault is normal and caused by a capacitive coupling to PIO0_22 which has started sourcing after the fault.

Figure 2: 500µs time-base
The next trace shows PIO0_12 (ISP) going high impedance instead. The resulting pin resulting configuration is not consistent.

Figure 3: ISP high impedance
The fault also occurs on the rising edge of PIO0_3 (TCK) during reset.

Figure 4: Fault at rising edge
Analysis
The MCU is assumed to have entered JTAG boundary-scan mode since:
- The inaccessible pins correspond to the boundary scan cells. The accessible pins correspond to JTAG control signals and REST.
- The boundary scan exit procedure of sinking PIO0_4 (TRST) during and asserting RESET restores normal mode.
The TCK pulled-up is restored on reset and results in a rising clock edge after the falling edge of RESET. This is assumed to sequence the JTAG TAP.
The effect of the falling clock edge after releasing RESET is less clear. A guess is that a floating input without hysteresis induces oscillation which results in a timing violation or metastability and places the TAP into an unintended state.
Clearly the intent is that boundary scan should normally only be operated during RESET. This is variously described in table 314 and the top of section 28.5.3 of UM11065 rev 1.3.
The sequence for exiting boundary scan includes releasing TRST and implies that that it may be possible to remain in boundary scan after RESET:
“Once the boundary scan operations are completed, assert the TRST pin to enable the SWD debug mode and release the RESET pin” (section 28.5.3 of UM11065, rev 1.3).
This section includes the surprising statement that the TAP operates outside of RESET and disregards TMS:
“POR, BOD reset, or a LOW on the TRST pin puts the test TAP controller in the Test-Logic Reset state. The first TCK clock while RESET = HIGH places the test TAP in Run-Test Idle mode” (section 28.5.3 of UM11065, rev 1.3).
Regards,
Johan