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.

MSP432P401R: Flash Erase Multiple Writes

Part Number: MSP432P401R


Hello Team,

Can you take a look at the following question I received from a customer?

"How many times can I write to the same flash address per erase operation.  (erase is by sectors)

The flash can be written in as…

Can I write to a location multiple times per erase.  Say can I write to a byte 8 times or a word 32x.

  • Erased = 0xFF
  • Write #1 = 0x7F
  • Write #2 = 0x3F
  • Write #7 = 0x01
  • Write #8 = 0x00

On the question regarding writing to “say byte” or “minimum write word size”, multiple times, we have a special algorithm that for your purpose, blows a bit from “1” to “0”.  So a byte, can be written up to 8 times and a word can be written up to 32 times to “blow” a bit from “1” to “0”.  Some micro-controller’s flash memory is not capable of doing that , and some is capable.

 

Can you please find out if this is possible on this CPU.

"

Please let me know if any further clarification is needed.

Best Regards,

Jacob Butler

  • Hi Jacob,

    The answer to this question isn't straightforward. Unlike the MSP430 devices which provide a maximum cumulative programming time between erases in the datasheet, I couldn't find that type of information in the MSP432 datasheet or TRM. I did find an interesting parameter in Table 5-47 in the datasheet though called NMAX_PGM which is the maximum number of pulses to complete program operation. This seems to vary across devices, so this value is stored in the TLV data.

    Regardless, I want to stress how important it is to use the DriverLib APIs. Due to the complexity of the flash controller on the MSP432, simple operations such as erases and programs require a high degree of software overhead and special configuration. Driver Library for MSP430 (referred to as DriverLib in this document) provides a versatile array of functions to fully use all of the advanced features of the flash controller. The DriverLib APIs provide a robust front-end that greatly simplifies the user experience and removes the need for the programmer to worry about mundane requirements such as multipulse programming, bit masking, and dynamically changing flash bank read modes. All of these requirements are handled automatically in the software layer and provided to users in a packaged and optimized library.

    You can find more details in the Flash Operations on MSP432 MCUs application note and the MSP432 Driver Library MSP432P4xx Users Guide (specifically Chapter 8).

    Regards,

    James

**Attention** This is a public forum