---
title: "Flash_ErasePage with STM32F2xx Question"
url: "https://maker.wiznet.io/forum/10530"
markdown_url: "https://maker.wiznet.io/forum/10530/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "Christian"
created: "2014-09-18T08:53:19+09:00"
last_activity: "2017-05-04T08:33:55+09:00"
language: "en"
views: 564
replies: 1
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Flash_ErasePage with STM32F2xx Question

## Question

Asked by Christian on 2014-09-18 in Ethernet Chips.

Hi @ll,

I am moving the HTTPS App from the W7200 to the W5500 with a STM32F2xx MCU.
And I am having a question regarding the code added by Gang 2011-9-27.

while([color=#FF0000]FLASH_ErasePage/color!= FLASH_COMPLETE);

As for the STM32F2xx MCU there is no FLASH_ErasePage. There is only a “FLASH_EraseSector” which needs a VoltageRange_?
What is the correct VoltageRange needed for that?

```
/* Program the network parameters received into STM32F1xx Flash */
//Added by Gang 2011-9-27
        FLASH_Unlock(); 
        
//while(FLASH_ErasePage(FlashDestination)!= FLASH_COMPLETE); //   FLASH_ErasePage for STM32F10x

 while(FLASH_EraseSector(FlashDestination, VoltageRange_1)!= FLASH_COMPLETE); // VoltageRange needed?
        
        while(FLASH_ProgramWord(FlashDestination, ChipID)!= FLASH_COMPLETE);
        if (*(u32*)FlashDestination != ChipID)
        {
          Sprintf(buffer, "%s","\r\n ChipID Flash writing error!!!");
        }
```

## Replies

### Reply 1 by Christian, 2014-09-24

Hi,

thx for the reply

---

Source: https://maker.wiznet.io/forum/10530
