打算用汇编初始化 XINTF
原来用的C代码功能已经实现
EALLOW;
*(unsigned long *)0x0B20 = 0x0043FFFF; /* Zone0 */
*(unsigned long *)0x0B2C = 0x0043FFFF; /* Zone6 */
*(unsigned long *)0x0B2E = 0x0043FFFF; /* Zone7 */
*(unsigned long *)0X0B34 = 0X00010D14;
*(unsigned long *)0X0B38 = 0X0000003F;
*(unsigned long *)0X0B3A = 0X00000005;
*(unsigned long volatile *)0x6F96 = 0xFFFFFFF5; /* GPBMUX1 */
*(unsigned long volatile *)0x6f88 = 0xFF000000; /* GPAMUX2 */
*(unsigned long volatile *)0x6FA8 = 0x0000AAAA; /* GPCMUX2 */
*(unsigned long volatile *)0x6FA6 = 0xAAAAAAAA; /* GPCMUX1 */
EDIS;
汇编代码是从 Disassembly copy过来的,
EALLOW
MOV @AL, #0xffff
MOVB AH, #0x43
MOVL XAR4, #0x000b20
MOVL *+XAR4[0], ACC
MOVL XAR4, #0x000b2c
MOVL *+XAR4[0], ACC
MOVL XAR4, #0x000b2e
MOVL *+XAR4[0], ACC
MOVL XAR5, #0x010d14
MOVL XAR4, #0x000b34
MOVL *+XAR4[0], XAR5
MOVL XAR4, #0x000b38
MOVB ACC, #63
MOVL *+XAR4[0], ACC
MOVL XAR4, #0x000b3a
MOVB ACC, #5
MOVL *+XAR4[0], ACC
MOVL XAR4, #0x006f96
MOVB ACC, #0
SUBB ACC, #11
MOVL *+XAR4[0], ACC
SETC SXM
MOVL XAR4, #0x006f88
MOV ACC, #0xfe00 << 15
MOVL *+XAR4[0], ACC
MOVL XAR4, #0x006fa8
MOVL XAR5, #0x00aaaa
MOVL *+XAR4[0], XAR5
MOV @AL, #0xaaaa
MOV @AH, #0xaaaa
MOVL XAR4, #0x006fa6
MOVL *+XAR4[0], ACC
EDIS
发现后面4句,也就是有volatile 修饰的GPIO寄存器无法写入,请各位大神帮忙分析一下
Susan Yang:很抱歉,我对汇编不太熟悉。我会将您的帖子发至在E2E英文论坛,请您关注一下
打算用汇编初始化 XINTF
原来用的C代码功能已经实现
EALLOW;
*(unsigned long *)0x0B20 = 0x0043FFFF; /* Zone0 */
*(unsigned long *)0x0B2C = 0x0043FFFF; /* Zone6 */
*(unsigned long *)0x0B2E = 0x0043FFFF; /* Zone7 */
*(unsigned long *)0X0B34 = 0X00010D14;
*(unsigned long *)0X0B38 = 0X0000003F;
*(unsigned long *)0X0B3A = 0X00000005;
*(unsigned long volatile *)0x6F96 = 0xFFFFFFF5; /* GPBMUX1 */
*(unsigned long volatile *)0x6f88 = 0xFF000000; /* GPAMUX2 */
*(unsigned long volatile *)0x6FA8 = 0x0000AAAA; /* GPCMUX2 */
*(unsigned long volatile *)0x6FA6 = 0xAAAAAAAA; /* GPCMUX1 */
EDIS;
汇编代码是从 Disassembly copy过来的,
EALLOW
MOV @AL, #0xffff
MOVB AH, #0x43
MOVL XAR4, #0x000b20
MOVL *+XAR4[0], ACC
MOVL XAR4, #0x000b2c
MOVL *+XAR4[0], ACC
MOVL XAR4, #0x000b2e
MOVL *+XAR4[0], ACC
MOVL XAR5, #0x010d14
MOVL XAR4, #0x000b34
MOVL *+XAR4[0], XAR5
MOVL XAR4, #0x000b38
MOVB ACC, #63
MOVL *+XAR4[0], ACC
MOVL XAR4, #0x000b3a
MOVB ACC, #5
MOVL *+XAR4[0], ACC
MOVL XAR4, #0x006f96
MOVB ACC, #0
SUBB ACC, #11
MOVL *+XAR4[0], ACC
SETC SXM
MOVL XAR4, #0x006f88
MOV ACC, #0xfe00 << 15
MOVL *+XAR4[0], ACC
MOVL XAR4, #0x006fa8
MOVL XAR5, #0x00aaaa
MOVL *+XAR4[0], XAR5
MOV @AL, #0xaaaa
MOV @AH, #0xaaaa
MOVL XAR4, #0x006fa6
MOVL *+XAR4[0], ACC
EDIS
发现后面4句,也就是有volatile 修饰的GPIO寄存器无法写入,请各位大神帮忙分析一下
Susan Yang:请跟踪此链接的回复,若是我表述有误,请您补充
e2e.ti.com/…/791927