Delay timing is incorrect when using DFLL48M

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


I'm trying to come up to speed, so to speak, on how clocks work with the ATSAM processors. I made a board using the SAME51. I am using a 32.748 kHz crystal to create my CPU clock. This is my settings in Atmel Start:

 

 

The problem I am having is that when I use the delay_ms() function, the actual delay is 3x the length of what I asked for. For example, if I say delay_ms(1000), the actual delay is about 3 seconds. What am I missing?

 

Thanks,

Osman

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

I'm experiencing a similar problem with DPLL0. Did you get a fix for it? Will post if I make any progress.

 

EDIT: The solution for me was that I hadn't initialised the delays using Systick: 

delay_init(SysTick);

 See here for where I found the solution.

Last Edited: Wed. Dec 8, 2021 - 01:35 PM