NRFX Uarte invalid data after framing error

Hey,
I try to implement wtih nordic connect sdk and the nrfx library a uart communication where a 9th data bit will send for synchronisation.
When the 9th data bit will be received the event type isNRFX_UARTE_EVT_ERROR and the error_mask is UARTE_ERRORSRC_FRAMING_MSK.
That is fine but the data is always 255.In the parameter there two ways for getting the data

*p_event->data.error.rx.p_data

and

*p_event->data.rx.p_data

Its very important to get these correct data. Have anybody a idea?

Parents
  • Hello,

    I think I would have looked that the serial interface using a logic analyzer just be sure you have full control over the start, data, and stop bit, and that that the framing error actually occurs after a correctly received byte. What is the distance between the two? Is it possible that the pointer or buffer is updated on framing error? 

    That said, you may want to check out the nRF54L for new designs, it have some new features for UARTE:
    https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/uarte.html 

    Kenneth

  • Hey Kenneth,
    thanks for your reply. So the distance or the time between end of last normal data packet and start of framing error packet is 1,2 ms.

    "Is it possible that the pointer or buffer is updated on framing error? "

    What do you mean with that question? So between the RX_DONE event and the RX_EVT_ERROR there is no update from my code side.

  • HinnaX said:
    So the distance or the time between end of last normal data packet and start of framing error packet is 1,2 ms.

    Interesting, I guess in this case that once the UART experience the framing error it unintentionally overwrite the last received byte on the buffer. I can't see any other reason. Since this is handled in hardware it's very little that can be done with it, other than to try to workaround it by reading the buffer faster or delaying the sync bit?

    Enneth

Reply
  • HinnaX said:
    So the distance or the time between end of last normal data packet and start of framing error packet is 1,2 ms.

    Interesting, I guess in this case that once the UART experience the framing error it unintentionally overwrite the last received byte on the buffer. I can't see any other reason. Since this is handled in hardware it's very little that can be done with it, other than to try to workaround it by reading the buffer faster or delaying the sync bit?

    Enneth

Children
Related