I should also point out that the documentation implies that programming the next flash location in a flash module OUTSIDE of the one currently executing the code should check (see the doco) that the previous operation is complete. (IE: Check the Flash Busy bit)
According to the documentation, flash outside of the current (execution) flash segment will NOT stall code execution until the programming operation is finished. Since a code flash segment is 512 bytes, the most likely scenario is that the segment being programmed is not the same as the segment running the code! I must admit, that I have not bothered with this (except in the early days) and yet, the flash seems to program without problems!???? I have an Intel hex load routine running at 115 kbaud, and this has not presented any problems, although, a byte is written only once very 87 uS so should be well within the 75 uS in the specifications. I suspect it may be that I generally do not program large blocks at one time. (Configuration parameters are prompt driven, so even structures do not get updated fast enough to see any potential problem!) Also, caution! The flash memory is "only" guaranteed for 100,000 writes. It is possible to destroy the flash relatively rapidly if you try to use it as SRAM. Always attempt to calculate the potential "writes" to the flash, and devise a technique that reduces writes to any individual location so that the device will not fail over the lifetime of the product. IE: writing (and erasing) the same location once a second will mean 100,000 writes will occur in around 14 months of continuous operation. Do not assume the flash will remain intact forever. (Flash does eventually fail!) Cheers Harry -----Original Message----- From: mspgcc-users-ad...@lists.sourceforge.net [mailto:mspgcc-users-ad...@lists.sourceforge.net]on Behalf Of Steve Underwood Sent: Sunday, December 07, 2003 1:02 PM To: mspgcc-users@lists.sourceforge.net Subject: Re: [Mspgcc-users] Re: 2x 128Bytes self read/write Daniel Néri wrote: >Steve Underwood <ste...@coppice.org> writes: > > > >>You can't write bytes. You have to write whole 16 bit words. >> >> > >Sorry, but this is simply not true. MSP430 flash memory is bit-, byte- >and word-programmable. > > Then tell us how. The rest of us only know how to program whole 16 bit words, including the chip's designers. Everyone else gets the effect of programming a bit or byte in the way I described. You write a whole word, where the bit you don't want to change are set to 1. Regards, Steve ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&opÌk _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users