Skip to main content

Logging issues

DA14580

1 year ago

Posted by Thanhtu131 0 points 2 replies
0 upvotes

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!!

accepted answer!

1 year ago

PM_Dialog

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

        #define 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

1 year ago

Thanhtu131 0 points

thanks a lot!!