Adding Clock and Clock Generator Options for atmel_sam0 #36649
Labels
area: Clock Control
Enhancement
Changes/Updates/Additions to existing features
platform: Microchip SAM
Microchip SAM Platform (formerly Atmel SAM)
I am interested in improving the atmel sam0 drivers so they provide better ability to adjust the clock. The challenge with this set of chips (I have worked on the samd21 and the samd51) is that you have a variety of clock sources (crystals, oscillators, DFLL, DPLL) that can run at a variety of frequencies and then you tie those to clock generators that can be connected to the different peripherals. In my current design I run off a 20 MHz external oscillator but run my peripherals at 5 MHz. The current code uses CONFIGS added to the fork of the zephyr code. The hard part is if you tried to add CONFIGS for all options it will explode. One option would be to do like what is done in pinmux.c where you set the appropriate pin/peripheral mux. This isn't ideal but it is better than making changes to the zephyr code and ties it to the board. I am sure this has been discussed before so just curious what people currently do and if there is any solid options for handling the clock options?
The text was updated successfully, but these errors were encountered: