This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can I debug BMD300 through SWD interface

Hi developers,

I am trying to collect data from an AFE (ADS1298) and could get some values. Inorder to check the accuracy I need to plot this value. I am programming this external board using PCA10040 nRF 52DK. I did debug using NRF_LOG_USES_RTT. My question is, Can I send the data from BMD300 through this programming interface using UART? I have seen this NRF_LOG_USES_UART. What is the purpose of this? Will this meet my requirement? If yes, how can I configure this?

Thanks & regards, Vishnu

  • Hi Vishnu,

    I am afraid that you cannot send data from the BDM300 through the SWD interface using UART. The NRF_LOG_USES_RTT and NRF_LOG_USES_UART defines which interface the nrf_log module should use, i.e. either RTT or UART. On a nRF52 DK, you can use both since the both the SWD interface and the UART lines are connected to the Segger OB chip. However, on an external board only the SWD inteface is connected to the Segger OB chip through the Debug OUt connector. You will have to connect the UART pins from your external board to the UART pins of the Segger OB chip in order to send UART data via the nRF52 DK to your computer.

    Best regards

    Bjørn

  • Thanks for this precise explanation. Suppose if I use UART pins what are the things I should define? I am assuming the following. 1. I should call uart_init function with appropriate pin and baud rate configurations. 2. NRF_LOG_USES_UARTshould be set as 1. Do I need to NRF_LOG_USES_RTT to set as 1 also? 3. I should trace 2 wires from the configured TX and RX pins of BMD300 and connect them to SWD pins. Am I correct? Did I miss anything?

  • If you want to use the UART for logging, then just define NRF_LOG_USES_UART and remove the NRF_LOG_USES_RTT define. You should not have to initialize the uart as the nrf_log module will do this for you.

    If you do not want log and just send data, then you should remove both defines above and initialize the UART peripheral using either the app_uart library or the nrf_drv_uart driver API.

    In both cases the UART pins of the BDM300 should be connected to the UART pins of the Segger OB chip(ATSAM3U2CA-AU) on the nRF52 DK. You can find the hardware schematics and layout files of the nRF52 DK here.

Related