We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5fd49b commit 0a5601cCopy full SHA for 0a5601c
src/runtime/runtime_atsamd21.go
@@ -261,9 +261,12 @@ func ticks() timeUnit {
261
// ticks are in microseconds
262
func timerSleep(ticks uint32) {
263
timerWakeup.Set(0)
264
- if ticks < 30 {
265
- // have to have at least one clock count
266
- ticks = 30
+ if ticks < 214 {
+ // due to around 183us delay waiting for the register value to sync, the minimum sleep value
+ // for the SAMD21 is 214us.
267
+ // For related info, see:
268
+ // https://community.atmel.com/comment/2507091#comment-2507091
269
+ ticks = 214
270
}
271
272
// request read of count
0 commit comments