We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all
I need a counter to to count up something
So I use follow code to do this work
unsigned long pdata counter[4]={0,0,0,0};
in the counting place,
counter[0]++;
when run finsih , I print the result
printf(%ld\n",counter[0]};
Maybe I have run to 1000 times ,so counter[0] value
will be to 1000 , but the printf result maybe very
large, like as 92343421;
why ?? how can I make sure to count up correctly??
Thanks a lot
best regards
"my chip is ASIC IP only"
In that case, it is very likely that it handles PDATA in a special way - or may not support it at all. If the datasheet doesn't mention it, you need to ask the IP provider specifically about this.
"I didn't know pdata too much"
Don't try to use it until you really understand it, and how (if at all) it is implemented on your target.
Get your code working first using DATA, IDATA, or XDATA.
"There is no startup.a51 in my code , do I need to modify this file to use PDATA??"
Yes!