我试图访问我的嵌入式主板ULPI收发器芯片的一些寄存器。 我发现,我对专用芯片读取操作中产生零。 我能够访问它上面的内存区域没有任何问题。
到这些区域之间的唯一区别是,第一区域(I可以读取)具有其中作为第二区域(我不能读)具有8个地址的32个地址。
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核互连ULPI PHY侧寄存器访问:ULPI寄存器字节大小,并且只能在这个大小被访问。 尝试使用任何其他数据大小(16位或32位)将完成没有错误(或任何其它警告)来访问它们超过L4核互连,但将导致未定义的行为。 下列情况下可能会导致问题:
- 如果ULPI寄存器内容由软件定义为静态(非挥发性),高速缓存更新可能导致突发的32位访问,具有不希望的后果。
- 有些寄存器具有相邻的覆盖,设置和清除地址。 一个超大的写访问可能清除并设置相同的位,这可能有几个结果。
- 有些寄存器读取时清零:超大的读访问,相邻的存储位置可能会导致不必要的清零。
表20-109。 USBTLL寄存器映射摘要(L4核心互联寄存器空间)
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
我很感激你的答复。