shell脚本测试同一寄存器下配置不同数值配置的测试
##!/bin/sh
reg_value=0
check_reg=`devmem 0x10081000`
while [ $reg_value -lt 252 ]
do
echo "Current Tx_Reg_Value is ${reg_value}"
devmem 0x10081000 32 $(($reg_value))
devmem 0x10081000
#echo "Tx reg value is $check_reg"
devmem 0x10081000 32 0xa
sleep 2m
devmem 0x10081000 32 0xb
sleep 2m
devmem 0x10081000 32 0xc
sleep 2m
devmem 0x10081000 32 0xd
echo "Current test over"
let reg_value+=1
echo "Next reg_value is ${reg_value}"
done
shell脚本编写测试过程中,不仅限于使用循环体while,for 都可以,但是使用者会发现不同的写法,会在不同版本的shell中执行遇到不同的问题,典型的Bash&Cshell会出现不同的报错,这里不做深究!
针对不同的寄存器地址做同一赋值操作
#!/bin/sh
base=0xa0001000
for((i=0;i<1024;i+=4))
do
echo "iterae = $i"
devmem $(($base + $i)) 32 0
done
这里参考博主:https://blog.csdn.net/Deep_win/article/details/100534618
标签:shell,32,0x10081000,value,数值,寄存器,devmem,reg From: https://www.cnblogs.com/huhuhusanling/p/16888018.html