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

Ignore Frame and Break Error in UART Driver

Hello,

I am using a custom nRF52840 (SDK 14.2.0, SoftDevice S140) based board.

I am using the UART module and associated UART drivers.

Is there a way to ignore the Break and Frame errors in the driver, and not cause the UART to stop receiving? 

Specifically, I want to use read in and process a message frame, and ignore the break error which occurs after the message frame is read in.

According to Nordic UARTE documentation, "If there was a framing error (wrong stop bit), that specific byte will NOT be stored into Data RAM, but following incoming bytes will."

Is this valid for the UART too? And Is it possible to store that specific byte which had a frame/break error into Data RAM instead of discarding it?

Thanks,

Parents
  • Hi,

    Can you post exactly which UART module/driver you are using? Preferably the entire application/project.

    If you are using app_uart library, the HW errors are by default passed to the APP_ERROR_CHECK() in the event handler in the examples. You can prevent the application from doing this if you do not want this error to reset the chip.

    When using the UART peripheral, only a single byte is received at a time (a few more bytes can be received in the HW FIFO, but only 1 byte is read out of the peripheral at the time). You have to restart the reception after each byte, regardless of an error occurring or not.

    Best regards,
    Jørgen

  • I have attached the files which are related the the UART function of my project. The whole project is quite large and complex. 

    nRFdevzone_upload.zip

    I am handling UART events in my own file rs485.c

    I don't want break error(floating RX line after last stop bit of a message frame is received) to arise in the first place. Is there a way to do that in software? 

Reply Children
No Data
Related