U-Flash - Pin Control

From SEGGER Knowledge Base
Jump to navigation Jump to search

Pin Control is a virtual U-Flash device which allows to control the Flasher's pins.

PincontrolUflash.JPG

Overview

Sometimes it may be necessary to set the target hardware to a specific state before programming a device. Possible use cases:

  • Setting a bi-stable relay
  • Force a CPU into a RESET condition before switching on the power supply

Note: After the execution of Pin Control, all pins except RESET are set to "high impedance" state. RESET keeps its state beyond the end of Pin Control execution.

Usage

  • Open U-Flash and click "Select device"
  • Select "Pin Control"
  • Click "Configure project"

Up to 64 stimuli can be set up under "Stimuli". The pin can be set to high, low, or left unchanged. Choose "H", "L" or "-". "-" will keep the pin's state unchanged.

The "Duration" defines the time in milliseconds for each step.

  • The "+" button adds a new stimuli step.
  • The "x" button deletes a stimuli step.

After downloading the corresponding project onto the Flasher, it works similar to a programming project and can be triggered via e.g. the #AUTO command.
Refer to the Flasher Automation article for more information about triggers.

A possible output of the pins could look like this:

PinControlSaleae.JPG

Terminal output

With a verbosity level of at least "Debug", pin stimuli are printed in the Flasher terminal.

For all pins except pin 19 the numbers have the following meaning:

State Value
LOW 2
HIGH 3
RELEASED / UNCHANGED 255

Pin 19 (power supply):

Power state Value
Off 0
On 1
#STATUS:CONNECTING
#INFO:Verbosity level: DEBUG
#INFO:Flash loader: SEGGER_PinControl_D.PEX
#INFO:Device: Pin Control
#INFO:UNI_Init()
#INFO: [App] Compiled: Oct  7 2025, 09:14:17
#INFO: [App] ********************************
#INFO: [App] *** PinControl is starting   ***
#INFO: [App] Reading Stimuli #   0
#INFO: [App] Duration[0] 001
#INFO: [App] PIN3                3
#INFO: [App] PIN5              255
#INFO: [App] PIN7              255
#INFO: [App] PIN9              255
#INFO: [App] PIN11             255
#INFO: [App] PIN15             255
#INFO: [App] PIN17             255
#INFO: [App] PIN19               1
#INFO: [App] Reading Stimuli #   1
#INFO: [App] Duration[1] 002
#INFO: [App] PIN3                2
#INFO: [App] PIN5                3
#INFO: [App] PIN7              255
#INFO: [App] PIN9              255
#INFO: [App] PIN11             255
#INFO: [App] PIN15             255
#INFO: [App] PIN17             255
#INFO: [App] PIN19               1
...