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

Odd behavior with nRF52810 UART transmission

I seem to be getting odd behavior of the UARTE0. Actually, this same behavior happens with the standard UART0.

I have a loop that sends a two byte message every 1 second. But actually, the message is sent at random times.

When the message is sent, it is correct data and bit timing is as expected with 9600 baudrate. I checked the loop

by illuminating an LED and it is 1 second as expected. I've studied the nRF52810 data sheet and it seems like I

have all the configuration registers set properly. Hopefully someone has some tips.

Parents
  • Hi,

    You should wait for the nRF to generate ENDTX event that indicate that the transfers is complete by adding this after you have started the transfer:

    regards

    Jared

  • Yes, I tried waiting for the ENDTX flag and still got the same behavior.

    A couple details I forgot to include:

    Declaration of the buffer variable:

    static volatile int8_t uarte0TxBuffer[8];                                       // UARTE0 Tx buffer

    SES version 4.30a

    nRF52 SDK 15.3.0

    I attached a scope plot. As you can see, the messages are sent at random times, but synchronized with the loop timing.

    It's like the STARTTX task is not being triggered every time.

    UART Trace

  • OK, now I feel stupid. I didn't have enough resolution on the scope sampling, so it wasn't seeing every TX.

    Increasing the samples per second now reveals proper transmission.

    UART Trace 2

  • Hi,

    This can happen to the best of us! :) The most important thing is that you found the solution and returned with it for others to see if they have the same issue.

    best regards

    Jared 

Reply
  • Hi,

    This can happen to the best of us! :) The most important thing is that you found the solution and returned with it for others to see if they have the same issue.

    best regards

    Jared 

Children
No Data