KB: Sample application that use the DIO5 button in their baseline functionality with the UART initialized

Any samples that initialize the UART interface and also attempt to use DIO5 will encounter the same problems (i.e., our HOGP/HID BLE sample uses DIO5 to imitate a Keyboard input, Blinky etc. and will therefore see the same problems if UART is enabled).

The Blinky sample application uses the DIO5 button to toggle between enable and disabled LED blinking. DIO4 and DIO5 are also used to support UART over USB. If you have set the Output Interface to UART in ‘printf.h’ (this is retained in the CMSIS directory, and therefore across all projects), and have the ‘printf_init()’ call in the sample (Blinky has it by default), the DIO5 button will encounter problems while the UART is running.

Solution in file : printf.h

Here is the affected line:


Change it to this: