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.

information memory write and read problem in msp430f5529

Other Parts Discussed in Thread: MSP430F5529

hi all

i am using msp430f5529 device

i am trying to write a word to location 0x1800.

after programming device contents at location 1800 is all ones, its write

now when i write first time something at location 1800 its works fine.

but after first write its not possible to write anything at same location again.

i am unable to understand problem. 

  • also BLKWRT bit in flash register dosent work

    if i kept BLKWRT bit = 1, WRT bit = 0 no any write is possible.

    if i kept WRT bit = 1,  BLKWRT bit = 0its possible to write char, int and long also.

     

  • After you "erased" a segment, all bits in that segment are "1".  "Write" (or "program") can only change "1" into "0". Once it is changed to "0", you cannot change it back to "0" with "write" (or "program") operation. You have to "erase" the entire segment to do that.

    About BLKWRT, you need to wait for busy bit to go away between the byte/word/long-words. And you cannot do that if you code is in the same bank of Flash. You can put your code in RAM to do the BLKWRT. (Or at least put the wait-for-not-busy part in RAM.)

  • thanks sir

    i want to write three long variables into information memory. 

    so to write single long variable need to erase whole segment, is it write?

    i done that, by taking first backup of remaining two variables and again writing all variables into information memory.

    thanks again

    if any alternative if you had please tell me.

    thanks again.

  • I do not know if you got it right or not.

    What boils down to is:

    If (a) some of the bits in the byte/word/long-word you are attempt to write are "1" and (b) some of the corresponding bits in the Flash are currently "0", then the result of your write will not succeed. Erase that segment will remove condition (b). But if (a) or (b) is not true, you do not need to erase.

    For example, currently location 0x1502 has 0xA5 and you want to write 0x81. (b) is not true and you do not need to erase.(But you could.)

     

  • ok sir,

    now i clear all these things.

    thanks sir

    but for modifying single byte e.g. 0x07 at location 0x1502 with 0x80 need to erase whole segment.

    is it not possible to erase only single location 0x1502 ?

    thanks again

     

  • nikhil n mane said:
    is it not possible to erase only single location 0x1502 ?

    No. Flash can only set individual bits from 1 to 0. For the reverse, the whole segment needs to be erased (= set to 1). THi sis why the MSP has two or more info memory segments which are smaller than the main flash segments.

    Random writes to individual bits are only possible with eeprom or FRAM memory, not with flash. That's how flash works.

**Attention** This is a public forum