Skip to content

Commit

Permalink
telink: add instructions how to use USB logging (project-chip#37376)
Browse files Browse the repository at this point in the history
- modify lighting-app telink REDME.md file

Signed-off-by: Borys Nykytiuk <borys.nykytiuk@telink-semi.com>
  • Loading branch information
BorysNykytiuk authored Feb 7, 2025
1 parent ff5f8fd commit 8deebeb
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions examples/lighting-app/telink/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,33 @@ To get output from device, connect UART to following pins:

Baud rate: 115200 bits/s

### Using USB COM Port Instead of UART

Alternatively, the USB COM port can be used instead of UART for console output.

1. Build the project with the following parameter:

```bash
$ west build -b <build_target> -- -DTLNK_USB_DONGLE=y
```

2. Connect the USB cable to your device. A new serial device should appear in
your system (e.g., `/dev/ttyACM0` on Linux or a COM port on Windows).
3. Use your preferred terminal application (like `minicom`, `screen`, or
`PuTTY`) to connect to the newly detected serial device.
4. In your source code, ensure the following header is included and the USB
device stack is initialized:

```c
#ifdef CONFIG_USB_DEVICE_STACK
#include <zephyr/usb/usb_device.h>
#endif /* CONFIG_USB_DEVICE_STACK */
#ifdef CONFIG_USB_DEVICE_STACK
usb_enable(NULL);
#endif /* CONFIG_USB_DEVICE_STACK */
```

### Buttons

The following buttons are available on **tlsr9518adk80d** board:
Expand Down

0 comments on commit 8deebeb

Please sign in to comment.