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