cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to write into code memory without using IAP ?

mslab
Associate II
Posted on March 21, 2006 at 07:06

Is it possible to write into code memory without using IAP ?

14 REPLIES 14
mslab
Associate II
Posted on March 03, 2006 at 04:13

I am using ST7 flash ST72264G2.

Sometimes, some bytes of the code memory are replaced but I don't know why!

Maybe I have a software bug,

but I don't understand how I can change some code bytes.

Normally, the code bytes can only be changed with a programming tool, or whith In Circuit Programming (ICC) or with In Application Programming (IAP).

Is there anybody who can help me ?

Thanks

B.PICARD

laurent239955_stm1
Associate II
Posted on March 07, 2006 at 09:48

Hi,

What you said is right, only IAP and ICP can modify the program memory content.

Did you take care about negative injection on PB0 and PB1 ? an EEPROM corruption can be a side effect of this !

Best regards

Laurent

mslab
Associate II
Posted on March 09, 2006 at 06:03

Hello,

Thanks to the answer.

Our design uses 2 ST7 on the same PCB.

ST7 #1: All PB pins are connected to 74HCT541 inputs, PA pins are connected to 80C188 processor which manages I2C master except PA7 which is not connected.

I know, it is normally not recommended to left pin un-connected!

ST7 #2: PB0 is used to drive a PNP transistor, PB1..PB7 are not connected.

PA pins are connected to 80C188 processor which manages I2C master except PA7 which is not connected.

For each ST7, #1 and #2 :

PA0 (ICCCLK) and PA4 (SCL) are connected together, PA1 (ICCDATA) and PA6 (SDA) are connected together. SCL and SDA are connected to 80C188 (I2C master).

So our design can use ICC to program ST7s, in this case a jumper is use to drive ICCSEL,

or we can use I2C bus+IAP.

AT this time, we never use LVD Reset. It is always program to OFF in option bytes.

Maybe, we need to set LVD to medium or Low to avoid our problem of corrupted memory code bytes?

Regards

B.PICARD

mslab
Associate II
Posted on March 09, 2006 at 06:08

Hello,

Thanks to the answer.

Our design uses 2 ST7 on the same PCB.

ST7 #1: All PB pins are connected to 74HCT541 inputs, PA pins are connected to 80C188 processor which manages I2C master except PA7 which is not connected.

I know, it is normally not recommended to left pin un-connected!

ST7 #2: PB0 is used to drive a PNP transistor, PB1..PB7 are not connected.

PA pins are connected to 80C188 processor which manages I2C master except PA7 which is not connected.

For each ST7, #1 and #2 :

PA0 (ICCCLK) and PA4 (SCL) are connected together, PA1 (ICCDATA) and PA6 (SDA) are connected together. SCL and SDA are connected to 80C188 (I2C master).

So our design can use ICC to program ST7s, in this case a jumper is use to drive ICCSEL,

or we can use I2C bus+IAP.

AT this time, we never use LVD Reset. It is always program to OFF in option bytes.

Maybe, we need to set LVD to medium or Low to avoid our problem of corrupted memory code bytes?

Regards

B.PICARD

laurent239955_stm1
Associate II
Posted on March 09, 2006 at 07:08

Hi,

For sure if you use the IAP and if a power down occurs then the memory can be corrupted.

Better than the LVD, you can use the AVD to get an early warning.

Best regards

Laurent

mslab
Associate II
Posted on March 09, 2006 at 13:02

Hello,

Of course, I've forgotten to say that we never use IAP (or ICC) when we get corrupted code memory byte.

The ST7 is running normally.

The problem of corrupted bytes appears when we switch it on.

Because, during boot process a 80c188 processor tests ST7s by reading revision bytes inside code memory (via I2C bus) and the test is bad.

Sometimes, only the revision bytes are corrupted, but sometimes the beginning of the code is corrupted so the ST7 is not runnig after reset because it has lost the beginning of its code!

When we use IAP or ICC, the ST7 is programmed correctly without error.

laurent239955_stm1
Associate II
Posted on March 09, 2006 at 13:33

May be there is a misunderstanding !

Do you use IAP at any moment in your application , when it is running correctly ?

My assumption is that during the previous ''CPU run'' (before the test fail ), an IAP session has been interrupted by a power down !

Is this possible ? Or haven't you implement any IAP routine in your application ?

Best regards

Laurent

mslab
Associate II
Posted on March 10, 2006 at 06:26

YES, we have implemented IAP routines in our application.

BUT, we never launch an IAP session when it is running.

We use IAP only at boot process and only if the revision of the ST7 is bad.

When we program the ST7 with IAP, then it works fine up to the next fail!

Regards

B.PICARD

laurent239955_stm1
Associate II
Posted on March 13, 2006 at 14:13

Hi,

Did you get this behaviour on several parts or only one ?

Best regards

Laurent