我正在尝试访问嵌入式主板上的ULPI收发器芯片的一些寄存器。 我发现我对特定芯片的读操作导致零。我可以访问它上面的内存区域,没有任何问题。
这些区域之间的唯一区别是第一个区域(我可以读取)有32位地址,而第二个区域(我无法读取)有8位地址。
root@FX7500000000:/tmp# ./devmem 0x48062000 //this is 32 bit address range and I am able to read.
/dev/mem opened.
Memory mapped at address 0x40023000.
Value at address 0x48062000 (0x40023000): 0x15
root@FX7500000000:/tmp# ./devmem 0x48062010
/dev/mem opened.
Memory mapped at address 0x40023000.
Value at address 0x48062010 (0x40023010): 0x115
root@FX7500000000:/tmp# ./devmem 0x48062014
/dev/mem opened.
Memory mapped at address 0x40023000.
Value at address 0x48062014 (0x40023014): 0x1
root@FX7500000000:/tmp# ./devmem 0x48062018
/dev/mem opened.
Memory mapped at address 0x40023000.
Value at address 0x48062018 (0x40023018): 0x4
root@FX7500000000:/tmp# ./devmem 0x4806201c
/dev/mem opened.
Memory mapped at address 0x40023000.
Value at address 0x4806201C (0x4002301c): 0x0
root@FX7500000000:/tmp# ./devmem 0x4806203c
/dev/mem opened.
Memory mapped at address 0x40023000.
Value at address 0x4806203C (0x4002303c): 0x0
root@FX7500000000:/tmp# ./devmem 0x48062030
/dev/mem opened.
Memory mapped at address 0x40023000.
Value at address 0x48062030 (0x40023030): 0x64
root@FX7500000000:/tmp# ./devmem 0x48062040
/dev/mem opened.
Memory mapped at address 0x40023000.
**Value at address 0x48062040 (0x40023040): 0x6D8** //I am find until here.
root@FX7500000000:/tmp# ./devmem 0x48062800
/dev/mem opened.
Memory mapped at address 0x40023000.
Value at address 0x48062800 (0x40023800): 0x0
root@FX7500000000:/tmp# ./devmem 0x48062800 b // I also specified I need to read a byte value
/dev/mem opened.
**Memory mapped at address 0x40023000.
Value at address 0x48062800 (0x40023800): 0x0**
我尝试了不同的读取操作,即从内核空间读取,但结果是一样的吗? 我需要这个区域特别的东西吗?我阅读了技术参考手册,但没有任何具体的弹出窗口清楚。
http://www.ti.com/litv/pdf/sprugr0b
以下是TRM手册的相关部分。
小心 通过L4-Core互连对ULPI PHY端寄存器进行访问: ULPI寄存器是字节大小的,只能以此大小访问。尝试 使用任何其他数据大小(16或者)通过L4-Core互连访问它们 32位)将完成而不会出现错误(或任何其他警告),但会导致 未定义的行为。 以下情况可能会导致问题:
Register Width
Register Name Type (Bits) Address Offset Physical Address Section
USBTLL_REVISION R 32 0x0000 0000 0x4806 2000 Section 20.2.6.4.1
USBTLL_SYSCONFIG RW 32 0x0000 0010 0x4806 2010 Section 20.2.6.4.2
USBTLL_SYSSTATUS R 32 0x0000 0014 0x4806 2014 Section 20.2.6.4.3
USBTLL_IRQSTATUS RW 32 0x0000 0018 0x4806 2018 Section 20.2.6.4.4
USBTLL_IRQENABLE RW 32 0x0000 001C 0x4806 201C Section 20.2.6.4.5
TLL_SHARED_CONF RW 32 0x0000 0030 0x4806 2030 Section 20.2.6.4.6
TLL_CHANNEL_CONF_i (1) RW 32 0x0000 0040 + 0x4806 2040 + Section 20.2.6.4.7
(0x04 x I) (0x04 x I)
ULPI_VENDOR_ID_LO_i (1) R 8 0x0000 0800 + 0x4806 2800 + Section 20.2.6.4.8
(0x100 x I) (0x100 x I)
ULPI_VENDOR_ID_HI_i (1) R 8 0x0000 0001 + 0x4806 2801 + Section 20.2.6.4.9
(0x100 x I) (0x100 x I)
ULPI_PRODUCT_ID_LO_i (1) R 8 0x0000 0002 + 0x4806 2802 + Section
(0x100 x I) (0x100 x I) 20.2.6.4.10
ULPI_PRODUCT_ID_HI_i (1) R 8 0x0000 0003 + 0x4806 2803 + Section
(0x100 x I) (0x100 x I) 20.2.6.4.11
ULPI_FUNCTION_CTRL_i (1) RW 8 0x0000 0004 + 0x4806 2804 + Section
(0x100 x I) (0x100 x I) 20.2.6.4.12
ULPI_FUNCTION_CTRL_SET_i (1) RW 8 0x0000 0005 + 0x4806 2805 + Section
(0x100 x I) (0x100 x I) 20.2.6.4.13
ULPI_FUNCTION_CTRL_CLR_i (1) RW 8 0x0000 0006 + 0x4806 2806 + Section
(0x100 x I) (0x100 x I) 20.2.6.4.14
ULPI_INTERFACE_CTRL_i (1) RW 8 0x0000 0007 + 0x4806 2807 + Section
(0x100 x I) (0x100 x I) 20.2.6.4.15
ULPI_INTERFACE_CTRL_SET_i (1) RW 8 0x0000 0008 + 0x4806 2808 + Section
(0x100 x I) (0x100 x I) 20.2.6.4.16
感谢您的回复。