mod5213 PIT problem
Posted: Fri Dec 07, 2012 5:35 am
Hi,
I am quite new with netburner hardware and I modified the PIT example from this page: http://www.netburner.com/support/resources/mod5213 to give me a 400Hz interrupt. My modifications are in the line: SetUpPITR( 1 /* Use PITR 1 */, 20735 /* Wait 16588 clocks */, 2/*
Divide by 2 from table 173 */ ); . I added also a line to keep the pitr_count in a pitrold and show me iprintf the difference between pitr_count and pitrold, which should be 400 for every second. Now my problem is that every about 60 seconds the difference for about 4 values off the difference is 399 instead of 400, like it misses an interrupt. If I change the frequency to the default in the example, it missis once at about 90 seconds and then is not doing it again. Anybody knows why and how should I avoid this? Is it a problem with the PIT timing or the OSTimeDly function?
I am quite new with netburner hardware and I modified the PIT example from this page: http://www.netburner.com/support/resources/mod5213 to give me a 400Hz interrupt. My modifications are in the line: SetUpPITR( 1 /* Use PITR 1 */, 20735 /* Wait 16588 clocks */, 2/*
Divide by 2 from table 173 */ ); . I added also a line to keep the pitr_count in a pitrold and show me iprintf the difference between pitr_count and pitrold, which should be 400 for every second. Now my problem is that every about 60 seconds the difference for about 4 values off the difference is 399 instead of 400, like it misses an interrupt. If I change the frequency to the default in the example, it missis once at about 90 seconds and then is not doing it again. Anybody knows why and how should I avoid this? Is it a problem with the PIT timing or the OSTimeDly function?