1

I want to change the clock frequency of the Arduino Due. The default value of the main clock, according to the SAM micro-controller, is 4 Mhz. But I found in some forums that it is 84 Mhz. But I need to work with it at 16 Mhz. Hence, I need to access to the low-level clocks of the Due and change its operating clock frequency.

  1. How can I find the low-level registers of the Due in the Arduino IDE? Any header files for the Due to change its clocking?

  2. Is it possible to write code for the Arduino Due via Atmel Studio 7? When I tried compiling code in AS7, Chip.h was not found. How to avoid this? Is it possible with "micro" IDE in AS7? Can I access registers of the Due via AS7 and change its clocking?

  3. I cannot find the "sam" library in the Arduino IDE. Only avr is present. How can I find this sam library?

1

How can I find the low-level registers of the Due in the Arduino IDE? Any header files for the Due to change its clocking?

Read the datasheet / programming manuals for the chip. The Arduino Due is arranged to run at 84MHz.

I cannot find the "sam" library in the Arduino IDE. Only avr is present. How can I find this sam library?

Install it. The IDE is (fairly) modular these days.

But I have to ask... why do you want to run at 16MHz?

  • Sorry for the late post ! I am performing SPI and I want to change the clock frequency. My slave can maximum run at 16 mhz. I found a way to change the frequency by SPI.setClockDivider(21); this sets to 4 mhz for SPI. – kaya Mar 6 '18 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.