Skip to main content
Visitor II
May 18, 2007
Question

Code for setting configuration register

  • May 18, 2007
  • 7 replies
  • 1043 views
Posted on May 18, 2007 at 09:25

Code for setting configuration register

    This topic has been closed for replies.

    7 replies

    jwester9Author
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:42

    Hi

    Can anyone supply me with code for setting Configuration register for changning the boot to bank1, so I can use it instead of the CAPS

    Is it the CSX bit ?

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:42

    No one responded to my earlier post on this, so I assume it is absolutely impossible to set the CSX bit without using JTAG.

    jwester9Author
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:42

    I read more about it and now I understand it can only bee done via JTAG, but how. With JTAG it depends on the IDE system, and maybe it can bee done

    by setting registers in the init sequence

    I using iSystem and winIDEA, anyone know how to setup the JTAG ??

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:42

    The fastest way of doing it is using ST Micro's CAPS program, and a Raisonnance RLink jtag adapter.

    Otherwise, you will need to study the STR91x Flash Programming manual, which has the details of JTAG bit banging, but that requires knowledge of the jtag protocol (I gave up after a while).

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:42

    Hai,

    you can change the csx bit in 91x_CFG.s which will be available in strtup code folder for ST.We are using keil ide.You can add 91x_CFG.s to startupcode and select the csx bit and download the program using JTAG.

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:42

    I will give you some tips.

    First of all find in your project the (output) map file like the example is attached. In attached file you will find:

    Load Region LR_IROM1 - code

    Execution Region RW_IRAM1 - ram

    Load Region LR$$.ARM.__AT_0x520000 - configuration this means that after

    linking we have code that intended for addresses 0x520000 - 0x520007

    Now the programer knows that it must write to flash also this addresses.

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:42

    I use the attached file. But if this file not compatible for your system

    you must create code area yourself (see the attached as example change it

    to your system if needed). When you receive in your map file the code area

    that i explaned before - one step is done. Now may be the programer that

    you use can not write that area(no algorithm). Check it before you start.

    Than may be it easier to use the caps. Or find the programer that can

    program any hex file that support algorithms for different area writing.

    Good luck!!!