- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Timer Help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-26-2011 01:30 PM
I've got a semi-working Timer where it eventually generates an interrupt but it takes about 120 seconds instead of the 6 seconds I'm setting the timer too. Does anyone have any suggestions on what I'm doing wrong? The following is how I'm setting up the timer with a Microblaze Kernel.
XTmrCtr_SetHandler(&Timer1, (XTmrCtr_Handler) TimerHandler, &Timer1);
XTmrCtr_SetOptions(&Timer1, (Xuint8)0, XTC_INT_MODE_OPTION | XTC_AUTO_RELOAD_OPTION );
XTmrCtr_SetResetValue(&Timer1, (Xuint8)0, 6 * 1000);
XTmrCtr_Start(&Timer1, (Xuint8) 0);
Re: Timer Help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-26-2011 01:37 PM
The IDS 13.2 "Embedded Example Design" for this board posted to the S6LX150T reference design download page: www.em.avnet.com/spartan6lx150t-dev has an interrupt example design that uses a timer. You may want to compare your code with the example design.
Re: Timer Help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-26-2011 02:40 PM
Thanks for the reply. I'm using a Kernel and ran into a problem with I2C interrupt registration so I was told that I had to use register_int_handler which works. I tried using the sample code that you pointed me to and it immediately goes to the interrupt. So I'm wondering if I'm running into the same problem since I'm using a Kernel. Any ideas?
Re: Timer Help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-26-2011 03:05 PM
Re: Timer Help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-26-2011 03:07 PM
Not sure what you mean by "it immediately goes to interrupt".
Re: Timer Help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-26-2011 03:12 PM
The value entered to count to or from has no effect.
Re: Timer Help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-26-2011 05:29 PM
Have you tried the debugger to see the state of the timer registers?
Re: Timer Help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-26-2011 07:41 PM
What debugger are you referring too, Chipscope? If so I'm not sure how this is possible. Can you give me some pointers?
Re: Timer Help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-27-2011 04:54 AM
I'm referrign to the GNU software debugger.



