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.

Storing data on MSP430F5342's FLASH Program Memory

Other Parts Discussed in Thread: MSP430F5342

Hey there,

I'm about to start developing a product using MSP430F5342, first time developing with a TI MCU so

I'm sorry in advance if the question is stupid...

I want to make sure whether it's possible to use parts of the flash memory for the main program storage and execution and the rest of it for data logging.

For example, the MCU's FLASH memory size is 128kbytes and I want to use 40kbytes for the program storage and execution and the rest 88kbytes for data logging that will be stored and read by the program that runs from the same FLASH memory (not the RAM as I saw in some other questions).

1) Can I use the FLASH memory like I just described?

2) Are there any limitations or problems that I should know about in advance? (like memory blocks limitations etc)

Thank you very much for your help,

Nir

  • There is no problem with logging to flash area. If you don't wont to have any interference between executing main program and changing flash contest, just copy main program to RAM and execute it from RAM. Don't know what is your logging data packet size and requested speed, but best option is to buffer received data to RAM, and when the full size of block is reached (256 bytes),  store it on flash (200 KB/s).

  • Nir Klein said:
    I'm sorry in advance if the question is stupid...

    Question is good. Thou it is discussed here multiple times, you can find it using forum search.

    Nir Klein said:
    1) Can I use the FLASH memory like I just described?

    Sure!

    Nir Klein said:
    2) Are there any limitations or problems that I should know about in advance? (like memory blocks limitations etc)

    Yes. Flash endurance is limited and as you already say flash have blocks which is minimum unit of flash that can be erased. Flash erase takes some time so your data logging application shall be aware of that, maybe doing erase ahead of time.

**Attention** This is a public forum