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.

MSPM0L1228: Flash erase in context of porting a zephyr based ARM Firmware

Part Number: MSPM0L1228

I feel silly for asking because the answer must be obvious:

I am tasked with writing a migration guide for zephyr based ARM Firmware towards TI microcontrollers.

 

Do I need to erase a flash sector (1KB) before writing?

Our current controller from a different manufacturer requires a page (2KB) erase before writting random data.

 

The TI controller seams to allow write of random data without explictly erasing the memory first?

Can we during porting just disable the flash_erase calls?

 

www.ti.com/.../slau847e.pdf chapter 6 seams to be what I am looking for.

  • Hi Michael,

    Erasing before programming is required in most cases. It should also be noted that memory is also dynamically write protected automatically after flash operations. The general programming flow is as follows:

    1. Unprotect 
    2. Erase
    3. Unprotect
    4. Program

    1Kb of flash is the smallest erase resolution, but programming is 8bytes (but can also be configured to 1byte resolution). After erasing one sector, you can write to any flash word sized region once before needing to erase again.

    One last note is it is possible to reprogram the same flash word without erasing, but only when converting 1s to 0s. you cannot convert 0s to 1s without erasing again.

    Best Regards,
    Brian