This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

What is difference between system control registers located in different memory area?

Other Parts Discussed in Thread: TM4C129XNCZAD

Hi, 

There seems many registers over multiple memory region. 

Some GPIO configurations can be done by setting registers which are located in peripheral region(0x40000000~0x5FFFFFFF) while some GPIO configurations

can be done by setting registers which are located in System region(0xF0003800~ ).

What I meant is, for example, I can see  GPIO registers (PORTK) 0x40061000 in tm4c129xnczad.h and 0xF0000809 in sysctl.h

Both of them are referring to different memory addresses. 

I don't know what difference and it confuses me.

Can anyone please explain it to me?

  • Hello Jinyoung.

    The value 0xF0000809 mentioned in the sysctl.h is the parameter to be used when configuring the enable, disable, reset, ready, etc for a peripheral. As an example 0xF0000809 is for SYSCTL_PERIPH_GPIOK which can be used in SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOK) to enable clock to GPIO Port K and that will allow access to the address 0x40061000

    Regards
    Amit
  • Thanks Amit,

    Let me ask one more thing. Will an access to the address 0x40061000(GPIO Port K) cause a problem when SysCtlPerpheralEnable(SYSCTL_PERIPH_GPIOK) is not used to enable before ?
    Because I could find some examples that only use SYSCTL_RCGCGPIO_R to enable to GPIO port.
    For example, SYSCTL_RCGCGPIO_R = SYSCTL_RCGCGPIO_R9 ; but SysCtlPerpheralEnable(SYSCTL_PERIPH_GPIOK) is not used in this example.

    Jinyoung
  • Hello Jinyoung.

    Yes, it will cause a problem since if the peripheral is not enabled when the address space is accessed the CPU transaction will result in a Bus Fault. The SYSCTL_RCGCGPIO_R to enable does the same thing as SysCtlPeripheralEnable. The former method is called DRM which is something we will be phasing out due to its poor readability.

    Regards
    Amit