Adventures in TinyAVR 1-Series

I tested with a bench PSU, it flashes without errors down to VCC = 1.9V, at 1.8V it reads the device but fails at erasing.

I just pushed a few changes to my Anduril2 branch:

  • Switched to 10 MHz clock and Phase-Correct (dual slope) PWM instead of Fast (single slope) PWM at 5 MHz. This results in the same effective PWM speed: 19.6 kHz in the upper ranges, down to 4.9 kHz in the lowest modes (due to the dynamic underclocking mechanism).
  • Added some documentation to the PWM setup code including a some instructions and a link to the datasheet
  • Instead of Factory Reset forcing a thermal offset to assume an ambient temperature of 21°C, a Factory Reset for the 1-Series will clear any user-set thermal offset since the internal sensor is factory calibrated.

Nice!

  • phase correct allows for full on and full off PWM, are there other advantages ? For drivers where we use the filtered PWM signal it’s not really an issue to have 1/resolution-1 as the min/max, and running the MCU slower saves power so if there are no other advantages then fast PWM is preferable.
  • :+1:
  • :+1:

edit :

Not relevant for us then.

I’m not aware of other benefits, it’s mostly to just get the Full-On and Full-Off signals.

For the drivers with a filtered PWM signal, you can still use Single Slope (Fast) when setting up the PWM in hwdef. And in the config file, just set the QUATERSPEED_LEVEL and HALFSPEED_LEVEL really high so that the MCU is running underclocked most all of the time. At least that’s the easiest thing I can think of at the moment.

Haven’t checked the datasheet, but what’s the required voltage and power consumption for the higher clock? Could it be an issue?

That’s possible. I don’t have a bench power supply and scope to really say for sure. The datasheet says 10 MHz is good down to 2.7 volts.

Look at section 37. Power consumption is more or less linear, but even at 10 MHz only 4 mA, so not worth to think about it. :slight_smile:

Thanks, I’ll do that.

Another question :
Is it possible to change the internal reference voltage in the hwdef file ? Using 2.5V instead 1.1V allows to use a divider with the same values, it’s a small detail but reducing the amount of different resistor values is always a good thing.

Not without some code modifications. In “fsm-adc.c” you’ll see a reference to VREF_ADC0REFSEL_1V1_gc. For a one-off build you could change that value, or the code could be updated to read that register from a #define … but that’s still a code change, simple though it may be.

Yeah I saw that line but I imagined it might need some change to allow to do it in hwdef. We’ll I’m already using modified Anduril files so I might as well change it in fsm-adc.
Thanks.

I check the availability of the 1616 from time to time, on 17/06/21 there was :

Mouser : 82 expected for 17/07/21
Farnell : 6004 expected for 28/07/21
Digikey : 1545 expected for 25/06/21

Today :
Mouser : 12000 for 03/22
Farnell : 1079 for 14/07/21, more for 06/22
Digikey : 2830 for 24/09/21, 8200 for 01/22

Ugh. Thankfully my Mouser order I placed in February is en route to Mouser (from the manufacturer) with the expectation for it to ship in July. Fingers crossed.

Same for me, I ordered when there was 82 left for the arrival in July.

yay progress!
Looking forward to the AA compatible driver for my FWAA :wink:

That’s unlikely. I doubt there’s enough room in there for a boost driver for the lower voltage support.

It’s a bit of a different situation than the SP10S, which already had a working driver with the wrong UI/MCU.

ok, thanks for the extra details…
I did not realize the Sofirn is uniquely Boosted

In that case, I will not be waiting to inhale :beer:

I failed to build the Hex file for RampingIOS-ConvoyH1 by Atmel Studio 7. It showed four errors

  1. RampingIOS-ConvoyH1_T412.elf section ‘.text’ will not fit in region ‘text’
  2. region ‘text’ overflowed gy 72 bytes
  3. recipe for target ‘RampingIOS-ConvoyH1_T412.elf’ failed
  4. ld returned 1 exit status
    Did I miss some setting to optimize the code build?

I don’t know if you missed optimizing, you can check. Right click on your solution in solution explorer, select properties and check your optimization settings:

If it’s not this I wouldn’t know.

Thankyou Sir,
The problem was solved. My original setting was -Og. I changed to -Os, The Hex code was complied successfully.

thefreeman - is your 5 amp linear (CC ?) 1616 driver working? Very much interested. If so, I can try updating the files to OSHPark to run off copies. Let me know.