AnsweredAssumed Answered

关于IMX6ULL 用户空间操作寄存器 死机的情况

Question asked by dizhu yuan on Apr 2, 2020
Latest reply on Apr 24, 2020 by Wigros Sun

各位好!

   内核与交叉编译器 Linux version 4.1.15_2.1.0,gcc version 4.9.4 (Linaro GCC 4.9-2017.01)。

   在配置操作EIM总线和FPGA通信时,发现在用户空间使用/dev/mem访问总线地址会导致死机;

类似于:

# ./memtool -32 0x58000000 29
E
Reading 0x29 count starting at address 0x58000000

系统已经不响应了。

 

读GPIO寄存器

# ./memtool GPIO1.*
SOC: i.MX6ULL
GPIO1 Addr:0x209c000
vm_end = 0x76f0e000 vm_start = 0x76f0d000---------------
GPIO1.DR Addr:0x0209C000 Value:0x0008030E - The 32-bit GPIO_DR register stores data that is ready to be driven to the output lines.
GPIO1.DR.DR(0..31) :0x8030e
Data bits.

GPIO1.GDIR Addr:0x0209C004 Value:0x00000200 - GPIO_GDIR functions as direction control when the IOMUXC is in GPIO mode.
GPIO1.GDIR.GDIR(0..31) :0x200
GPIO direction bits.

GPIO1.PSR Addr:0x0209C008 Value:0x0008010E - GPIO_PSR is a read-only register.
GPIO1.PSR.PSR(0..31) :0x8010e
GPIO pad status bits (status bits).

GPIO1.ICR1 Addr:0x0209C00C Value:0x00000000 - GPIO_ICR1 contains 16 two-bit fields, where each field specifies the interrupt configuration for a different input signal.
GPIO1.ICR1.ICR0(0..1) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR1(2..3) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR2(4..5) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR3(6..7) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR4(8..9) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR5(10..11) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR6(12..13) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR7(14..15) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR8(16..17) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR9(18..19) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR10(20..21) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR11(22..23) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR12(24..25) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR13(26..27) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR14(28..29) :0x0
Interrupt configuration 1 fields.
GPIO1.ICR1.ICR15(30..31) :0x0
Interrupt configuration 1 fields.

GPIO1.ICR2 Addr:0x0209C010 Value:0x00000000 - GPIO_ICR2 contains 16 two-bit fields, where each field specifies the interrupt configuration for a different input signal.
GPIO1.ICR2.ICR16(0..1) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR17(2..3) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR18(4..5) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR19(6..7) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR20(8..9) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR21(10..11) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR22(12..13) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR23(14..15) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR24(16..17) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR25(18..19) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR26(20..21) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR27(22..23) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR28(24..25) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR29(26..27) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR30(28..29) :0x0
Interrupt configuration 2 fields.
GPIO1.ICR2.ICR31(30..31) :0x0
Interrupt configuration 2 fields.

GPIO1.IMR Addr:0x0209C014 Value:0x00000000 - GPIO_IMR contains masking bits for each interrupt line.
GPIO1.IMR.IMR(0..31) :0x0
Interrupt Mask bits.

GPIO1.ISR Addr:0x0209C018 Value:0xFFF7FEF1 - The GPIO_ISR functions as an interrupt status indicator.
GPIO1.ISR.ISR(0..31) :0xfff7fef1
Interrupt status bits - Bit n of this register is asserted (active high) when the active condition (as determined by the corresponding ICR bit) is detected on the GPIO input and is waiting for service.

GPIO1.EDGE_SEL Addr:0x0209C01C Value:0x00000000 - GPIO_EDGE_SEL may be used to override the ICR registers' configuration.
GPIO1.EDGE_SEL.GPIO_EDGE_SEL(0..31) :0x0
Edge select.

 

读EIM寄存器

# ./memtool EIM.*
SOC: i.MX6ULL
EIM Addr:0x21b8000

无响应了

 

使用memtool工具操作gpio寄存器确可以,读取EIM的寄存器确会出现系统无响应的情况,这个问题已经困扰我两天了,希望有遇到过的同仁可以帮忙解答下,谢谢。

Outcomes