Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: MSP432 - Trying to Erase the Sector 0 Bank 0 before Writing to it but CPU gets halted somewhere.

$
0
0
Hello Prem, The flash controller for MSP432 is somewhat complex in that it requires multiple pulses, changing read modes, and potential bit masking for each erase operation. There are also some restrictions of programming/erasing out of the same bank that you are executing which add to this complexity. Applying only one erase pulse as in the case of your code is no guarantee that the erase will occur successfully. For this reason, it is highly recommended that you use the ROM_FlashCtl_eraseSector and ROM_FlashCtl_performMassErase functions which are included in ROM code in every device. These APIs have been verified, validated, and take care of all of the requirements set forth in the technical reference manual. Furthermore, as they are located in ROM, there is very little code space overhead that is introduced. The peripheral driver library can be found at the following URL: If you are still wanting to write your own flash driver, I would recommend taking a look at section 8.3 of the MSP432 Technical Reference Manual. This section describes in detail the programming flow of writing your own flash driver. Additionally the DriverLib code that I referenced is open source with a BSD license, so there are very little restrictions on taking the code underneath those examples and modifying them to fit your individual application needs. Best Regards, Tim

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>