==== Introduction ==== This padconf subdirectory contains various files related to dumping padconf-related registers and then parsing those registers to decode a given device's pinmux configuration. This is a 2 step process: 1. The registers are saved as a *.rd1 file. There are two ways to do this: a. Linux command line using am57xx-padconf-rd1.sh. b. CCS+JTAG using am57xx-padconf.dss. 2. The *.rd1 file is parsed using the am57xx-padconf-decoder.py python script. ==== am57xx-padconf-rd1.sh ==== This is a shell script intended to be executed from a Linux command line on the AM57xx device. Note that under the hood, several other Linux commands are utilized: 1. date: This is for generating a unique file name. If your date/time are not correct you might want to set them before running this code. For example, you can run "ntpd -s" to set the time with NTP. You might need to update /etc/ntpd.conf or you might need to configure proxies for that to work if for example you are behind a firewall. 2. devmem2: This is used for reading from physical memory locations. 3. sed: This is used for formatting the output of devmem2. The generated output of this script should be a file with a name like this: am57xx-padconf_yyyy-mm-dd_hhmmss.rd1 The file itself consists of a header line identifying which device family it corresponds to (AM574x/AM572x/AM571x/AM570x) followed by all the data. The data is very simple, consisting of the register address followed by the data. Here is an example taken from a file: PadConf AM572x 0x4a003400 0x0005000f 0x4a003404 0x0005000f 0x4a003408 0x0005000f 0x4a00340c 0x0005000f 0x4a003410 0x0005000f 0x4a003414 0x0005000f ==== am57xx-padconf.dss ==== For AM57xx users that don't have Linux available, you can also use JTAG for dumping the registers in the appropriate *.rd1 file format. Please see the README in the root directory: http://git.ti.com/sitara-dss-files/am57xx-dss-files/blobs/master/README The resulting output will align with what was described for the bash script. ==== am57xx-padconf-decoder.py ==== This is a perl script that takes the *.rd1 file as an input, and produces a *.csv file as an output. It utilizes the xml files to decode the pinmuxing of the various registers. It can be run on your host PC or even on the target if Python is part of the OS image (which is the case if you are using the TI Linux Image). It can be run like this: ./am57xx-padconf-decoder.py am57xx-padconf_yyyy-mm-dd_hhmmss.rd1 It will correspondingly produce am57xx-padconf_yyyy-mm-dd_hhmmss.csv.