[riot-notifications] [RIOT-OS/RIOT] drivers/sx127x: fix device reset (#11678)

MichelRottleuthner notifications at github.com
Wed Jun 12 10:06:47 CEST 2019


MichelRottleuthner commented on this pull request.



>  
-    /* Wait 1 ms */
-    xtimer_usleep(1000);
+    /* Wait for at least 100 µs */
+    xtimer_usleep(110);

not strictly. My reasoning here was: the datasheet says 'at least'. For the manual reset before there was 1 ms sleep instead of the specified 'at least 100 µs' and a 10 ms sleep instead of 'at least 5 ms' - effectively multiplying by 10 and doubling what the datasheet is specifying. I didn't want to arbitrarily multiply the time but rather add a reasonable safety margin to ensure that the sleep is enough. I defined 'reasonable' by assuming that even a very bad oscillator should always stay within 10 percent. I'd also be happy to decrease this a little bit - but for a default value I'd rather stick to "better safe than sorry". In the future we should use some kind of board/cpu param to provide information on (worst case) timer/oscillator acurracy.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11678#discussion_r292790382
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190612/86db2ef4/attachment.html>


More information about the notifications mailing list