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

Project: uart_pca10040

I would like to run and test this example project in the nrf52 Development Kit. How do I find out what pins are assigned to RX and TX? 

Parents
  • In SDK 15 the uart example has the pins defined in pca10040.h. There are:

    #define RX_PIN_NUMBER 8
    #define TX_PIN_NUMBER 6
    #define CTS_PIN_NUMBER 7
    #define RTS_PIN_NUMBER 5
    #define HWFC true

  • Thank you for your help.

    I did a search of header files to find the baud rate. In nrf_drv_config.h is the following:

    /* UART */
    #define UART0_ENABLED 1

    #if (UART0_ENABLED == 1)
    #define UART0_CONFIG_HWFC NRF_UART_HWFC_DISABLED
    #define UART0_CONFIG_PARITY NRF_UART_PARITY_EXCLUDED
    #define UART0_CONFIG_BAUDRATE NRF_UART_BAUDRATE_38400
    #define UART0_CONFIG_PSEL_TXD 6
    #define UART0_CONFIG_PSEL_RXD 8
    #define UART0_CONFIG_PSEL_CTS 7
    #define UART0_CONFIG_PSEL_RTS 5
    #define UART0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW
    #ifdef NRF52
    #define UART0_CONFIG_USE_EASY_DMA false
    //Compile time flag
    #define UART_EASY_DMA_SUPPORT 1
    #define UART_LEGACY_SUPPORT 1
    #endif //NRF52
    #endif

    Is HWFC enabled or disabled? 

  • That will depend on the device at the other end of the serial link from the PCA10040. The nRF5x can support HW flow control on or off. If the far end supports hardware flow control I'd turn it on. It will prevent having issues where BLE radio activity causes characters to be missed.

Reply Children
No Data
Related