- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I'm trying below:
int main() { alt_u32 t1; alt_u32 t2; alt_u32 t3; int ret = alt_timestamp_start(); t1 = alt_timestamp(); usleep(1000000); t2 = alt_timestamp(); t3 = alt_timestamp_freq(); return 0; } ret is 0, t3 is 50000000(the input clock of Interval Timer object), but t1 and t2 always show 4209704959. It seems that the Timer is not ticking. I also tried alt_nticks which always returned 0; I wonder what might be the problem here. -Cyclone V Dev Board -QuartusII 15.0(64bit), Qsys on Win7 -NiosI 15.0 Software Build Tools for Eclipse Thanks in advance.Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
could you try to place the usleep with some for loop delay just to isolate this is time stamp feature nor working first?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you pororo,
I tried below but still not working: int main() { alt_u32 t1; alt_u32 t2; alt_u32 t3; unsigned int i; int ret = alt_timestamp_start(); t1 = alt_timestamp(); for(i=0; i<0x00ffffff; i++) IORD(ONCHIP_MEMORY2_1_BASE,0); t2 = alt_timestamp(); t3 = alt_timestamp_freq(); return 0; } I still get 4209704959 for both t1 and t2. I had never faced this problem when I was using Cyclone IV Development or Custom boards with QuartusII, SOPC Builder & NiosII 11.0sp1. I wonder what I am missing..- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry,
It seems that my problem was not connecting data_master of NiosII and slave of Interval Timer in Qsys. Instead, I was connecting instruction_master. Thanks!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Sorry, It seems that my problem was not connecting data_master of NiosII and slave of Interval Timer in Qsys. Instead, I was connecting instruction_master. Thanks! --- Quote End --- good to hear that!!!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page