Example of GPIO test in output mode

In the following example, a GPIO test is done in the output mode with Serial Wire Debug (SWD) controls.

  1. Write the GPIO pins connected with drive strength H0H1:
    • Address: 0x50842700 (+ n x 0x4 for GPIO0-31)
    • Data: 0x300
  2. Set the GPIO pins to the output mode:
    • Address: 0x50842514
    • Data: 0xFFFFFFFF
  3. Write the GPIO pins to the wanted state.

    For example:

    • Set even pins low and odd pins high:
      • Address: 0x50842504
      • Data: 0xAAAAAAAA
    • Set odd pins low and even pins high:
      • Address: 0x50842504
      • Data 0x55555555
  4. Measure the voltage in the GPIO pins, for example, with an oscilloscope.
    Use a suitable load current, for example, 1 mA to verify the quality of the contact.
For information on GPIO, see GPIO - General purpose input/output in nRF9160 Product Specification.