AVR C Runtime Library - Bugs: bug #33858, in avr/power.h,...
You are not allowed to post comments on this tracker with your current authentication level.
bug #33858: in avr/power.h, clock_prescale_set() not defined for mega328
| Submitter: | Galen Seitz <galens> | ||
| Submitted: | Mon 25 Jul 2011 10:53:52 PM UTC | ||
| Category: | Library | Severity: | 3 - Normal |
| Priority: | 5 - Normal | Item Group: | Header files |
| Status: | Fixed | Percent Complete: | 100% |
| Assigned to: | arcanum | Open/Closed: | Closed |
| Release: | 1.7.* | Fixed Release: | 1.8.0 |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
Follow 5 latest changes.
| Date | Changed by | Updated Field | Previous Value | => | Replaced by |
|---|---|---|---|---|---|
| 2011-09-26 | arcanum | Status | None | Fixed | |
| Percent Complete | 0% | 100% | |||
| Assigned to | None | arcanum | |||
| Open/Closed | Open | Closed | |||
| Fixed Release | None | 1.8.0 |

In the include file avr/power.h, clock_prescale_set() is defined for the mega328P, but not for the mega328. As far as I can tell from the ATmega48A/PA/88A/PA/168A/PA/328/P datasheet(Rev. 8271DAVR05/11), CLKPR is a valid mega328 register.
Patch should be as simple as adding
|| defined(_AVR_ATmega328_) \
at line 1387 in r2245, just before the test for _AVR_ATmega328P_.
thanks,
galen