when i burnt the example hex file the hardware is working. but when the code i copied and compiled using keil uVision2 and converted to hex its not working what is the problem
If you created your own project but using same code as a working example, then it's time to check the project file options.
Does it build for the correct processor? The correct memory regions?