cancel
Showing results for 
Search instead for 
Did you mean: 

Flash Programming

k_arthur
Associate II
Posted on June 13, 2008 at 14:28

Flash Programming

10 REPLIES 10
k_arthur
Associate II
Posted on May 17, 2011 at 09:42

Professionals where are you ?

Gurus of STR9xx where are you ?

If you have flash programming example please send it.

But not the example from library (thats runs from ram).

Need example that runs from flash.Please...

craig239955_st
Associate II
Posted on May 17, 2011 at 09:42

Hi,

I do not know if this is your problem (I am not a Guru..), but you must keep in mind that writing to flash with a FMI_clock > 25MHz will give you unexpected results. So before writing to flash, yoy have to reduce the CPU clock-frequency.

See datasheet errata 1.21 at page 11!

Regards

Luc Vercruysse

k_arthur
Associate II
Posted on May 17, 2011 at 09:42

In Keil STR91x.s file i set MCLKSEL = fOSC (8 Mhz) it must be sufficient.

Also i tried to set MCLKSEL = fPLL (PLL =24 Mhz), PLL ENABLE, FMI clk =

Rclk/2 (project work from ram but from flash it not work yet). I do some

mistake but can not find it ?

craig239955_st
Associate II
Posted on May 17, 2011 at 09:42

Is the code you are talking about ''example1'' from previous post ?

If not, post it here please, i will have a look.

Luc

k_arthur
Associate II
Posted on May 17, 2011 at 09:42

Yes Example1 is the needed project. On my hardware when i compile it

to Flash area (to run from 0x0) it not work but when it run from RAM it work as expected. Thank you for help. Please answer me and explane me what is my mistake.

craig239955_st
Associate II
Posted on May 17, 2011 at 09:42

There is nothing wrong with this code. But check your memory assignments.

This should be the same as the attched file.

Regards

Luc.

k_arthur
Associate II
Posted on May 17, 2011 at 09:42

As i understand you changed the parameters (untitled.bmp) and this project(EXAMPLE1) work from flash on your hardware.

k_arthur
Associate II
Posted on May 17, 2011 at 09:42

Thank you it work the problem was(Thumb mode).In my project i choosed ARM mode. Yet i do not know why it affect to flash writing but it work and it's

super. Thank you. Good luck in your development board creation.

k_arthur
Associate II
Posted on May 17, 2011 at 09:42

Thank you Zouh yet i do not know the difference . In thumb mode it work

and it's OK. If you can explane the difference i will be thankful.