Intel® Agilex™ Hard Processor System Remote System Update User Guide

ID 683184
Date 7/13/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

7.4.2. Watchdog and Max Retry Operation

This section uses U-Boot to demonstrate the following:
  • RSU handling of watchdog timeouts.
  • max retry feature, which allows each image to be tried to be loaded up to three times.
  • RSU notify, which allows the HPS software state to be reported before and retrieved after a watchdog timeout.
  • Clearing the RSU status error fields.
  • Resetting the current retry counter value.
Note: The commands listed in this section rely on the commands from the Basic Operation section running first, specifically adding an application image to the P2 flash partition.
  1. Power-cycle the board, stop U-Boot and check the RSU status log:
    SOCFPGA # rsu status_log
    Current Image   : 0x02000000
    Last Fail Image : 0x00000000
    State           : 0x00000000
    Version         : 0x00000202
    Error location  : 0x00000000
    Error details   : 0x00000000
    Retry counter   : 0x00000000

    The application image from slot 1 (partition P2) was loaded, since it is marked as the highest priority in the CPB.

    What do the fields mean:
    • Retry counter is 0x00000000 —first attempt to load this image.
    • State is 0x00000000 —No errors to report
  2. Query and display the max_retry value:
    SOCFPGA # rsu display_max_retry 
    max_retry = 3
  3. Cause a watchdog timeout by setting the timeout value to lowes possible. This prevents U-Boot from being able to service it in time:
    SOCFPGA # mw.l 0xffd00204 0
  4. The watchdog immediately times out, and SDM reloads the same application image, since the max retry parameter is set to three. Look at the U-Boot console and check the status log:
    SOCFPGA # rsu status_log
    Current Image   : 0x02000000
    Last Fail Image : 0x02000000
    State           : 0xf0060001
    Version         : 0x0acf0202
    Error location  : 0x00000000
    Error details   : 0x00000000
    Retry counter   : 0x00000001

    The same P2 image is loaded, but the retry counter value is now one, which means this is the second retry for this image to be loaded. The version field shows the last failure was by an application image (0xACF). The state field shows the last error was a watchdog timeout (0xF006) and that the latest notify value from HPS software was from SPL loading U-Boot (0x0001).

  5. Clear the error status so we can see the next errors. Query the status to show the errors were cleared:
    SOCFPGA # rsu clear_error_status
    SOCFPGA # rsu status_log 
    Current Image   : 0x02000000
    Last Fail Image : 0x00000000
    State           : 0x00000000
    Version         : 0x00000202
    Error location  : 0x00000000
    Error details   : 0x00000000
    Retry counter   : 0x00000001
  6. Cause another watchdog timeout. At the U-Boot prompt, query the RSU log and observe that the retry counter is now two:
    SOCFPGA # rsu status_log
    Current Image   : 0x02000000
    Last Fail Image : 0x02000000
    State           : 0xf0060001
    Version         : 0x0acf0202
    Error location  : 0x00000000
    Error details   : 0x00000000
    Retry counter   : 0x00000002
  7. Clear the error status so we can see the next errors.
  8. Use the notify command to let SDM know the state of HPS software as a 16bit value:
    SOCFPGA0 # rsu notify 0x1234
  9. Cause a watchdog timeout one more time and display the RSU status log after the restart:
    SOCFPGA # rsu status_log
    Current Image   : 0x01000000
    Last Fail Image : 0x02000000
    State           : 0xf0061234
    Version         : 0x0acf0202
    Error location  : 0x00000000
    Error details   : 0x00000000
    Retry counter   : 0x00000000

    The SDM loaded the next application image in the CPB (P1), and it reports that the image P2 failed. The state indicates that a watchdog timeout occurred (upper 16 bits = 0xF006) and that the notify value reported by HPS software was 0x1234. The upper 16 bits of version are set to 0x0ACF which means the previous error was reported by the application image firmware. For more information, refer to RSU Status and Error Codes .

  10. Clear the errors and display the status - it shows no errors:
    SOCFPGA # rsu clear_error_status
    SOCFPGA # rsu status_log
    Current Image   : 0x01000000
    Last Fail Image : 0x00000000
    State           : 0x00000000
    Version         : 0x00000202
    Error location  : 0x00000000
    Error details   : 0x00000000
    Retry counter   : 0x00000000
  11. Cause a watchdog timeout, boot to U-Boot, and display the status - it shows the retry counter is one:
    SOCFPGA # rsu status_log
    Current Image   : 0x01000000
    Last Fail Image : 0x01000000
    State           : 0xf0060001
    Version         : 0x0acf0202
    Error location  : 0x00000000
    Error details   : 0x00000000
    Retry counter   : 0x00000001
  12. Reset the current retry counter value to zero and query the status again to confirm it:
    SOCFPGA # rsu reset_retry_counter
    SOCFPGA # rsu status_log         
    Current Image   : 0x01000000
    Last Fail Image : 0x01000000
    State           : 0xf0060001
    Version         : 0x0acf0202
    Error location  : 0x00000000
    Error details   : 0x00000000
    Retry counter   : 0x00000000