This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IWR6843: Secondary bootloader Error: RPRC Parsing Failure!!!

Part Number: IWR6843
Other Parts Discussed in Thread: MMWAVE-L-SDK

Tool/software:

We use secondary bootloader in order to update IWR6843's FW.

If the hardware including IWR6843 is power down when it receives FW data via XMODEM, IWR6843 doesn't bootup and output "Error: RPRC Parsing Failure!!!" message.

Detail procedure for reproducing is below.

1)Hardware power on.
2)Go to FW transfer mode on secondary bootloader
3)Send image to IWR6843 via XMODEM.
4)Before finishing transfer image, stop XMODEM.
5)Reboot IWR6843.

After this procedure, IWR6843 output "Error: RPRC Parsing Failure!!!" message.

We'd like to move to default backup image even if parsing updated image fail.
Could you provide us some solutions?

Best regards,
Masashi

  • Hi

    Thanks for your query. Please allow us  a couple of days to respond

    Regards

  • Hello.

    If your device is powered down it means that there is no image received because the software to receive the image isn't running.  Please make sure the device is powered on when doing the transfer.

    Sincerely,

    Santosh

  • Dear Santosh,

    I understand that transfer is not possible when the power is off.

    The problem occurs when the power goes out during transfer due to a power outage, etc. Whether intentional or not, it is possible that the end user may experience a power outage while transferring firmware. I would like the IWR6843 to run with the backup image when restarted after a power outage. If it starts up with the backup image, the system can request a resend, but the default secondary bootloader in the mmWaveSDK stops with an assert at this time, and no operations can be performed from the system.

    Could you please give me some advice on how to fix the secondary bootloader?

    Best regards,
    Masashi

  • Hello.

    I believe this is because the SBL for the 6843 rewrites the SFLASH contents after the first operation so that on reset it loads the actual application as opposed to the SBL.  You will need to modify the SBL to remove this feature so that the first valid image in SFLASH remains the SBL and then you can have the SBL check for the type of reset to determine whether to load the intended image or the back up image.

    Sincerely,

    Santosh

  • Hello,

    Thank you for your reply.

    My understanding is different.

    After a reset, SBL is running.
    And the process of selecting whether to load an updated image or the default image is still running.

    The problem is that if the updated image is incomplete (for example, if not all of the image could be written due to a power outage, etc.), SBL doesn't detect the error in the updated image and doesn't switch to the default image.

    The relevant source code is below.
    sbl.c

    line 571: Load updated image
    line 580: If loading updated image is fail, load backup image.
    Issue is SBL doesn't go to line 580 when updated image is incomplete. 

    Best regards,
    Masashi

  • Hello.

    That is correct.  However, that is on the first run of the program as opposed to after a power off reset.  If you look at the lines above, it is updating the metaimage in SFLASH before writing the application image from SFLASH to RAM.  That means that once the power reset occurs, when the bootloader looks at SFLASH it will see the application as opposed to the SBL.  So if the updated image is incomplete, you may have loaded a faulty image and now the device is trying to boot a faulty image which would lead to a parsing error.

    Sincerely,

    Santosh

  • Is it possible to stop loading the image if it is incomplete and start from the backup image?
    If you know how to fix the program, please let me know.

  • Hello.

    You will have to add that checking yourself when you are loading the application image from SFLASH to SRAM.  If the contents of the application don't match the size set in the metaheader you can throw an error or jump to loading the backup image even before loading into SRAM.

    Sincerely,

    Santosh

  • We can get the size set in the metaheader.
    But the value is the same even if XMODEM transfers suceed or not.
    So we cannot use this value in order to judge whether the error happens.


    Please let me ask a more specific question.
    We think FW loding process stops at the follow.

    multicoreimage_parser.c
    The function SBL_stateRPRCDownloadParse()

    /* Load image - to the destination location */
    bytesRead = SBL_imageParser(&imageChunk[0], bufferLen);
    
    if (SBL_CHECK_ERROR_STATUS)
    {
        SBL_printf("Error: RPRC Parsing Failure!!!\r\n");
        DebugP_assert(0);
    }

    I tried to modify source code.
    I commented out DebugP_assert(0) and made the exit process after detecting an error.
    And loads the backup image again,


    But I got the following error.

    Error: CRC Driver (Channel 2) get transaction id failed [Error code -2103]

    How should we modify the code? Could you give us some advice?

  • I think the best way to handle this is to remove the writing of the application from SRAM to SFLASH during the boot process.  That way, the SBL will load every time and load the application automatically every time and if there is an issue it will boot the backup image.  Like I stated earlier.  The copy from SRAM to SFLASH means that the SBL will no longer be booted on power up so if there is an issue during that process it could be trying to boot an incorrect/faulty image.  In addition, it looks like there is some error when trying to parse through the image, so I would debug that function(SBL_imageParser) to get a better idea of what is happening.  For reference, I would look at the MMWAVE-L-SDK for a reference implementation of the SBL where this would not be an issue as the application is not copied from SRAM back to SFLASH at any point.

    Sincerely,

    Santosh

  • Thank you for your reply.

    I would like to try the following. How do I remove the SRAM that has been interrupted from loading? If there is any reference in the source code, please let me know.

    I think the best way to handle this is to remove the writing of the application from SRAM to SFLASH during the boot process.

    I checked the MMWAVE-L-SDK.
    There is a big difference with the SBL I am currently using, so I would like to remove the writing of the application.

    Just to confirm, I understand that when SBL starts up, the application is loaded from SFLASH to SRAM, not from SRAM to SFLASH. Is that correct?

  • How do I remove the SRAM that has been interrupted from loading? If there is any reference in the source code, please let me know.

    You can just reset the device to clear RAM.

    Just to confirm, I understand that when SBL starts up, the application is loaded from SFLASH to SRAM, not from SRAM to SFLASH. Is that correct?

    That is correct.

    Sincerely,

    Santosh

  • Thank you for your reply.

    I understand that a soft reset can clear the RAM.

    When I do a soft reset, it clears everything including other internal parameters,
    so I can't tell whether it's before the application metaimage is loaded or after an attempt to load it has failed.

    Is there a way to retain the state before and after a soft reset and determine which of the above two is occurring?

  • That shouldn't matter, though as the behavior in both of those cases should be the same, correct?  If it is in the middle of loading the application and it fails due to a power reset or something, RAM would clear and upon reset, the SBL would be loaded again and try to load the actual application image.  Per my understanding, the only reason the backup image should be reloaded is if there is something wrong with the actual application itself, but if you are going to restart the process anyways and the actual application image is correct, you might as well try to load the same application and not the backup application right?

    Is there a way to retain the state before and after a soft reset and determine which of the above two is occurring?

    There may be a way to retain some information after a soft reset, but I think what would be your best bet is to keep track of what kind of reset occurred and based on that reset reason load in your desired application image.  In the TRM there is a description for the RSTCAUSE register that might be helpful for this.

    Sincerely,

    Santosh