Rick, I made one more change regarding 'clock_gettime()' : I moved clearing of timer interrupt flag after call of the timer callback so waiting loop in clock_gettime() (wait for timer ISR completed in case when QTB_TCF == 1 ( timer interrupt pending)) will work correctly and returns really after timer callback was called. Please, look to attached file... Regarding Motorola 'bug report policy' : NO COMMENT... Richard Kis > -----Original Message----- > From: Corey, Rick [mailto:] > Sent: Wednesday, October 23, 2002 5:56 PM > To: Richard Kis > Subject: RE: [motoroladsp] Use of clock_gettime() on DSP56F807 > Richard, > > Thanks for the warning and fix for clock_gettime() on the > '807. We may have > to check that out for use with the 56803. > > I was told by one Motorola guy that the people in his group are not > *allowed* to work on fixes unless they are submitted through > the website. > They have to get some official number assigned, and then they > can spend time > on it. > > He was very clear that, if it was "just Email", he couldn't > spend time on > it. > > I wonder why there is no Motorola guy assigned to reading > about critical > bugs in "just Email", and entering them "officially" on the > Moto website > under Tech Support or Service Request. > > One must "register" and "login" in order to place a service > request (or > report a bug). > > The link is: > > http://e-www.motorola.com/support/index.html > Rick Corey > -----Original Message----- > From: Richard Kis [mailto:] > Sent: Thursday, October 10, 2002 2:50 AM > To: Aaron Needles; > Subject: RE: [motoroladsp] Use of clock_gettime() on DSP56F807 > > I have the same experience. I found THREE (!) different problems in > clock_gettime() function. Each can cause wrong > clock_gettime() returns. > I sent a 'bug report' to Motorola already, but (of course) without any > answer. Report is attached to this mail, you can find a fix there. > > Richard Kis > > > > -----Original Message----- > > From: Aaron Needles [mailto:] > > Sent: Wednesday, October 09, 2002 5:47 PM > > To: > > Subject: [motoroladsp] Use of clock_gettime() on DSP56F807 > > > > > > Hi, > > I'm attempting to use the "Real Time Clock" feature in > Motorola's > > DSP but am getting inconsistent time values returned when I call > > clock_gettime() successively. > > > > The code below was added to a project created with "Embedded SDK > > Stationary" and only the INCLUDE_TIMER #define added to > appconfig.h. > > When I run the code on our DSP56F807EVM via External RAM and then > > display timeBuf[] as variable with value as hexadecimal, I get the > > following (summarized)... > > > > Idx Value > > 0 0x0EE6B9D8 > > 1 0x0EE7AE23 > > 2 0x0EE7A26E > > ... > > 15 0x0EE70A3D > > 16 0x0EE6FE88 > > 17 0x0EE6F2D3 > > ... > > 198 0x0EE7ABDA > > 199 0x0EE7A025 > > > > I was expecting a smoothly increasing integer count > representing time > > elapsed in nanoseconds. Has someone used the > clock_gettime() function > > sucessfully? I am using current versions of CodeWarrior+patch and > > Motorola's SDK (2.5) > > > > Thanks in advance, > > Aaron > > > > Aaron Needles > > Senior Software Engineer > > Alstom Schilling Robotics > > > > > > > > /* File: main.c */ > > > > #include "timer.h" > > > > /******************************************************* > > * Skeleton C main program for use with Embedded SDK > > *******************************************************/ > > > > #define NUM_ITERATIONS 200 > > unsigned long timeBuf[NUM_ITERATIONS]; > > > > void main (void) > > { > > int i; > > struct timespec thisTime; > > struct timespec timeDelay = {0, 250000000}; // 1/4 sec > > > > // This is an attempt to allow the clock to > synchronize/stabalize. > > // I don't believe it makes any difference. > > nanosleep(&timeDelay, NULL); > > > > // Just in case... > > for (i=0; i<NUM_ITERATIONS; i++) { > > timeBuf[i] = 0; > > } > > > > for (i=0; i<NUM_ITERATIONS; i++) { > > archDisableInt(); > > clock_gettime(CLOCK_REALTIME, &thisTime); > > asm(nop); > > asm(nop); > > asm(nop); > > asm(nop); > > asm(nop); > > asm(nop); > > asm(nop); > > > > // Save time > > timeBuf[i] = thisTime.tv_nsec; > > archEnableInt(); > > } > > > > while (1) { > > // Set breakpoint on asm(nop). Read timeBuf[] values after break > > asm(nop); > > } > > return; /* C statements */ > > } > > > > > > ------------------------ Yahoo! Groups Sponsor > > ---------------------~--> > > Plan to Sell a Home? > > http://us.click.yahoo.com/J2SnNA/y.lEAA/MVfIAA/PNArlB/TM > > -------------------------- > > -------~-> > > > > _____________________________________ > > Note: If you do a simple "reply" with your email client, only > > the author of this message will receive your answer. You > > need to do a "reply all" if you want your answer to be > > distributed to the entire group. > > > > _____________________________________ > > About this discussion group: > > > > To Join: > > > > To Post: > > > > To Leave: > > > > Archives: http://www.yahoogroups.com/group/motoroladsp > > > > More Groups: http://www.dsprelated.com/groups.php3 > > > > > > ">http://docs.yahoo.com/info/terms/ > > > > > > > > > > ------------------------ Yahoo! Groups Sponsor > ---------------------~--> > Home Selling? Try Us! > http://us.click.yahoo.com/QrPZMC/iTmEAA/MVfIAA/PNArlB/TM > -------------------------- > -------~-> > > _____________________________________ > Note: If you do a simple "reply" with your email client, only > the author of > this message will receive your answer. You need to do a > "reply all" if you > want your answer to be distributed to the entire group. > > _____________________________________ > About this discussion group: > > To Join: > > To Post: > > To Leave: > > Archives: http://www.yahoogroups.com/group/motoroladsp > > More Groups: http://www.dsprelated.com/groups.php3 > ">http://docs.yahoo.com/info/terms/ > | |||
|