In the following example, a GPIO test is done in the output mode with
Serial Wire Debug (SWD) controls.
-
Write the GPIO pins connected with drive strength H0H1:
- Address: 0x50842700 (+ n x 0x4 for GPIO0-31)
- Data: 0x300
-
Set the GPIO pins to the output mode:
- Address: 0x50842514
- Data: 0xFFFFFFFF
-
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
-
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.