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

UARTE Frame error receiving

Hi

I am seing framing errors when receiving using UARTE.

It is not external hardware, I have checked with different other interfaces and measured timing, no problems there.

BUT, doing the same with UART instead of UARTE I do not get any framing errors (same hardware setup).

Actually with UARTE I only get one rx character then framing errors....

  • Hi,

    This error is expected since you specify that you should use TIMER0, and that is used by the SoftDevice.

  • Great thanks a lot - that fixed it.

    Since nrfx_timer was not enabled I just took the first two.....

    With all the other macro things I would suggest a check that if SD is used timer 0 should then not be available or at least generate and error if you try to enable it in the sdk_config.

  • I do experience a little bit of problems with the timeout function.

    I have configured the timeout at 4 ms (4000 us).

    What I see is really a timeout around 7-8 ms. I did configure the timer default values similar to the example, but is there anything else I could be missing?

    Also I sometimes get a timeout, even though there were really no "hole" in the packet on the line. In this case I fixed it by assembling the messages from two NRF_LIBUARTE_ASYNC_EVT_RX_DATA events which should really not be expected when messages on the line has no holes between bytes and there is a timeout similar to 4 bytes (at 9600 baud).

  • Actually I found a little bit more with the timer. 

    I am testing system with a good serial protocol analyzer to look for any problems.

    I am also seeing some situations where there is a timeout only 100 us after reception of the last character.

    (With the current testing I am running 38400 with a timeout of 2000 us. Also in this case the normal timeout seems to end up being around 7-8 ms. Is there a minimum...) NOT CORRECT, it was 4 ms.

    So I do think there must be some kind of problem related to the handling of timer and timeout.

  • The timing issue seems to be that I always get around double timeout compared to what I configure.

    So I guess it is some rather simple configuration potentially on the time I have not figured out what to set. There's not really any description on how to do it. Maybe I should simply configure it to twice what I need.

    The observation above regarding timeout of 2000 also giving 7-8 ms was wrong, it gives 3-4 ms.

Related