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

millis() not working: Incorrect hardware timer defined for 14 and 20 pin devices in arduino.py #65

Open
objekt58325 opened this issue Jan 9, 2024 · 0 comments

Comments

@objekt58325
Copy link

On DD-series with 14 or 20 pins, TCB1 is the default millis timer (see https://github.com/SpenceKonde/DxCore/blob/master/megaavr/extras/Ref_Timers.md).
But in arduino.py the timer TCB2 is defined for all DxCore dvices.
ref: https://github.com/platformio/platform-atmelmegaavr/blob/aae69d4c9d317ef2e63e2e7ca89ba8ac5b85c6fb/builder/frameworks/arduino.py#L137C25-L137C25

One workaround is to define the millis()-timer in platformio.ini:

[env:AVR64DD20] 
board = AVR64DD20
board_hardware.millistimer = B1
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant