I’m looking into underclocking the sodaq autonomo. With an AVR based chip I would just use change the clockspeed in boards.txt and set clock_prescale_set to prescale the clock. How could we do this with the sodaq autonomo (since the AVR/power library is not available)?
If you look in the folder where the Sodaq board variant files are installed, you will find a folder /cores/arduino. In the file startup.c with a method SystemInit(). This method is called automatically when the board is reset (for any cause), and it is where the clocks are configured.
The current setup configures the DFLL which runs at 48MHz and supplies the main clock GCLK0. There is also an 8MHz source, and these can be divided/prescaled as well. I believe the default after a power on reset is: GCLK0 uses the OSC8M / 8 for a 1MHz clock.
I’m not sure what benefits there are with underclocking the board?
Thanks Gabriel! I was/am curious to see how underclocking the board will affect power consumption. I’ll have a look at this soon