1800调试记录

编程入门 行业动态 更新时间:2024-10-20 09:26:00

1800调试记录

1800调试记录

1、需要配置1800寄存器:
## 格式:w, Addr,  Data

##clk, 100000         #config the clk speed 400khz is 400000 
##addrbits,10          #7: 7bit ,10: 10bit
##slvaddr,0x9        #addrmod 0 : 0x58 ,addrmod 1 : 0x3d8

##clk, 10             #config the clk to 6Mhz

w, 0x158 + 0x20[18],0x88000000

w, 0xFF1000 + 0x10[12],0x1e1557a8
w, 0xFF1008 + 0x10[12],0x6a1b6400
w, 0xFF8028 + 0x100[48],0x00007800
w, 0xFF802C + 0x100[48],0x0004071f

w, 0xFF8034 + 0x100[48],0x9c422220
w, 0xFF8030 + 0x100[48],0x45400090

## 复位所有SerDes
w,0xF20300,0xbfffffff
#sleep,1000
w,0xF20300,0x8003ffff

当速率小于5G时为了改善链路性能需要禁止IDLE2
When operating at lane speeds of 5 Gbaud or less, IDLE2 operation should be disabled in order to improve link performance,
as displayed in Table 7

2、1800先启动,然后手动加载飞腾CPU驱动


3、16位destid使用高8位destid(domain阈值id)匹配domain路由表,如果对应的domain路由表项的端口值是对应端口值(0x0-0x11 )则路由到对应端口,如果是0xDD则使用低8位destid匹配device路由表,然后由device路由表路由到对应端口。如果是0xDF丢弃,0xDE使用默认路由。

4、Tsi721驱动必须安装rio-scan.ko san=1,否则Tsi721端未初始化,但是如果扫描到设备是NRS1800时不能像1848cps那样初始化路由

insmod tsi721_mport.ko dbg_level=0xffff (设置dbg_level参数打印调试信息)
insmod rionet.ko (如果不加载该驱动会导致内核打印异常)
5、Tsi721驱动安装步骤
insmod rapidio.ko hdid=0x1a
insmod tsi721_mport.ko dbg_level=0xffff
insmod rio_cm.ko
insmod rio_mport_cdev.ko
insmod rio-scan.ko  scan=1


5、Tsi721dma数据发送测试程序命令:
-M Tsi721端口号
-D 发送目的设备ID
-A 发送目的设备地址
-S 发送数据长度
-d 打印调试信息
-v 不做数据比较
./rio_test_dma -M 0 -D 0x1b -A 0xa0000000 -O 0 -S 0x100  -d -v


6、Tsi721dma数据接收测试程序命令:
-M Tsi721端口号
-D 发送目的设备ID
-R 对端设备发送到接收设备的目的地址,即接收设备接收数据的地址
-I 接收数据缓冲区长度,如果参数-i 默认接收数据长度为2*1024*1024
-d 打印调试信息
-v 不做数据比较
./rio_test_dma -M 0 -D 0x1b -i  -v -d -R 0x0

7、门铃包发送
-M Tsi721端口号
-D 发送目的设备ID
-I 16位门铃数据值
./rio_test_db -M 0 -D 0x1b -I 0x01

复位Tsi721端口步骤
a、复位端口第一步需要关闭端口
RapidIO Port Control CSR.PORT_LOCKOUT
./rio_test_misc -M 0 -O 0x15c -V 0xd0600003 -w
RapidIO Port Control CSR.PORT_DIS
./rio_test_misc -M 0 -O 0x15c -V 0xd0e00003 -w
RapidIO PLM Port Event Status Register.DLT
./rio_test_misc -M 0 -O 0x10090
RapidIO Port Error and Status CSR.OUTPUT_FAIL
./rio_test_misc -M 0 -O 0x158 

b、复位端口第二步需要使能端口
1. Set Device Control Register.SR_RST_MODE to the desired reset mode.
./rio_test_misc -M 0 -O 0x48004 -V 0x00010406 -w
2. Hold the port in reset by setting RapidIO PLM Port Implementation Specific Control Register.SOFT_RST_PORT.
./rio_test_misc -M 0 -O 0x10080 -V 0x02000000 -w
3. Clear the control or status bit that disabled the port (see Methods of Disabling the S-RIO Port).
./rio_test_misc -M 0 -O 0x15c -V 0xd0600001 -w
./rio_test_misc -M 0 -O 0x10090  -V 0x10000000 -w
./rio_test_misc -M 0 -O 0x158  -V 0x00000201 -w
4. Remove the port reset by clearing RapidIO PLM Port Implementation Specific Control Register.SOFT_RST_PORT.
./rio_test_misc -M 0 -O 0x10080 -V 0x00000000 -w
5. ackID Synchronization may be required.

更多推荐

1800调试记录

本文发布于:2024-02-06 14:55:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1749820.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!