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

UART error

Hi,

I am using the NRF52832 with softdevice 6.1.1

I am using the minimal ble_app_uart ecample, just changes the RX_PIN_NUMBER to 11  an TX_PIN_NUMBER to 12 to mach my board HW.

when I am trying to send data from MY MCU to the NRF52832 I got APP_UART_COMMUNICATION_ERROR

with error communication code  =  0x04

How can I handle this error !?

Best regards

Jawad

  • Hi,

    It's likely some noise or similar on the UART.RXD pin, you can ignore it. Though it may also be because the baud rate is not correct, which can also lead to error code 0x04 (FRAMING error):

    https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uart.html?cp=4_2_0_49_9_3#register.ERRORSRC 

    I suspect that the UART.RXD pin is not pulled high externally, this will cause the pin to float, and generate APP_UART_COMMUNICATION_ERROR. Make sure it is high, for instance by adding a 1Mohm pull up.

    Best regards,
    Kenneth

  • Hi,

    thank you for your help

    now I am getting error code 12

    what this error mean !?

    Best regards

    Jawad

  • From nrf_error.h I can find that:

    #define NRF_SUCCESS                           (NRF_ERROR_BASE_NUM + 0)  ///< Successful command
    #define NRF_ERROR_SVC_HANDLER_MISSING         (NRF_ERROR_BASE_NUM + 1)  ///< SVC handler is missing
    #define NRF_ERROR_SOFTDEVICE_NOT_ENABLED      (NRF_ERROR_BASE_NUM + 2)  ///< SoftDevice has not been enabled
    #define NRF_ERROR_INTERNAL                    (NRF_ERROR_BASE_NUM + 3)  ///< Internal Error
    #define NRF_ERROR_NO_MEM                      (NRF_ERROR_BASE_NUM + 4)  ///< No Memory for operation
    #define NRF_ERROR_NOT_FOUND                   (NRF_ERROR_BASE_NUM + 5)  ///< Not found
    #define NRF_ERROR_NOT_SUPPORTED               (NRF_ERROR_BASE_NUM + 6)  ///< Not supported
    #define NRF_ERROR_INVALID_PARAM               (NRF_ERROR_BASE_NUM + 7)  ///< Invalid Parameter
    #define NRF_ERROR_INVALID_STATE               (NRF_ERROR_BASE_NUM + 8)  ///< Invalid state, operation disallowed in this state
    #define NRF_ERROR_INVALID_LENGTH              (NRF_ERROR_BASE_NUM + 9)  ///< Invalid Length
    #define NRF_ERROR_INVALID_FLAGS               (NRF_ERROR_BASE_NUM + 10) ///< Invalid Flags
    #define NRF_ERROR_INVALID_DATA                (NRF_ERROR_BASE_NUM + 11) ///< Invalid Data
    #define NRF_ERROR_DATA_SIZE                   (NRF_ERROR_BASE_NUM + 12) ///< Data size exceeds limit
    #define NRF_ERROR_TIMEOUT                     (NRF_ERROR_BASE_NUM + 13) ///< Operation timed out
    #define NRF_ERROR_NULL                        (NRF_ERROR_BASE_NUM + 14) ///< Null Pointer
    #define NRF_ERROR_FORBIDDEN                   (NRF_ERROR_BASE_NUM + 15) ///< Forbidden Operation
    #define NRF_ERROR_INVALID_ADDR                (NRF_ERROR_BASE_NUM + 16) ///< Bad Memory Address
    #define NRF_ERROR_BUSY                        (NRF_ERROR_BASE_NUM + 17) ///< Busy

  • Hi,

    thank you for your quick response.

    I tested it with PC serial app using  UART to USB adapter and it works now.

    seams that my problem from MCU side !

    Best Reagrds

    Jawad

Related