spin − diagnostic reference pattern generator [[ -c count ] [ -v value ] -(r|w)(b|h|w) address ]+ [ -c count ] allows reference patterns to be generated for diagnostic use. A sequence of reads and/or writes of byte, halfword, or word width is specified by combinations of -r and -w flags. The -c and -v flags specify repetition counts and a value for writes that apply for all succeeding reads and writes. A final count specification indicates the number of times the entire proceeding pattern should be repeated. Count defaults to 1 and value defaults to 0. A negative count is interpreted as infinity.
spin -c 4 -rh 0x2 -c 2 -v 1 -wb 0x4 -c 10
Repeat the following 10 times:
Read the halfword at address 0x2 four times
Write 1 to the byte at address 0x4 two times