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);
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.
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?