Skip to main content
Visitor II
November 8, 2004
Question

how can i erase and programme some sector of boot

  • November 8, 2004
  • 4 replies
  • 1058 views
Posted on November 08, 2004 at 16:52

how can i erase and programme some sector of boot

    This topic has been closed for replies.

    4 replies

    eolmanAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:03

    hello ,everybody from all the word

    my register mapping are as follows:

    cs0: 0x0000-0x1fff code address or xdata address

    cs1: 0x2000-0x3fff code address or xdata address

    cs2: 0x4000-0x5fff code address or xdata address

    cs3: 0x6000-0x7fff code address or xdata address

    fs0-fs7: 0x8000-0xffff code address or xdata address

    when i run the programme in the cs11,cs2,cs3 or main flash,can i erase the cs0 and write it, how can i do?

    thanks ! :

    eolmanAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:03

    ok! thanks to phaze426

    next question:

    when i run programme in the mainflash and erase or write cs1-cs3 sectors,can i reserve the data in the cs0?how can i do?
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:03

    eolman,

    You can erase the data in cs1 - cs3 and still save the data in cs0. The only condition is that you cannot be EXECUTING out of cs0 WHILE you're erasing and programming cs1-cs3.

    As for how to do it, you'd just follow the general flash instructions, but you'd use addresses that reside in each of those individual blocks of flash.
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:03

    eolman,

    All of the codes necessary are given in the uPSD data sheet where it describes the flash memory in and in-application programming. One thing to keep in mind is that you cannot program AND run out of the same memory area at the same time. That is, you would have to switch over to boot flash before programming main flash and vice-versa.