Basic question about memory addresses in MSP430

Discussion in 'Embedded Systems and Microcontrollers' started by user7787, Feb 12, 2014.

  1. user7787

    Thread Starter New Member

    Feb 12, 2014
    Hello all,

    This is my first post, and I am enthusiastic about getting started here! I have a noob question about memory addressing in the MSP430: In the manual MSP430 programming guide that I am studying, on page 25 it tells me that "The
    end address for Flash/ROM is 0x0FFFF for devices with less that 60KB of Flash/ROM." This has me confused, since 0x0FFFF is 65535 in decimal, which exceeds the 60,000 byte limit that the memory supposedly has. How come, then, do the addresses go all the way past 65,000? Are some byte addresses simply not used?
    Here is a link to the document that I am reading:

    Thanks guys,

  2. t06afre

    AAC Fanatic!

    May 11, 2009
    It uses a 16bit address bus (MAB) So theoretically you can address 2^16 locations. But how the address space is used or organized is up to Texas Instruments. They do not have to use the full address space to addressable memory locations.
  3. MrChips


    Oct 2, 2009
    The 64K addressing space is also used by SRAM, I/O devices as well as flash memory.
  4. Papabravo


    Feb 24, 2006
    In your case you can see from the memory map on page 25 that the end WORD address is specified as 0xFFFF. The beginning address of the FLASH/ROM is not specified. For a device with 60K WORDS(aka 120K BYTES), the beginning address would have a WORD address of 0x1000. The space from WORD address 0x0000 to WORD address 0x0FFF occupies 4K WORDS. If you're counting BYTES instead of WORDS shift each number left by one position.

    WORD --> BYTE
    0xFFFF --> 0x1FFFF
    0x1000 --> 0x02000
  5. WBahn


    Mar 31, 2012
    I'm not seeing it that way. It specifies that the memory is byte-addressable, with code always being placed at even addresses.

    This is the way I read the table (and could well be wrong).

    A particular device as a certain amount of Flash/ROM memory and this memory is always located in a contiguous portion of the address space. That memory space ALWAYS includes addresses 0x0FFE0 through 0x0FFFF; these 32 addresses are reserved for the Interrupt Vector Table (IVT) which consists of sixteen 16-bit entries.

    For "small" Flash/ROM configurations (i.e., 60KB and under), the remainder of the Flash/ROM memory is located immediately below the IVT. If the Flash/ROM is larger than 60KB, then the amount over 60KB is located immediately above the IVT.