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.

How many bits a regular Flash memory register contains?

Other Parts Discussed in Thread: MSP430F5438A

How many bits a regular Flash register contains?

How many bits a regular RAM register contains?

What is the maximum length of an instruction word?

What is the pointer variable size? Shouldn't it be 32bit to cover all the memory space of 256K?

I am asking for MSP430F5438A uC, IDE - IAR Embedded Workbench.

Thank you in advance!

  • >What is the pointer variable size? Shouldn't it be 32bit to cover all the memory space of 256K?

    Depends on what memory model you choose. IAR has small, medium, and large. In small, pointers are 16 bits. In large they are 32 bits. I forget the rules on medium, but the information is in the IAR manuals.

    >How many bits a regular RAM register contains?
    Depends on the register. Some are 8-bits, some are 16-bits.
  • The older MSP families have a 16 bit address and 16 bit data bus. Newer MSPs have a 20 bit address bus. The MSP can access all components attached to this address/data bus in byte increments for 8 bit access and with A0 fixed to 0 for word access. dword (long) access is carried out as two 16 bit operations.
    Some modules do not supper word address. So reading the (relative) addresses 0 and 1 byte-wise gives a different result than reading address 0 as a word. Some registers allow both, some allow both but behave differently (e.g. the 'password' part of some module registers has a different behavior when accessed individually as byte or written as MSB of a word write. And some only allow 16 bit access (like the DMA registers). A byte write there would write to the byte with A0=0 and write 0 to the next higher byte.

    Instruction words can range from 1 word (push or pull a register or add two registers) to 4 words (extended instruction with source and destination in memory)

    Pointer size depends on selected memory model. function pointers can be 16 or 20(32) bits for small or large code model.
    Data pointers can be 16 or 20(32) bit for small or large data model. Note that for large data model, all register saves on stack are 32 bit and take twice as long. Including ISRs.
    Also, you can't mix the different memory models, since all code in a project needs to know how to save and restore registers and call functions.

    independent of the code model, ISRs can only reside in lower 64k of memory, as the vector table entries are 16 bit only.

**Attention** This is a public forum