Dear all, when i write 0xfe into HCR0 register using startup.a51 my program works fine.. whereas when i wanted to write into program memory i have to enable PML bit. ie i wrote 0xbe into HCR register.My program gets reset again and again .. I thought this might be problem with watchdog timer and disabled it in the same register (writing 0xb6 ). Now there is no Response from the program what is the issue??? can any expert help me in this ??
"I am really amazed with HCR register How it is mapped to 807EH address ??" Presumably, that's in XDATA - what does the Datasheet say?
HCRx are hardware configuration registers that are mapped into the code space (configured by HWCfr.a51 which is part of the Keil examples). You may program them only during Flash initialization. Take a look to one of the example applications that we provide. For example: ..\C51\EXAMPLES\TI MSC121x\AD4Input. The ISD51 (In-System Debugger) includes a CWRITE function that alters program memory. You may take out the required function from ISD51.A51. Reinhard