Open second-string opened 5 months ago
Maybe it has something to do with this announcement from March '23
https://github.com/SpenceKonde/megaTinyCore/discussions/928
I just tested on both Github and Boards Manager version of MTC and get the same what you get. As you seem to have passed the complex hurdle of beating TCD into submission, I would stick with your second approach for now.
Yeah I'm all set, it's a simple one-off little project. Just raising the issue here in case it wasn't known. The version of megaTinyCore that I have installed is from before that post. Actually I'm not sure what version it is, so maybe it's been fixed since honestly.
Yeah it seems that it isn't passing one of the params it needs to...
The default implementation does not correctly configure TCD0 to output PWM on pin PA6 for the ATtiny 412. I went fairly deep into the megaTinyCore source code and I'm guessing something isn't configured correctly with the different #defined macros, because it seems to be defaulting to the "pwm not available on this pin" path in the code instead of using TCD0, which is available.
Code to reproduce
Board: ATtiny412/402/212/202 Chip: ATtiny412 Clock speed: 20MHz internal (also tried with 1MHz internal) millis/micros timer: Default, which I believe is TCD0 on this chip (also tried with TCB0 and TCA)
I can properly configure TCD manually to output with WOA on PA6
Code that works
Same chip settings as above
Not sure if I'm doing something wrong with the setup/config, or if it's a megatinycore issue. Happy to test any changes out on my board if needed.