Hello!
I have been testing the attiny167 successfully for a few days, but today I have decided to try an external crystal at 16mhz, but it seems that the wiring library gives me a problem.
Do you know any solution?
.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”
.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”
Seems like you aren’t properly exposing the clock setup information to the build system.
Per GitHub - SpenceKonde/ATTinyCore: Arduino core for ATtiny 1634, 828, x313, x4, x41, x5, x61, x7 and x8 and this and Generic ATtiny167 — PlatformIO latest documentation you should be doing something like
[env:attiny167]
platform = atmelavr
board = attiny167
framework = arduino
board_build.f_cpu = 16000000L
build_flags =
-D CLOCK_SOURCE=1
or (17 for clock source per link) to expose the information of a 16MHz speed and running from an external crystal.
Note that you will also need to reprogram the fuses for switching the clock source.