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

On initiating UART Tx/Rx at the host side causes communication error (0x04)

Hi,

My requirement is to validate the PCA10040 dev board with a different set of UART pins. I have tried the following steps, but as soon as I start the firmware, it crashes with a communication error with an error code 0x04.

  1. Modified the UART sample provided with SDK-16 to change the UART pin (Rx, Tx, CTS, and RTS pins to 12, 15, 11, 14 respectively) and to transmit just a single byte.
  2. Baud rate is set to 9600
  3. The UART pins are connected to another device with Android running on it
  4. A ground line from the host (the android device) is connected to the dev board
  5. Launch an application from the host side to receive the data from PCA10040
  6. Start the UART sample application.

While doing this experiment, USB is connected to the dev-board for debugging the application. Please let me know whether I am missing something.

Parents
  • Hi,

    I believe error code 0x04 means framing error. This is a common error code if for instance the RXD pin is floating, it should be high when there is no data present. You may either ignore this error, and/or pull RXD up using an external 1Mohm resistor until there is a peer ready to control the pin.

    Best regards,
    Kenneth

  • Hi Kenneth,

    Thanks for your response.

    We have changed the Rx line to P0-25 of PCA10040, since, as per the schematic this is one of the unused pins in the dev-board. Also, as you mentioned, we tried to pull up this line externally using a 1Mohm resistor.

    With this change initially, the Rx line is pulled up as captured below:

    But, on starting the receiver application at the host side (the android device), this line gets pulled down again and hit the same issue (this happens even before initiating any data transfer). Looks like the host is pulling down this line.

    Regards,

    -Bijosh

Reply
  • Hi Kenneth,

    Thanks for your response.

    We have changed the Rx line to P0-25 of PCA10040, since, as per the schematic this is one of the unused pins in the dev-board. Also, as you mentioned, we tried to pull up this line externally using a 1Mohm resistor.

    With this change initially, the Rx line is pulled up as captured below:

    But, on starting the receiver application at the host side (the android device), this line gets pulled down again and hit the same issue (this happens even before initiating any data transfer). Looks like the host is pulling down this line.

    Regards,

    -Bijosh

Children
Related