cancel
Showing results for 
Search instead for 
Did you mean: 

Aout IAP block standard programm time?

wolver
Associate II
Posted on May 16, 2009 at 04:09

Aout IAP block standard programm time?

6 REPLIES 6
wolver
Associate II
Posted on May 17, 2011 at 15:03

Hello:

My CPU use I2C IAP block standard programm STM8A and automatic updates MCU, Total time of 15 blocks standard programm which is 10 seconds. Is that time slow or normal?

Regards

wolver

jatin
Associate II
Posted on May 17, 2011 at 15:03

Hi Wolver,

The programming time for a block(128 bytes) is ~6msec (which includes erase+program time). Its same if you do a byte or word profgramming. For 15 blocks => 15*6 = ~90 msec.

I think, 10 seconds is the total time taken to receive the data through I2C then loading it in the memory locations. what is your cpu frequency?

You can calculate the time taken by the each section of your code by toggling some IOs.

[ This message was edited by: Jatin on 14-05-2009 09:12 ]

wolver
Associate II
Posted on May 17, 2011 at 15:03

Hi Jatin

My CPU work(Linux_OS) on 333MHz, I2C bus is 100KHz, STM8A is slave.

I test it and sure that update is successful.

All is block standard programm, It do not a byte or word programm...

:-[

Regards

wolver

wolver
Associate II
Posted on May 17, 2011 at 15:03

Hi Jatin

You are right! I check my programm, find I forget ... as follow:

// Enable Block programm

FLASH_CR2 = BIT(0);

FLASH_NCR2 &= (u8)~BIT(0);

Now, 15 blocks programm is less than 1 second. I think that it is normal.

:D

Redards

wolver

jatin
Associate II
Posted on May 17, 2011 at 15:03

Hi Wolver,

The actual block programming time for 15 blocks is => 15 * 6 = 90 msec.

The programming starts when you load the last byte in the block. So i suppose the 1 sec. time also includes the data loading phase plus the time to receive the data via I2C.

wolver
Associate II
Posted on May 17, 2011 at 15:03

Hi Jatin

I test STM8AF-51A8 result:

All total time of 1024 blocks(addr = 0x008000~0x027fff) standard programm is about 30 seconds. Average about 30mS @ block > 6mS

of course, That time(30mS @ block) includes: Pretreatment + communication(IAP I2C) + Erase + Programm + Verify

I am glad that I can release my automotive products and never to worry MCU bug...since my CPU can update MCU programm... :D

Regards

wolver

[ This message was edited by: wolver on 16-05-2009 07:41 ]