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

Having trouble using NRF log and UART to receive using COM Port

Hello

I need urgent help. From days I have been stuck exploring NRF SDK 15.0 to do a simple task.

I am using an NRF DK board PCA10040. After going through peripheral drivers and several documentation I wanted to simply set up UART port to send and receive data.

I simply wanted to link other on chip peripherals with UART and I also want to connect DK board with an RFID board via serial.

Turns out that all peripherals such as SAADC which I tried run on event handlers and services which is great but all SDK examples are dependent on NRF_Log! I found it to be extremely annoying to not single out processes.

Now I want to use service and handlers of any peripheral I desire and use it with simple UART, turns out there is no RX pin mapped to NRF_LOG back end serial? I traced it back to SDK and seems like only TX pin is mapped so is there no way to receive data over NRF_LOG?

        1) I simply want to receive data on UART using NRF Log

         2) I also tried CLI example but its way too complicated to include all that just to receive data

Please solve this issue of mine because I simply want to use a serial port to fit to my purpose, why doesn't NRF log support data reception?

I want to use all examples such as twi, SAADC with serial. SAADC is a critical part of the application we are trying to build and the fact that data is handled by handlers is fantastic but it makes other processes way too complicated.

Thanks in advance

Ali

Parents
  • Also, I found out nrf serial example where receiving and sending is also possible but its not integrating with SAADC even after adding changes for SAADC in sdkconfig.h

    Please make these examples relatable to each other and help us out in doing that

    If you could just tell me how to receive data / strings on nrf_log it'll be easier for me.

    Thanks

  • Hi Muhammad, 

    AliMahmood123 said:
    I found out nrf serial example where receiving and sending is also possible but its not integrating with SAADC even after adding changes for SAADC in sdkconfig.h

    Here is the SAADC Example

    What is the error message?

    AliMahmood123 said:
    If you could just tell me how to receive data / strings on nrf_log it'll be easier for me.

    Search for "NRF_LOG_BACKEND" in sdk_config.h. There are two possible defines there. UART or RTT, and they are set to either 0 or 1.

    If NRF_LOG_BACKEND_UART_ENABLED is enabled, it should be printed over the UART, which is picked up by the programming chip on the DK, and you can view it using e.g. Termite, or Putty.

    If NRF_LOG_BACKEND_RTT_ENABLED is enabled, then you can see the log with the Segger debugger and JLink RTT Viewer.

    BR,

    -Amanda H 

  • Hi Amanda

    Thanks your your response

    There is no error message in SAADC example.

    Allow me to re phrase

    I simply want to receive data in SAADC example via using NRF log backend as UART.

    I have the macros enabled which you have mentioned as I have gone through countless examples and SDK exploration.

    Please tell me if it's possible to receive data via NRF_LOG using UART as backend.

    Let's say I want to trigger SAADC example using a serial character. How do I detect or read UART input via NRF_LOG?

    During my exploration I have found out that it's not possible to receive via UART in NRF_LOG because RX pin is not mapped in SDK and internal drivers of NRF Log Backend.

    Considering my SAADC trigger use case via serial, please tell me how to approach this issue, keeping in mind that I want to use all SAADC services such has event handler which are used in these examples

Reply
  • Hi Amanda

    Thanks your your response

    There is no error message in SAADC example.

    Allow me to re phrase

    I simply want to receive data in SAADC example via using NRF log backend as UART.

    I have the macros enabled which you have mentioned as I have gone through countless examples and SDK exploration.

    Please tell me if it's possible to receive data via NRF_LOG using UART as backend.

    Let's say I want to trigger SAADC example using a serial character. How do I detect or read UART input via NRF_LOG?

    During my exploration I have found out that it's not possible to receive via UART in NRF_LOG because RX pin is not mapped in SDK and internal drivers of NRF Log Backend.

    Considering my SAADC trigger use case via serial, please tell me how to approach this issue, keeping in mind that I want to use all SAADC services such has event handler which are used in these examples

Children
Related