Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎09-24-2019

Temperature tamper detection


I am trying to set up the tamper monitoring unit on an ZynqMP UltraScale+ device (XCZU5EV-2SFVC784I). I set up the temperature window in the system management wizard in Vivado according to following picture. I want that the system goes to secure lockdown 0 if the device temperature is not in the window defined (35-85°C). 

System Management WizardSystem Management Wizard

Therefore, I also set the response in the Zynq UltraScale+ MPSoC block. The following picture shows my settings.

Zynq UltraScale+ MPSoCZynq UltraScale+ MPSoC

The generated bitstreams then is exported to petalinux, where I generate my boot image.

When my device is under 35°C I normally would expect, that it goes into secure lockdown, right after loading the FSBL. According to  Figure 7-1 in the software development guide( the tamper monitoring unit should be active right after loading the FSBL. Though the system boots into Linux where it gets stuck (see timestamps at 3.735681), until the chip reaches the 35°C, and continuous booting afterward. Right after logging into Linux I checked the temperature registers and got between 36 to 40 °C, which enforces my theory. To get the temperature I used the AMS driver and read  `/sys/bus/iio/devices/iio:device0/in_temp0_ps_temp_raw` to get the ADC value and converted it with the equation 2-11 given in the sysmon user guide ( The log output of the cold boot described above is attached. If the system rebooted before cooling down the system boots as expected.

The other scenario I went through was cooling the device below 35 °C during runtime. I wrote a small program, which constantly prints the temperature to be sure I am under the 35 °C. In this case nothing happens. The system runs as before. I decreased the temperature until about 25 °C.

Further I tested the tamper unit with the tamper trigger register. By activating it in Linux using the sysfs the system goes straight to secure lockdown. Thus, I do not understand why it reacts different with a temperature alarm. Recently I successfully triggering a tamper event with the JTAG port.

What am I missing? Thanks for any suggestions and solutions.

I am using the latest software tools (version 2019.2).

Best regards,


0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
Registered: ‎07-12-2018

Hi @delafthi 

  1. Load FSBL with the CSU tamper settings
  2. As you are setting the temperature values through System Management Wizard there is a need of loading the bit-stream.
  3. Then read the temperature registers whether configured with the given values.
  4. Then run the application and check if the lock-down happens by decreasing the value.
  5. csu_tamper_4 register is for Temp_LPD and csu_tamper_5 register for Temp_FPD secure down.

Did you check the temperature values just after loading the FSBL? If not read the value after loading the FSBL before loading the Linux image and see if booting hangs for some time.

Another point to configure the temperature lower and upper values through the AMS registers and check.Tamper_image.PNG

We will discuss further steps depending up on the results, let me know for further queries on the above steps.

Best Regards
Abhinay PS
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give kudos to a post which you think is helpful and reply oriented.

0 Kudos
Registered: ‎09-24-2019

Hi @abhinayp ,

Thank you for the answer. Finally I got time to look into it. As you suggested, I checked the AMS registers and saw, that the according temperature alarm registers are set to 0x0. See the appended file with the memory display of the whole AMS register.  I am sure, that the bitstream is loaded before uboot starts (the regsiters where checked in uboot).

After checking the values I wanted to set the threshold values directly in the AMS registers and proceed with booting, to test if the device goes to secure lock down when I decrease the temperature. But following question arised, when I wanted to set the ALARM_TEMP_FPD_LOWER and the ALARM_TEMP_LPD_LOWER values. According to the Device Register Reference ( the 16 bit register is splitted in bit 15:1 for the temperature value and bit 0 for the threshold mode. Now the biggest number in this register I can enter is 2^15=32768. If I calculate this back to the maximum temperature I can enter with the formula 2-11 given in the sysmon user guide (, I get (32768*509.3140064/2^16)-280.23087870=-25.5738755°C. I am certain, that higher values are also possible, but actually I do not see how? Can you help me out?

0 Kudos