Skip to main content
k_arthur
Associate III
June 13, 2008
Question

Flash Programming

  • June 13, 2008
  • 10 replies
  • 1587 views
Posted on June 13, 2008 at 14:28

Flash Programming

This topic has been closed for replies.

10 replies

k_arthur
k_arthurAuthor
Associate III
May 17, 2011
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...

k_arthur
k_arthurAuthor
Associate III
May 17, 2011
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 III
May 17, 2011
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

craig239955_st
Associate III
May 17, 2011
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
k_arthurAuthor
Associate III
May 17, 2011
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 III
May 17, 2011
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
k_arthurAuthor
Associate III
May 17, 2011
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
k_arthurAuthor
Associate III
May 17, 2011
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.

lillian_200601
Associate III
May 17, 2011
Posted on May 17, 2011 at 09:42

I use the Keil compiler and MCBSTR9 EVAL board to run the FMI example and find it is not working unless you compile the code in thumb mode instead of ARM mode. Can anyone give me a clue what difference between thumb and ARm mode? Why the FMI example can only work in Thumb mode? Highly appreciate any info.

k_arthur
k_arthurAuthor
Associate III
May 17, 2011
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.