Skip to main content
Visitor II
October 25, 2004
Question

Problem with the flash erase

  • October 25, 2004
  • 2 replies
  • 844 views
Posted on October 25, 2004 at 11:38

Problem with the flash erase

    This topic has been closed for replies.

    2 replies

    maritzagAuthor
    Visitor II
    October 22, 2004
    Posted on October 22, 2004 at 13:15

    I'm using the the ST72561.. its a very simple code.. the problem i have is the flash.. it spend like 11 sec.. to erase sector 2 of the flash...

    I'm using this code to erase the flash

    __FLASH_SectorErase:

    ld A, #$04

    ld PCDR, A ; Power Up the Reprogramming Circuit

    ; ld SECT, A

    ; ld PTRH, A

    ;

    ; SECT and PTRH are filled in the C code

    ld A, #$03 ; Command Number

    ld ECMD, A

    ld PTRL, A

    ld A, #$01 ; Frequency [1..8]

    ld FREQ, A

    ERASE:

    ; ld X, #$7F

    ; ld WDGCR, X ; Watchdog update if used in USER mode

    ld FCSR, A ; Start Command (Dummy write)

    btjt ECMD, #7, ERASE

    ld A, #$00

    ld PCDR, A ; Power Off the Reprogramming Circuit

    ld A, ECMD

    ret

    Can you help me?
    Visitor II
    October 25, 2004
    Posted on October 25, 2004 at 11:38

    You must be using 60k device. The normal programming time is 8.5secs.

    If you are giving 12V supply, try with 12.3V. The time will reduce to some extent.

    rgds,

    Venky