W7500x Reference Manual Version1.1.0
39 / 399
#define IAP_ERAS_MASS (IA 5) // Erase all code & data
#define IAP_PROG 0x022
This is how to Erase and Program flash memory. Especially, with IAP_ERAS_DAT0 and
IAP_ERAS_DAT1, there is no need to put other parameters (there are default values).
// Step 1 DATA0 Erase, Read, Write Test
DO_IAP(IAP_ERAS_DAT0,0,0,0);
DO_IAP(IAP_PROG,DAT0_START_ADDR,buffer,SECT_SIZE);
Operating program can be deleted when user use 'IAP_ERAS_CHIP' or 'IAP_ERAS_MASS
'.
// Using IAP_ERAS_CHIP or IAP_ERAS_MASS
DO_IAP(IAP_ERAS_CHIP,0,0,0);
DO_IAP(IAP_ERAS_MASS,0,0,0);
12
Clock Reset generator (CRG)
12.1
Introduction
CRG is clock reset generator block for W7500x System. It provides every clock/reset for all
other block include CPU and peripherals. CRG includes PLL and POR.
12.2
Features
Reset
•
Three types of reset – external reset, Power reset, system reset
•
External reset is generated by low level on the RSTn pin (external reset)
•
Power reset is generated by Power-on reset (POR)
•
Power on reset is generated by POR
•
System reset is generated when one of the following events occurs
Watchdog event