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.

About GPIO_PORTF_DATA_R

Hi,

I noticed that "GPIO_PORTX_DATA_R"  are used to set or clear corresponding Pin, which defined as :

#define GPIO_PORTX_DATA_R       (*((volatile uint32_t *)0x400xx3FC))  in " tm4c123XXX.h" file. Meanwhile I cann't find the same define in "inc/hw_gpio.h" head file.

I can find any description about GPIO_PORTX_DATA_R registern in datasheet.

Would you please tell me where i can find the detail description for this register?

Thank a lot.

 

  • Please review the GPIODATA register in there data sheet:

    In order to write to GPIODATA, the corresponding bits in the mask, resulting from the address bus bits [9:2], must be set. Otherwise, the bit values remain unchanged by the write. 

    Similarly, the values read from this register are determined for each bit by the mask bit derived from the address used to access the data register, bits [9:2]. 

    So the GPIO data register is really a range of registers from offset 0x0 to 0x3fc.  GPIODATA @ xxxx.x3fc will have all 8 bits set in the mask.

    --Miles