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.

Use of the various address bit masks in GPIO

Hello everyone, I have just started looking into the GPIO peripherals (in tm4c123 Launchpad) when I noticed that the bits in the GPIODATA register are masked by the address bits [9:2]. What is the utility of such an implementation over an implementation in which all the bits are freely accessible? Is there any improvement in speed if access is done in such a manner? 

Also, what is the typical number of clock cycles taken for a normal read/write operation on a register?

Thanking You,

Harsha

  • Harshavardhan Murali said:
    noticed that the bits in the GPIODATA register are masked by the address bits [9:2]. What is the utility of such an implementation

    You're describing, "Bit-Banding" are you not?    The absence of that term - and the nature of your question - seem to indicate higher focus upon the Register Listings than good read/consideration of the descriptive portion of the MCU manual.    Great detail resides therein - best results stem from good read of (both) MCU Registers (as you appear to have done) AND the narrative w/in the pertinent chapter of the MCU manual.

    Devices without this "bit-banding" must execute a, "Read before Write" so that "non-targeted" bits are not negatively impacted by such writes.    Thus - through the elimination of that requirement - the write may be said to have been speeded.

    I know the answer for your clock cycle question - but if that's of such interest - is it not better for you to invest time/effort in that discovery?     Key to much of MCU application & development success is, "Knowing how & where to find" critical/sought tech. information.    I won't deny you that pleasure...

  • Hello cb1,

    And definite lack of search with the exact search phrase on the forum would give more treasures.

    e2e.ti.com/.../314176

    Regards
    Amit
  • Hi Amit,

    You, I, many others - "Search & succeed."    Busy, curious (important - yet not too industrious) posters - sometimes not so much...