libraries/WM_Libraries/Doc/W60X_QFLASH_Driver_for_SWD/W60X_QFlash/FlashPrg.c
int EraseSector (unsigned long sectoradr) {
	/*Write Enable*/
	*(volatile unsigned int *)0x40002000 = 0x6;
	*(volatile unsigned int *)0x40002004 = 0x10000000;

	*(volatile unsigned int *)0x40002000 = 0x80000820;
	*(volatile unsigned int *)0x40002004 = 0x10000000|((sectoradr&0xFFFFF)<<8);

  return (0);                                  // Finished without Errors
}
/*
 *  Erase Sector in Flash Memory
 *    Parameter:      adr:  Sector Address
 *    Return Value:  
 */
Erase Sector in Flash Memory
Parameter:      adr:  Sector Address
Return Value.
Erase Sector in Flash Memory Parameter : adr : Sector Address Return Value .
int EraseSector (unsigned long sectoradr) {
	*(volatile unsigned int *)0x40002000 = 0x6;
	*(volatile unsigned int *)0x40002004 = 0x10000000;
	*(volatile unsigned int *)0x40002000 = 0x80000820;
	*(volatile unsigned int *)0x40002004 = 0x10000000|((sectoradr&0xFFFFF)<<8);
  return (0);                                  
}
int EraseSector ( unsigned long sectoradr ) { * ( volatile unsigned int * ) 0x40002000 = 0x6 ; * ( volatile unsigned int * ) 0x40002004 = 0x10000000 ; * ( volatile unsigned int * ) 0x40002000 = 0x80000820 ; * ( volatile unsigned int * ) 0x40002004 = 0x10000000 | ( ( sectoradr & 0xFFFFF ) << 8 ) ; return ( 0 ) ; }
Erase Sector in Flash Memory
    Parameter:      adr:  Sector Address
    Return Value:
Erase Sector in Flash Memory Parameter : adr : Sector Address Return Value :
/*Write Enable*/ // Finished without Errors