Dear Experts, I am a newbie to Keil and using the PK51 development kit with Rev:9.03 to develop firmware for my CC2430 controller. The problem I am seeing is, when ever I create a large array (ex: unsigned char a[20]) , I was unable to initialize the values in the array. I can see the array has been created in XDATA. However if I create unsigned char IDATA a[20], I was able to initialize the array.
One more observation is, after executing the code for a couple of seconds (not exactly), the execution was looping in the following lines of code (STARTUP.A51).
XDATALOOP: MOVX @DPTR,A INC DPTR DJNZ R7,XDATALOOP DJNZ R6,XDATALOOP
The XDATA initialization as per my startup code is XDATASTART EQU 0x0100
XDATALEN EQU 0x1000
Can anyone let me know whats happening in my code. Please let me know, if any additional information is required to analyze the situation.
Also, Please forward me any available CC2430 Keil project.
Thanks in advance, Regards, RD
In the meantime i have tested with single stepping and discovered that it goes wrong when the DPTR reaches 0x00EA. executing MOVX @DPTR,A with a DPTR of 0x00EA restarts the MCU.. I assume this is a question for Silicon Labs.
the ever repeated issue with SILabs deviates (f3x-up) is that the watchdog is enabled at reset. The startup code does not feed the dog, so it bites.
at the start of startup.a51 (prefererably a local copy) disable the watchdog and enable it asgain at th top of main.
Erik
My phobia for dogs has always play a big role in my life ;-)
Thanks !!