Hi,
I have used the WCAP instruction for obtaining timestamp values at different pins. My code looks like this :
L00 CNT {reg=A, max=1ffffffh}
L01 WCAP {next=L02, cond_addr=L02, hr_lr=high, reg=A, event=RISE, pin=0, data=0}
L02 WCAP {next=L03, cond_addr=L03, hr_lr=high, reg=B, event=RISE, pin=2, data=0}
L03 WCAP {next=L04, cond_addr=L04, hr_lr=high, reg=T, event=RISE, pin=4, data=0}
L04 BR {next=L00, cond_addr=L00, event=NOCOND};
I wish to access the timestamp values generated by these instructions through my main C code in Halcogen.
In the .c file generated by the HET code, I saw my instruction at location 1:
HET_MEMORY const HET_INIT0_PST[5] =
{
<other elements>
/* L01_0 */
{
0x00005600,
0x00004040,
0x00000000,
0x00000000
},
<other elements>
}
I tried the following sequence of events in my main code to extract the timestamp:
HET_MEMORY a;
<some other code>
a = HET_INIT0_PST[1];
But when I checked the data field of a, it was all zeros. How do I check the timestamp value using C?
Regards,
Abhishek.