SAMD21 clock config and gpio

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hey there, as I'm moving on with the SAMD21 I got confused with the clocks after reading the manual's chapters on PM, SYSCTRL and GCLK. Long story short, I configured my SAMD21 to run at 48 MHz, and I can see a 48Mhz signal on GLOCK_IO0. In the while loop I let the chip toggle a pin. The pin toggles with a frequency 4 MHz, which corresponds to the frequency of OC8M. The question is, is the gpio realy that slow, or am I feeding the wrong source clock to the gpio. I checked the prescalers and everything is set for maximum frequency.

Attachment(s): 

This topic has a solution.
Last Edited: Sun. Nov 12, 2017 - 01:43 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

12 cycles for a pin toggle loop doesn't seem too far out of line, depending on the actual code... don't forget memory wait states.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, so that "slow" toggling frequency seems to normal behaviour.

Last Edited: Sun. Nov 12, 2017 - 01:43 PM