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

Problems with UART in 52840

I am using a code similar to App_uart_C from SDK17.02 - central sending data over uart to another peripheral.

After 30-60 sec, the operation stops probably due to an error in the UART and I need to reset the chip

How can I handle UART errors ? I don't mind loosing data - but I cannot stay with the software crashing

Thanks

Avi

Parents
  • Hi,

    It does not sound like a very reliable way to resolve the issue with a delay, and this could also increase the current consumption of your device.

    If you can explain where the error occurs, and what the error is, I can help you find a better solution. If the chip "stops", it is most likely ending up in the error handler, because an error code was passed to APP_ERROR_CHECK() macro, and you have built the application in debug mode. You do not have to pass all error codes to this macro, it is fully up to you how you handle an error. For instance, if you get a NRF_ERROR_NO_MEM error from a call to app_uart_put(), you can filter this error and tell your application to retry the operation at a later point.

    Best regards,
    Jørgen

  • Indeed, after more testing, it was not a reliable solution.

    I am streaming data via the UART at 38K from external processor, and transmitting the data to another peripheral. 

    The reception is done via uart_event_handle which is forwarding the data arrays to ble_nus_c_string_send

    Since my circuit is part of a system (i.e. ext processor), I cannot use debugger and I cannot see the errors if exist.

    I will have to try "fixing" the code and check it on my system to see if it helps.

    I would appreciate any ideas

Reply
  • Indeed, after more testing, it was not a reliable solution.

    I am streaming data via the UART at 38K from external processor, and transmitting the data to another peripheral. 

    The reception is done via uart_event_handle which is forwarding the data arrays to ble_nus_c_string_send

    Since my circuit is part of a system (i.e. ext processor), I cannot use debugger and I cannot see the errors if exist.

    I will have to try "fixing" the code and check it on my system to see if it helps.

    I would appreciate any ideas

Children
No Data
Related