Follow this easy steps
1) Start your phone [phone must be started with or without sim]
2) Press volume up button + home button + search button
[Location of volume up button is on right side, location for home button is on bottom middle button of home screen and search button is right side of phone above camera button]
3) Keep all those button pressed at the same time for 5 second
4) Phone will ask you for " Are you sure you want to factory reset?"
5) Press yes and wait for 1 minute, Phone will hang first and than restart after sometime.
6) You've done resetting your GT540 successfully