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

Error from fota_download

I am using the NRF9160 for SPI using an external Flash. After using the 'http_application_update' samples, I was able to get the value of the data written on the external flash. However, after downloading the content and reaching 100 %, the file loops and starts over again. Ideally, a single read is necessary however, the final output shows the download repeatedly over multiple iterations. Before the 'http_application_update' starts again, there is an error thrown from the fota_download  which is as follows:

The error shows a code: -13 and is related to the function 'dfu_target_done'. Since this is a system defined function, I am not sure what the reason for this error is and how to go about rectifying the code. The function for the dfu_target_done is defined as follows:

I am not sure why there is a stack overflow occurring after the error message followed by a rebooting of the system as follows:

After this, the code starts looping back and re-executing by first connecting to the LTE and then asking for the user input. Please let me know if I need to provide additional details or code references to any part to help clarify my question. 

Thanks,

Siddhant Yeole

Parents
  • Hello Didrik,

    I have attached the log file below.

    I am trying to connect to this server:  glasschair.s3.eu-central-1.amazonaws.com

    The downloaded file is this: Downloading: app_update+(3).bin [0]

    The log given below is for the case when I have not connected the external flash and simply uploaded the project onto the board. So, you might see the JEDEC ID as 0. However, after connecting with the flash, the JEDEC ID is matched and I get the correct output for the DATA READ - which reads the content from the flash. I have added a drive link as a reference for the project.

    Even with the flash connected instead of stopping the process after completing the read, the project resets and re-establishes the communication link and then repeats the whole process. Thanks for your response and please let me know if I need to send any more details. I am attaching a log for the execution with the flash as well.

    2021-05-24T07_52_08.974Z-log.txt

    2021-05-21T15_50_50.026Z-log.txt

    Siddhant Yeole

  • Hi, and sorry for the late reply.

    Have you had any progress on the problem?

    If not, can you enable more logging?

    CONFIG_LOG_MINIMAL=n
    CONFIG_DFU_TARGET_LOG_LEVEL_DBG=y
    CONFIG_FOTA_DOWNLOAD_LOG_LEVEL_DBG=y
    CONFIG_DOWNLOAD_CLIENT_LOG_LEVEL_DBG=y
    CONFIG_THREAD_NAME=y

    Which NCS version are you using?

    How did you modify the sample to use an external flash?

    Best regards,

    Didrik

  • Hello Didrik,

    Sorry for the late feedback. I fixed the issue. However, I have a different error that occurs after the completion of the run for the http_application_update. Once I have finished downloading the content and it is time to 'print buf' and complete the code - I get an error that says: 'USAGE FAULT - DIVISION BY ZERO'. This is followed by printing the content of various registers. I am attaching the log for your reference - Could you please let me know which files can I check or look for the source of this error as it seems to me that it is some error in the status of registers due to change in the configuration. 

    Best Regards,

    Siddhant

    2021-06-15T08_12_40.882Z-log.txt

Reply
  • Hello Didrik,

    Sorry for the late feedback. I fixed the issue. However, I have a different error that occurs after the completion of the run for the http_application_update. Once I have finished downloading the content and it is time to 'print buf' and complete the code - I get an error that says: 'USAGE FAULT - DIVISION BY ZERO'. This is followed by printing the content of various registers. I am attaching the log for your reference - Could you please let me know which files can I check or look for the source of this error as it seems to me that it is some error in the status of registers due to change in the configuration. 

    Best Regards,

    Siddhant

    2021-06-15T08_12_40.882Z-log.txt

Children
Related