Getting UART_ERROR_FRAMING issue

I am using Asynchronous API of uart to receive the data. During the reception I face UART_ERROR_FRAMING issue in UART_RX_STOP event. But after getting that too it enables the uart again and carry on with receiving the data but after sometime which is around 17-20min the data stops coming.
The baud rate is 9600 and is same for both the devices.

What can be the issue?
PLease suggest

Parents
  • Hello,

    But after getting that too it enables the uart again

    Are you doing this manually? If so, are you able to pinpoint why it doesn't happen after "17-20 minutes"?

    Best regards,

    Edvin

  • Actually currently this issue is solved but I am facing some different issue right now 
    I am only receiving uart data and it comes after every 6sec and I store it in the sd card 
    It runs smoothly till 5:30hrs but suddenly after 5:30hrs my code gets stuck in 

    while (1) {
    __WFE();
    } after generating a hard fault 
    I tried to debug step by step also but didn't find the issue because of which it was getting stuck 

    For reference, I am attaching my code below
    wifi_over_http 2.zip


  • Actually I put a breakpoint in the WFE() function as I know that it always gets stuck in that 
    In the call stack it was seen that after going through the hard fault it jumped to WFE()

    In the logs I get nothing related to this it was very normal 

    [05:32:43.950,469] <inf> home_demo: Buffer is released
    [05:32:43.950,469] <inf> home_demo: UART_RX_DISABLED
    [05:32:43.950,500] <inf> home_demo: UART_RX_BUF_REQUEST
    [05:32:43.950,531] <inf> home_demo: New buffer set successfully
    [05:32:49.736,206] <inf> home_demo: UART_RX_RDY
    [05:32:49.738,830] <inf> home_demo: The data from prodo is: 05:32:49 {"Hcho-mg/m3": 0.00,"Co-PPM": 0,"Co2-PPM": 1735,"Pm1.0-¦Ìg/m3": 6,"Pm10-¦Ìg/m3": 5,"Pm25-¦Ìg/m3": 6,"Voc-mg/m3": 0,"Temp-¡æ": 77,"Hum-": 75,"Noi-DB": 37,"UVA-mw/cm2": 0.07,"UVB-mw/cm2": 0.00,"UVC-mw/cm2": 0.00,"RED": 4,"GREEN": 0,"BLUE": 0,"IR": 0}

    [05:32:49.744,812] <inf> home_demo: UART_RX_BUF_RELEASED

    [05:32:49.744,842] <inf> home_demo: Buffer is released
    [05:32:49.744,842] <inf> home_demo: UART_RX_BUF_RELEASED

    [05:32:49.744,873] <inf> home_demo: Buffer is released
    [05:32:49.744,873] <inf> home_demo: UART_RX_DISABLED
    [05:32:49.744,903] <inf> home_demo: UART_RX_BUF_REQUEST
    [05:32:49.744,934] <inf> home_demo: New buffer set successfully
    [05:32:55.540,618] <inf> home_demo: UART_RX_RDY
    [05:32:55.543,243] <inf> home_demo: The data from prodo is: 05:32:55 {"Hcho-mg/m3": 0.00,"Co-PPM": 0,"Co2-PPM": 1736,"Pm1.0-¦Ìg/m3": 5,"Pm10-¦Ìg/m3": 5,"Pm25-¦Ìg/m3": 6,"Voc-mg/m3": 0,"Temp-¡æ": 77,"Hum-": 75,"Noi-DB": 39,"UVA-mw/cm2": 0.07,"UVB-mw/cm2": 0.00,"UVC-mw/cm2": 0.00,"RED": 4,"GREEN": 0,"BLUE": 0,"IR": 0}

    [05:32:55.549,224] <inf> home_demo: UART_RX_BUF_RELEASED

    [05:32:55.549,255] <inf> home_demo: Buffer is released
    [05:32:55.549,255] <inf> home_demo: UART_RX_BUF_RELEASED

    [05:32:55.549,285] <inf> home_demo: Buffer is released
    [05:32:55.549,285] <inf> home_demo: UART_RX_DISABLED
    [05:32:55.549,316] <inf> home_demo: UART_RX_BUF_REQUEST
    [05:32:55.549,346] <inf> home_demo: New buffer set successfully

    Logs looks like this 

    8168.build.zip

    This is the build folder

  • How can I find the faulting instruction address in the build folder?

  • Hi, Edvin is out of office 

    Edvin said:
    Perhaps you can show what your hardfault looks like? Do you have any screenshots or logs?

    I can not see any hard fault from the log you posted below. 

    Also

    If you have a logic analyzer I would follow the date connection and verify that everything looks okey at the moment when it stops receiving. 

    If your device battery powered?

    Regards

    Runar

  • Thanks for your reply runsiv
    This issue has been solved

Reply Children
Related