Zephyrnet Logo

Versal – Watchdog timer (WDT) reset-on-timeout demo

Date:

In this short blog we will discuss how to set up the Versal™ Watchdog Timer to reset on a timeout.

I will introduce you to the Error Management CDO commands, and how we can update the PDI to pass them to the PLM.

Error Management CDO command:

These are discussed in Chapter 8 of (UG1304):

em.PNG

The format of the command is:

em_set_action PM_ERR_NODE_ID  ACTION  MASK

The PM_ERR_NODE_ID for LPD_SWDT and FPD_SWDT are 0x28104000

MASK is 0x60 for LPD_SWDT

MASK is 0x61 for FPD_SWDT

The CDO command below will result in system reset on FPD_SWDT timeout:

em_set_action 0x2810C000 0x2 0x61 

Updating the PDI with CDO:

I have previously discussed how we can update the PDI with a custom CDO in this blog entry.

We will be using the same approach here.

Create the CDO test file:

version 2.0
em_set_action 0x2810c000 0x2 0x61

We can use the cdoutil in XSCT to convert this into a CDO file:

cdoutil -output-binary-be -output-file wdt.cdo wdt.txt

Now, we can update the PDI with our Watchdog Timer CDO file.

To do this, go to the Vivado project and navigate to the .runs_0/impl_1 folder in the Vivado project directory then open the BIF file and append the content below (inside the last }):

image
{ name = wdt_cdo id = 0x1234567 partition { id = 0x12 type = cdo file = wdt.cdo }
}

Then use bootgen to regenerate the PDI (use the same file name):

bootgen -arch versal -image vck190_example_wrapper.bif -w -o vck190_example_wrapper.pdi

Now if you export the Hardware, the XSA will be populated with the updated PDI.

PetaLinux Image:

The user can create their PetaLinux image as normal. However, here I have updated the watchdog timer node to reset-on-timeout:

&watchdog { reset-on-timeout;
};

Testing on Hardware:

trigger_to.PNG

After 30 seconds (default), you should see the event, and the system reset occur:

to.PNG

Coinsmart. Beste Bitcoin-Börse in Europa
Source: https://forums.xilinx.com/t5/Design-and-Debug-Techniques-Blog/Versal-Watchdog-timer-WDT-reset-on-timeout-demo/ba-p/1229556

spot_img

Latest Intelligence

spot_img

Chat with us

Hi there! How can I help you?