Jump to content

Search the Community

Showing results for tags 'stackpointer'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 1 result

  1. While I was reading through the MSP430's User's guide, I came to know that its stack pointer is alligned to even address. (Read Pg.189 of http://www.ti.com/lit/ug/slau208m/slau208m.pdf) Question 1: Why is it so ? Why is the stack pointer alligned to even address? Using msp430-gcc, I wrote a C program which contained a global 'char'(8 bits) array and which will print on UART the address location of each array element. What I found was that each array element was at '+1' from the previous address i.e Address of a[0] is 2400 Address of a[1] is 2401 Address of a[2] is 2402 Address of a[3] is 2403 Question 2: Here I can see that all array element's are not alligned to even address i.e a[1], a[3] are at odd address. Arrays are stored in RAM and are accessed via stack pointer. How did the stack pointer store an odd address ? As per my understanding, each address location in RAM can store 16bits of data(since MSP430) irrespective of even or odd address location. If I write the same above program with 'int'(16 bits) instead of 'char'(8 bits), then I get the array address '+2' i.e Address of a[0] is 3400 Address of a[1] is 3402 Address of a[2] is 3404 Address of a[3] is 3406 Question 3: But my above experimentes showed that each address can store only 8 bits instead of 16. Why ?
  • Create New...