Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change CPU frequency on attiny85 fails to compile in 3.3.0 #255

Closed
5e3 opened this issue Apr 24, 2021 · 3 comments
Closed

Change CPU frequency on attiny85 fails to compile in 3.3.0 #255

5e3 opened this issue Apr 24, 2021 · 3 comments

Comments

@5e3
Copy link

5e3 commented Apr 24, 2021

In 3.2.0 it was possible to set
board_build.f_cpu = 16000000L

In 3.3.0 compiling fails with:
Compiling .pio\build\attiny85\FrameworkArduino\wiring_shift.c.o
C:\Users\xxx.platformio\packages\framework-arduino-avr-attiny\cores\tiny\wiring.c: In function 'init':
C:\Users\xxx.platformio\packages\framework-arduino-avr-attiny\cores\tiny\wiring.c:1095:8: error: #error "Frequency requested from internal oscillator that cannot be generated by prescaling"
#error "Frequency requested from internal oscillator that cannot be generated by prescaling"
^~~~~
C:\Users\xxx.platformio\packages\framework-arduino-avr-attiny\cores\tiny\wiring.c:1096:8: error: #error "Custom tuning is not supported in the current version of ATTinyCore"
#error "Custom tuning is not supported in the current version of ATTinyCore"
^~~~~

The code I'm compiling depends on the 16MHz PLL clock.

@valeros
Copy link
Member

valeros commented Apr 26, 2021

Hi @5e3 ! In the latest release the ATTinyCore was updated to the latest v1.5.2, so something may have changed in the internal implementation. Anyway, the error message seems quite descriptive. Does it work in the Arduino IDE?

@5e3
Copy link
Author

5e3 commented Apr 26, 2021

Hi @valeros

Don't know - I didn't try. But if I set

build_flags = -DCLOCK_SOURCE=6

in platformio.ini it seems to resolve the issue...

@r4wabr
Copy link

r4wabr commented Aug 14, 2021

define the F_CPU: beetwine #include <Arduino.h>
#define F_CPU 16000000UL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants