cancel
Showing results for 
Search instead for 
Did you mean: 

Again on RCCR and oscillator problem with ST7Lite19

ciccio
Associate II
Posted on June 02, 2008 at 14:05

Again on RCCR and oscillator problem with ST7Lite19

3 REPLIES 3
ciccio
Associate II
Posted on April 28, 2008 at 11:22

Hi,

I use ST7LITE19 and 29 with programmer Indart STX.

I dont understand how can program without delete EEPROM[0](in eeprom[0] there are factory setting of oscillator)!

Now I program with option byte:

>write protection: off

>read out protection: on

and I use Auto program:

>Erase option

>Erase Code

>Blanck check code

>Program code

>Verify Code

>Erase Data

>Program Data

>Verify Data

>Program Option

>Verify Option

>Run

In my program use for initial peripherics:

EECSR = 0x00; /* read eeprom */

RCCR = ((EEPROM[0] & 0xFF00) >> 8);

but the eeprom[0] is already deleted!!!! :-[

I have try to re-write in sector zero of eeprom with:

EECSR |= BIT_1; /* E2LAT = 1 */

EEPROM[0] = 0x6800; // example value 0x6800

EECSR |= BIT_0;

while (EECSR & BIT_1)

{

RefreshWatchdog();

}

but when I go to read I found alwais XX in address 0.

My error is setting ''Erase Data'' in option byte?

I can controll the value in eeprom[0] if I dont lock ''read out'' bytes?

Thanks!

ciccio
Associate II
Posted on May 05, 2008 at 09:30

I have found! :D

If I program a microcontroller with ''Read Out Protection'' already setting in ON the eeprom is erased!

If I program a microcontroller with ''Read Out Protection'' already setting in OFF the eeprom is untouch.

In my Indart STX I must DE-select:

>Erase Data

>Program Data

>Verify Data

If I have deleted the first 2 byte of eeprom I can re-write the correct value (measured with oscilloscope)

with:

EECSR |= BIT_1; /* E2LAT = 1 */

EEPROM[0] = 0x6800; // example value

EECSR |= BIT_0; /* E2PGM = 1, start write */

while (EECSR & BIT_1) /* wait for end */

{

RefreshWatchdog();

}

If EEPROM[0] contains the correct value I can use in my initial peripherics function:

EECSR = 0x00; // E2 in read

RCCR = ((EEPROM[0] & 0xFF00) >> 8);

Never I must to re-program microcontroller locked in Read Out Protection!!!

brian4
Associate II
Posted on June 02, 2008 at 14:05

I have had the same problem, I wanted to protect my code and set the ''Read out protection'' flag.

When I wanted to install new software I had to erase the device and to my surprise it erased the calibration data, surely this is a bug.

I was using the Softec Datablaze Software.