From: mook johnson on
Can the a section of the program flash be written to, by the embedded code,
for storing things like calibration data that would are loaded serially once
the device is in service?

I need these to be loaded via the SCI or SPI and written to internal
non-volatile memory. These valued may change over the life of the device so
the OTP is not a clean option. It can be done of that is the only option
but not a clean as I'd like.

Trying to avoid adding a serial eprom for those purposes.




From: Charlie E. on
On Sat, 27 Mar 2010 11:07:25 -0500, "mook johnson" <mook(a)mook.net>
wrote:

>Can the a section of the program flash be written to, by the embedded code,
>for storing things like calibration data that would are loaded serially once
>the device is in service?
>
>I need these to be loaded via the SCI or SPI and written to internal
>non-volatile memory. These valued may change over the life of the device so
>the OTP is not a clean option. It can be done of that is the only option
>but not a clean as I'd like.
>
>Trying to avoid adding a serial eprom for those purposes.
>
>
>

Mook,
Yes, I believe it can. It is device dependent, and I am not as
familiar with the parts you are using. I believe they are PICs, aren't
they? I have a small library from Microchip that does exactly this.

If not PICs, the basics are this:

Your system can usually only erase one whole page at a time, but can
only write one line at a time. Your program establishes a buffer one
page in size, and reads in the existing content of that page from
program memory. You then make the changes you need in this buffer,
erase the old page, and write the new page.

This can get tricky, as you don't want any code you are actually
executing to be in that page! You also need to align your data with
the page boundaries. Depending on your system, there may be other
gotchas waiting in the wings for Murphy to find for you!

Charlie
From: mook johnson on

> Mook,
> Yes, I believe it can. It is device dependent, and I am not as
> familiar with the parts you are using. I believe they are PICs, aren't
> they? I have a small library from Microchip that does exactly this.
>
> If not PICs, the basics are this:
>
> Your system can usually only erase one whole page at a time, but can
> only write one line at a time. Your program establishes a buffer one
> page in size, and reads in the existing content of that page from
> program memory. You then make the changes you need in this buffer,
> erase the old page, and write the new page.
>
> This can get tricky, as you don't want any code you are actually
> executing to be in that page! You also need to align your data with
> the page boundaries. Depending on your system, there may be other
> gotchas waiting in the wings for Murphy to find for you!
>
> Charlie

Thanks for the quick response Charlie but this is a TI C2000 DSP not a PIC.



From: Charlie E. on
On Sat, 27 Mar 2010 11:28:27 -0500, "mook johnson" <mook(a)mook.net>
wrote:

>
>> Mook,
>> Yes, I believe it can. It is device dependent, and I am not as
>> familiar with the parts you are using. I believe they are PICs, aren't
>> they? I have a small library from Microchip that does exactly this.
>>
>> If not PICs, the basics are this:
>>
>> Your system can usually only erase one whole page at a time, but can
>> only write one line at a time. Your program establishes a buffer one
>> page in size, and reads in the existing content of that page from
>> program memory. You then make the changes you need in this buffer,
>> erase the old page, and write the new page.
>>
>> This can get tricky, as you don't want any code you are actually
>> executing to be in that page! You also need to align your data with
>> the page boundaries. Depending on your system, there may be other
>> gotchas waiting in the wings for Murphy to find for you!
>>
>> Charlie
>
>Thanks for the quick response Charlie but this is a TI C2000 DSP not a PIC.
>
>

Check the datasheets then. Also, contact TI support on this. The
basics are usually the same...

Charlie
From: Vladimir Vassilevsky on


mook johnson wrote:

> Can the a section of the program flash be written to, by the embedded code,
> for storing things like calibration data that would are loaded serially once
> the device is in service?

Yes. However you have to run the program from SRAM; at least the part
which does flash programming. When I did that several years ago, I had
to sign NDA with TI to get low level flash programming docs.

> I need these to be loaded via the SCI or SPI and written to internal
> non-volatile memory. These valued may change over the life of the device so
> the OTP is not a clean option. It can be done of that is the only option
> but not a clean as I'd like.
>
> Trying to avoid adding a serial eprom for those purposes.

FLASH memory of 2812 is PITA, especially the erasing procedure. They
also changed flash procedures in the incompatible way at least once. I'd
better use external EEPROM.

Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
 |  Next  |  Last
Pages: 1 2
Prev: dsPIC33f and SPI,SSEN too short
Next: Strange waveform