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

Confused with the pins assigned to NRF_LOG_INFO() and printf()

Hello,

 

I am using nRF52832 DK PCA10040 v1.2.4, SDK_15.3.0, S132 SoftDevice and Segger for flashing the image. I am using ‘ble_app_blinky’.

 

I have very basic query.

 

1) In block diagram I am seeing only one UART. This can be enabled with or without EasyDMA. Without EasyDMA it is just UART whereas with EasyDMA it is UARTE. Is my understanding is correct ?

 

2) In ‘uart’ example, printf() is working. This uses UART (Without EasyDMA). To cross check, (On Development kit) I changed pin configuration in pca10040.h as below and it did not work. So to my understanding printf() uses UART with instance 0 and pins as 5, 6, 7 and 8.

 

 

    #if 1 // As is in Development kit
        #define RX_PIN_NUMBER           8
        #define TX_PIN_NUMBER           6
        #define CTS_PIN_NUMBER          7
        #define RTS_PIN_NUMBER          5
    #else
        #define RX_PIN_NUMBER           11
        #define TX_PIN_NUMBER           12
        #define CTS_PIN_NUMBER          13
        #define RTS_PIN_NUMBER          14
    #endif

 

3) If “uart’ example uses UART to print, then whether NRF_LOG_INFO() uses the same UART in ble_app_blinky. To cross check as above, I changed the pin configuration. But still I am seeing debug prints from Development Kit.

a) Whether NRF_LOG_INFO() uses UART. If so what are the pin configurations. Even if I change pins from 5, 6, 7 and 8 to 11, 12, 13 and 14 still NRF_LOG_INFO() prints on Terminal (Using Development Kit).

b) If NRF_LOG_INFO() does not use UART, then how debug prints are printing on Terminal (I am using ‘Tera Term’).

 

4) If I load ‘ble_app_blink’ on Development kit, I am able to see debug prints (Using NRF_LOG_INFO()) on Terminal. But if I load the same on my custom board I could not able to see the prints. In my board, as show above, I am using 11, 12, 13 and 14. Also ‘ble_app_blinky” do not have hardware flow control. So even I disconnected RTS & CTS. But still I am not able to see debug prints.

 

5) Below are the configurations in sdk_config.h. Just I want to print debug prints using NRF_LOG_INFO() on my custom board instead of Development kit (Which is working).

             

#define NRF_LOG_BACKEND_RTT_ENABLED 0
#define NRF_LOG_BACKEND_UART_ENABLED 1
#define NRF_LOG_ENABLED 1
#define NRFX_UART_ENABLED 1
#define UART_ENABLED 1
APP_UART_ENABLED is not defined in sdk_config.h of ‘ble_app_blinky’.

 

Please let me know your inputs and correct me if I am wrong in any of the above statements.

Also please take on priority as I struck up with this issue.

 

Thanks & Regards

Vishnu Beema

Parents
  • Hi Simo,

     

    Sorry, still I am confused.

     

    1) In ble_app_blinky how to change UART pins without changing pca10040.h file. In this example there is no ‘comm_params’ as in ‘uart’ example.

     

    2) If there is only one UART, then how to print debug prints and at the same time use UART to communicate with other device (Serial communications).

     

    3) If I load ‘ble_app_uart’ example as is into Development kit I am seeing only debug prints in printf() but not in NRF_LOG_INFO(). If both use same UART why debug prints in NRF_LOG_INFO() are not printing.

     

    Thanks & Regards

    Vishnu Beema

Reply
  • Hi Simo,

     

    Sorry, still I am confused.

     

    1) In ble_app_blinky how to change UART pins without changing pca10040.h file. In this example there is no ‘comm_params’ as in ‘uart’ example.

     

    2) If there is only one UART, then how to print debug prints and at the same time use UART to communicate with other device (Serial communications).

     

    3) If I load ‘ble_app_uart’ example as is into Development kit I am seeing only debug prints in printf() but not in NRF_LOG_INFO(). If both use same UART why debug prints in NRF_LOG_INFO() are not printing.

     

    Thanks & Regards

    Vishnu Beema

Children
No Data
Related