Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

Timestamp Timer Problem

Hi,

I'm using Quartus 12.0 SP1 with SOPC Builder and have a Problem with my Timestamp Timer.

I implement in my SOPC-System a Timer with 1ms and "Fixed period" and "readable snapshot". After that I generate the NIOS II and compile my VHDL-Project.

In the NIOS II IDE I implement this timer as timestamp timer.

My C-Code is the following:


unsignedint uiTimeMeas1,uiTimeMeas2;
int iTicks,iTimestampStart;
uiTimeMeas1 = alt_timestamp();
iTimestampStart = alt_timestamp_start();
uiTimeMeas2 = alt_timestamp();
iTicks = alt_timestamp_freq();

The result If I Debug this Code is my Problem:

uiTimeMeas1 4294885376

iTimestampStart 0

uiTimeMeas2 4294885412

iTicks 81920000

I think uiTimeMeas2 is to big and alt_timesamp_start() doesn't work correct.

Can anybody help me.

Thanks
No RepliesBe the first to reply