4493 views|6 replies

86

Posts

0

Resources
The OP

What is the meaning of each field in S3C2440A_IOPORT_REG? [Copy link]

  1. typedef struct { UINT32 GPACON; // Port A - offset 0 UINT32 GPADAT; // Data UINT32 PAD1[2]; UINT32 GPBCON; // Port B - offset 0x10 UINT32 GPBDAT; // Data UINT32 GPBUP; // Pull -up disable UINT32 PAD2; UINT32 GPCCON; // Port C - offset 0x20 UINT32 GPCDAT; // Data UINT32 GPCUP; // Pull-up disable UINT32 PAD3; UINT32 GPDCON; // Port D - offset 0x30 UINT32 GPDDAT; // Data UINT32 GPDUP; // Pull-up disable UINT32 PAD4; UINT32 GPECON; // Port E - offset 0x40 UINT32 GPEDAT; // Data UINT32 GPEUP; // Pull-up disable UINT32 PAD5; UINT32 GPFCON; // Port F - offset 0x50 UINT32 GPFDAT; UINT32 GPFUP; UINT32 PAD6; UINT32 GPGCON; // Port G - offset 0x60 UINT32 GPGDAT; UINT32 GPGUP; // misc control reg - offset 0x80 UINT32 DCLKCON; // DCLK0/1 control reg UINT32 EXTINT0; // external interrupt control reg 0 UINT32 EXTINT1; // external interrupt control reg 1 UINT32 EXTINT2; // external interrupt control reg 2 UINT32 EINTFLT0 ; // reserved UINT32 EINTFLT1; // reserved UINT32 EINTFLT2; // external interrupt filter reg 2 UINT32 EINTFLT3; // external interrupt filter reg 3 UINT32 EINTMASK; // external interrupt mask reg UINT32 EINTPEND; // external interrupt pending reg UINT32 GSTATUS0 ; // external pin status UINT32 GSTATUS1; // chip ID UINT32 GSTATUS2; // reset status UINT32 GSTATUS3; // inform register UINT32 GSTATUS4; // inform register UINT32 FLTOUT; // C0 - added by simon UINT32 DSC0; UINT32 DSC1; UINT32 MSLCON; UINT32 GPJCON; // D0 UINT32 GPJDAT; UINT32 GPJUP; UINT32 PDA9; } S3C2440A_IOPORT_REG, *PS3C2440A_IOPORT_REG; //-------------------------- -------------------------------------------------- ----
复制代码
For example, there are two sentences when initializing the debugging serial port:
  1. CLRREG32(&pIOPortReg->GPHCON, (3 << 8)|(3 << 10)); SETREG32(&pIOPortReg->GPHCON, (2 << 8)|(2 << 10));
复制代码
What does each bit of the 32-bit field GPHCON mean here? What does this setting mean?
This post is from Embedded System

Latest reply

Well, that's the situation  Details Published on 2008-11-27 18:34

72

Posts

0

Resources
2
C/C++ code CLRREG32(&pIOPortReg->GPHCON, (3 << 8)|(3 << 10)); SETREG32(&pIOPortReg->GPHCON, (2 << 8)|(2 << 10)); here What does each bit of the 32-bit field GPHCON mean? What does this setting mean? ------------------Bit operations in C language. It seems that you need to take a closer look at C language. You can assign values directly, but this is not clear enough. Using bit operations, it is obvious which bit of the register has been operated on.
This post is from Embedded System

69

Posts

0

Resources
3
As long as you look at the program carefully, you will find that it is written ingeniously. ——The storage method of the structure is closely related to the register address of 2440 and cooperates closely.
This post is from Embedded System

76

Posts

0

Resources
4
I know that this is a bit operation, and I also read the definition of the CLRREG32 macro. I want to understand how the GPHCON in the structure corresponds to the port it operates. Why can the serial port be initialized by assigning values to these bits? I just want to understand how to set the 32-bit variable GPHCON to the serial port.
This post is from Embedded System

58

Posts

0

Resources
5
Find the detailed definition on the S3C2440 datasheet.
This post is from Embedded System

63

Posts

0

Resources
6
Quoting the reply from kaios1 on the 4th floor: Find the detailed definition and conclusion in the datasheet of S3C2440
Haha, the 2440 manual is too concise, and sometimes it takes a long time to find the answer.
This post is from Embedded System

63

Posts

0

Resources
7
Well, that's the situation
This post is from Embedded System

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

    EEWorld
    subscription
    account

    EEWorld
    service
    account

    Automotive
    development
    circle

    Robot
    development
    community

    Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
    快速回复 返回顶部 Return list