bugAVR C Runtime Library - Bugs: bug #32551, util/delay.h delays longer than...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #32551: util/delay.h delays longer than they should be

Submitter:  Frank Zhao <frank26080115>
Submitted:  Mon 21 Feb 2011 06:01:31 AM UTC
   
 
Category:  Header Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Header files
Status:  Duplicate Assigned to:  None
Percent Complete:  0% Open/Closed:  Closed
Release:  1.7.0 Fixed Release:  1.6.1

Mon 21 Feb 2011 07:17:57 AM UTC, comment #4: 


>> Can I edit the bug report?


I don't think so. If this is the same issue, I am marking this a duplicate of bug30363. Please use avr-libc 1.7.1.

http://download.savannah.gnu.org/releases/avr-libc/avr-libc-1.7.1.tar.bz2

Closing the bug.

Anitha Boyapati <aboyapati>
Mon 21 Feb 2011 07:13:37 AM UTC, comment #3: 

Sorry I meant 4x shorter

Can I edit the bug report?

Frank Zhao <frank26080115>
Mon 21 Feb 2011 07:00:08 AM UTC, comment #2: 


Frank Zhao:

>>>>


An example of the problem is demonstrated by this forum post as well

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=100131&start=0

I have seen bug 30363 but it seems unrelated

<<<<

Something sounds very contradictory here.  Your comment says the delay is 4 times longer while the thread talks about delay being 4 times less. If the problem is related to the topic discussed in thread, then it is exactly referring to bug30363.

The output is 4 less because previous version of avr-libc ( < 1.7.0) used some algorithm where iterating through a loop takes 4 cpu cycles. The idea is to iterate through the loop delay/4 times so that required delay is achieved.

However in 1.7.0, the loop has been replaced with builtins which provide exact number of delay cycles. However the same parameter which was sent to the loop (double __tmp = ((F_CPU) / 4e3) * __ms;) was used. This was fixed in 1.7.1

Anitha Boyapati <aboyapati>
Mon 21 Feb 2011 06:35:24 AM UTC, comment #1: 

This is related to bug30363. AVR-Libc 1.7.1 version includes a fix for this.

Please follow: https://savannah.nongnu.org/bugs/?30363


Anitha Boyapati <aboyapati>
Mon 21 Feb 2011 06:01:31 AM UTC, original submission:  

Revision 2103 seems to have caused all delay functions in util/delay.h to last longer than they should, I think it's exactly 4 times longer. This affects MHV AVR Tools 20100815 (avr-libc version 1.7.0) and the AVR Toolchain provided with Atmel's AVR Studio 4.18 (avr-libc version 1.7.0). The last WinAVR package does not contain this problem (I think they used 1.6.4).

An example of the problem is demonstrated by this forum post as well

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=100131&start=0

I have seen bug 30363 but it seems unrelated

Frank Zhao <frank26080115>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by aboyapati (Posted a comment)
  • -email is unavailable- added by frank26080115 (Submitted the item)
  •  

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-02-21 aboyapati StatusNone Duplicate
        Open/ClosedOpen Closed
        Fixed ReleaseNone 1.6.1

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code