23. C2 Debug and Programming Interface
23.1 Introduction
The device includes an on-chip Silicon Labs 2-Wire (C2) debug interface that allows flash programming and in-system debugging with
the production part installed in the end application. The C2 interface uses a clock signal (C2CK) and a bi-directional C2 data signal
(C2D) to transfer information between the device and a host system. Details on the C2 protocol can be found in the C2 Interface Speci-
fication.
23.2 Features
The C2 interface provides the following features:
• In-system device programming and debugging.
• Non-intrusive - no firmware or hardware peripheral resources required.
• Allows inspection and modification of all memory spaces and registers.
• Provides hardware breakpoints and single-step capabilites.
• Can be locked via flash security mechanism to prevent unwanted access.
23.3 Pin Sharing
The C2 protocol allows the C2 pins to be shared with user functions so that in-system debugging and flash programming may be per-
formed. C2CK is shared with the RSTb pin, while the C2D signal is shared with a port I/O pin. This is possible because C2 communica-
tion is typically performed when the device is in the halt state, where all on-chip peripherals and user software are stalled. In this halted
state, the C2 interface can safely "borrow" the C2CK and C2D pins. In most applications, external resistors are required to isolate C2
interface traffic from the user application.
RSTb (a)
Input (b)
Output (c)
MCU
C2CK
C2D
C2 Interface Master
Figure 23.1. Typical C2 Pin Sharing
The configuration above assumes the following:
• The user input (b) cannot change state while the target device is halted.
• The RSTb pin on the target device is used as an input only.
Additional resistors may be necessary depending on the specific application.
EFM8SB2 Reference Manual
C2 Debug and Programming Interface
silabs.com
| Smart. Connected. Energy-friendly.
Rev. 0.1 | 271