Skip to main content
melihcicek
Associate II
April 15, 2011
Question

Flash Bank2 Pages Write / Erase Problem

  • April 15, 2011
  • 5 replies
  • 1024 views
Posted on April 15, 2011 at 14:36

Flash Bank2 Pages Write / Erase Problem

    This topic has been closed for replies.

    5 replies

    Tesla DeLorean
    Guru
    May 17, 2011
    Posted on May 17, 2011 at 14:31

    FLASH_ClearFlag(FLASH_FLAG_BANK2_EOP | FLASH_FLAG_BANK2_PGERR | FLASH_FLAG_BANK2_WRPRTERR);

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    melihcicek
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 14:31

    Thank you clive1

    It works now

    I want to ask one more question

    I can erase pages using FLASH_ErasePage(addr); but it erase 2K

    but if i want to delete only one byte I mean how can i delete only 0x08002000 address  content !!!

    Andrew Neil
    Super User
    May 17, 2011
    Posted on May 17, 2011 at 14:31

    Cross post: 

    http://www.keil.com/forum/18780/

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    melihcicek
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 14:31

    Hi!

    it worked but it is with problem.

    When i try to erase, it returns FLASH_Timeout but it erase.

    FLASH_Status1 = FLASH_EraseAllBank2Pages();

    Also when i write data it write but function return FLASH_TIMEOUT

    so it writes more slowly (these problems only for bank2)

    I didnt understand the problem !!!

    Andrew Neil
    Super User
    May 17, 2011
    Posted on May 17, 2011 at 14:31

    ''It works now''

     

     

    So be sure to update your thread on the Keil forum!

     

    Otherwise you will be wasting people's time over there responding to a question that's already been answered.

     

    ''if i want to delete only one byte I mean how can i delete only 0x08002000 address  content !!!''

    You can't!

    It is in the nature of all Flash devices - not just the STM32 - that you can only erase whole pages at a time.

    Have you read the ST Application Note about using the Flash to simulate EEPROM...?

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.