AM335x PRCM Tools

This page is companion to the AM335x Low Power Design Guide Application Note (this application note is in draft and not yet published).

Introduction
These tools are intended to be used together to read the state of the PRCM registers on the AM335x, and provide an easy way to quickly visualize the values read from these registers. To do this three components are used:
 * sitara_pwrst.sh: This shell script will read an input file containing a list of named register and address pairs and output a file with the values of these registers as well as their names and addresses.
 * AM335x_reglist.txt: This file contains the names and addresses of registers to be read by sitara_pwrst.sh. It is in the format of Register Name 0xAddress
 * am335x_prcm_viewer.xlsx: This workbook will take output from the sitara_pwrst.sh script and decodes the values into color coded tables which can quickly indicate whether specific peripherals or clocks are active on the device.

Download
Download the AM335x PRCM Tools here.

sitara_pwrst.sh
The sitara_pwrst.sh script accepts one command line argument for the name of the input file with the list of register names and addresses to be accessed. Since the input file is selectable at runtime, this script can be used to read any set of registers desired as long as the formatting is consistent with the requirements described in the AM335x_reglist.txt section. The script uses devmem2 to access the addresses specified in the input file. Note that there is no validation of the addresses, outputs or inputs, thus it is up to the user to check the addresses input to the script. The script also outputs a file based on the time at invocation of the script and the name of the evm that the script is running on. As the registers are being read, their names will be output to the console. An example invocation of sitara_pwrst.sh: root@am335x-evm:~# ./sitara_pwrst.sh AM335x_reglist.txt

AM335x_reglist.txt
The AM335x_reglist.txt file is simply a list of named registers and addresses. Register names and addresses are separated by a tab, and there is one register address pair per line. As mentioned before, the veracity of any register address and name is left up to the user. An excerpt of the first few lines of this file is below: PRM_PER_PM_PER_PWRSTST	0x44E00C08 PRM_WKUP_PM_WKUP_PWRSTST	0x44E00D08 PRM_MPU_PM_MPU_PWRSTST	0x44E00E04 PRM_DEV	0x44E00F00

am335x_prcm_viewer.xlsx
The PRCM viewer is a spreadsheet to make visualizing the data from a PRCM register dump easier. Output from the PRCM register dump is simply copied in its entirety from the .rd1 file output of sitara_pwrst.sh to the "Data" page of the workbook. The cells of the workbook are then populated with the status of all the power and clock domains of the AM335x. There is a summary page as well as individual pages to specify which clocks within each clock domain is active.

To get started with the prcm viewer:
 * 1) Copy the entirety of the contents of the PRCM register dump to be visualized
 * 2) Paste the data from the PRCM register dump into the Data page of the PRCM visualizer at cell A1.
 * 3) Review PRCM status on summary, and power domain pages.