The purpose of this group is to foster exchange of information on the Texas Instruments MSP430 family of microcontrollers and related tools. Everyone welcome, all levels of familiarity/expertise.
flash write - "paddu.koti" - Sep 29 8:55:56 2008
Hi,
I need to write some data into the MSP430 flash using In System
Programming(ISP) but,when writing to the flash is it necessary to erase
entire memory segment before writing,I dont want to use a entire memory
segment,I just want to write/rewrite data into the free memory and also
access it frequently.
Does anybody has sample code for ISP,in all the sample codes provided
by TI ,the memory segment is erased before writing.
Thankyou....
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: flash write - Ian Okey - Sep 29 8:59:11 2008
Sorry. You have to erase the whole segment. That's how flash works.
Ian
2008/9/29 paddu.koti
> Hi,
>
> I need to write some data into the MSP430 flash using In System
> Programming(ISP) but,when writing to the flash is it necessary to erase
> entire memory segment before writing,I dont want to use a entire memory
> segment,I just want to write/rewrite data into the free memory and also
> access it frequently.
>
> Does anybody has sample code for ISP,in all the sample codes provided
> by TI ,the memory segment is erased before writing.
>
> Thankyou....
> ------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: flash write - Paddu Koti - Sep 29 11:40:03 2008
Thankyou Ian,
Does it mean I have to erase complete segment just to write few data into the flash,
isn't it possible to store a data at a particular location without erasing the memory?
Thankyou....
----- Original Message ----
From: Ian Okey
To: m...@yahoogroups.com
Sent: Monday, September 29, 2008 9:59:03 PM
Subject: Re: [msp430] flash write
Sorry. You have to erase the whole segment. That's how flash works.
Ian
2008/9/29 paddu.koti
> Hi,
>
> I need to write some data into the MSP430 flash using In System
> Programming( ISP) but,when writing to the flash is it necessary to erase
> entire memory segment before writing,I dont want to use a entire memory
> segment,I just want to write/rewrite data into the free memory and also
> access it frequently.
>
> Does anybody has sample code for ISP,in all the sample codes provided
> by TI ,the memory segment is erased before writing.
>
> Thankyou....
> ------------ --------- --------- ------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: flash write - Ian Okey - Sep 29 11:45:11 2008
No. In simple terms, if you want to keep any of the data in the sector you
have to read the sector out into RAM, change the elements that you want to
update and then write the whole lot back. Remember that the flash sector
has an erase/rewrite life of typically 10000 operations (read the data sheet
for the device that you are using).
Ian
2008/9/29 Paddu Koti
> Thankyou Ian,
>
> Does it mean I have to erase complete segment just to write few data into
> the flash,
> isn't it possible to store a data at a particular location without erasing
> the memory?
>
> Thankyou....
>
> ----- Original Message ----
> From: Ian Okey
> To: m...@yahoogroups.com
> Sent: Monday, September 29, 2008 9:59:03 PM
> Subject: Re: [msp430] flash write
> Sorry. You have to erase the whole segment. That's how flash works.
>
> Ian
>
> 2008/9/29 paddu.koti > Hi,
> >
> > I need to write some data into the MSP430 flash using In System
> > Programming( ISP) but,when writing to the flash is it necessary to erase
> > entire memory segment before writing,I dont want to use a entire memory
> > segment,I just want to write/rewrite data into the free memory and also
> > access it frequently.
> >
> > Does anybody has sample code for ISP,in all the sample codes provided
> > by TI ,the memory segment is erased before writing.
> >
> > Thankyou....
> >
> >
> > ------------ --------- --------- ------
> >
> >
> >
> >

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: flash write - Bill Knight - Sep 29 21:00:12 2008
I uploaded some flash write routines to the files section a month or two
ago. You might want to have a look.
You can write to a section of flash successfully IF that section has
been previously erased and not written since. To store configuration
data, I typically divide a segment of info memory into 16-byte blocks
then write each one sequentially with new data. One of the entries in
the block is a status byte (FF=unused, 01=in use, 00=old data). When
the segment is full, I FIRST write the new data to the first block in
the next segment, THEN after confirming it wrote OK, erase the 1st
segment. When the second segment is full, I switch back to the first.
Hope this helps.
Regards
-Bill Knight
R O SoftWare
paddu.koti wrote:
> Hi,
>
> I need to write some data into the MSP430 flash using In System
> Programming(ISP) but,when writing to the flash is it necessary to erase
> entire memory segment before writing,I dont want to use a entire memory
> segment,I just want to write/rewrite data into the free memory and also
> access it frequently.
>
> Does anybody has sample code for ISP,in all the sample codes provided
> by TI ,the memory segment is erased before writing.
>
> Thankyou....
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: flash write - Paddu Koti - Sep 30 0:35:15 2008
Hi Bill Knight ,
Thankyou for the information.
----- Original Message ----
From: Bill Knight
To: m...@yahoogroups.com
Sent: Tuesday, September 30, 2008 10:00:02 AM
Subject: Re: [msp430] flash write
I uploaded some flash write routines to the files section a month or two
ago. You might want to have a look.
You can write to a section of flash successfully IF that section has
been previously erased and not written since. To store configuration
data, I typically divide a segment of info memory into 16-byte blocks
then write each one sequentially with new data. One of the entries in
the block is a status byte (FF=unused, 01=in use, 00=old data). When
the segment is full, I FIRST write the new data to the first block in
the next segment, THEN after confirming it wrote OK, erase the 1st
segment. When the second segment is full, I switch back to the first.
Hope this helps.
Regards
-Bill Knight
R O SoftWare
paddu.koti wrote:
> Hi,
>
> I need to write some data into the MSP430 flash using In System
> Programming( ISP) but,when writing to the flash is it necessary to erase
> entire memory segment before writing,I dont want to use a entire memory
> segment,I just want to write/rewrite data into the free memory and also
> access it frequently.
>
> Does anybody has sample code for ISP,in all the sample codes provided
> by TI ,the memory segment is erased before writing..
>
> Thankyou....
[Non-text portions of this message have been removed]
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )