⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
3 posts / 0 new
Last post
Thanhtu131
Offline
Last seen:4 months 6 days ago
加入:2018-09-18 17:44
Logging issues

Hi, i am trying to use the UART2 to logging some strings. i use the ble_example_peripheral example. i use uart for debuging. in user_periph_setup.h, P2_6 and P2_7 is set for Tx and Rx pin. i don't want to use a uart usb or solid more header pin into jumper J10, so i set P0_4 and P0_5 for Tx and Rx pin. It works, but I wonder if it can cause any error while debuging. please give me some advices. thanks!!

Device:
PM_Dialog
Offline
Last seen:2 days 13 hours ago
工作人员
加入:2018-02-08 11:03
Hi Thanhtu131,

Hi Thanhtu131,

Please follow the steps below in the ble_app_barebone project:

  1. #define CFG_PRINTF in the da1458x_config_basic.h
  2. Change the uart ports of the fw and assign the UART_TX port/pin to P04 and UART_RX port/pin to P05 (make sure that the configuration that you have changed is under the HW_CONFIG_PRO_DK and that this the board declared in the HW_CONFIG definition).

#elif HW_CONFIG_PRO_DK

#定义UART2_TX_GPIO_PORT GPIO_PORT_0

#define UART2_TX_GPIO_PIN GPIO_PIN_4

#define UART2_RX_GPIO_PORT GPIO_PORT_0

#define UART2_RX_GPIO_PIN GPIO_PIN_5

If you have one other of our DKs or if you are working on a custom board, please modify the definitions above with the appropriate GPIOs

  1. Include the arch_console.h file into user_barebone.c
  2. Invoke arch_printf("TEST");
  3. Change the baud rate of the terminal into 115200.

This is also described in couple of documents but in case of DA14531:

http://lpccs-docs.dialog-semiconductor.com/Tutorial_SDK6/serial_port.html

http://lpccs-docs.dialog-semiconductor.com/DA14531_FAQs/Software.html#how-to-enable-the-debug-uart-mechanism-and-how-to-test-it-in-da145xx-pro-development-kit

Thanks, PM_Dialog

Thanhtu131
Offline
Last seen:4 months 6 days ago
加入:2018-09-18 17:44
thanks a lot!!

thanks a lot!!