Comparison of Various Delay Methods (reproduced)

xiaoxiao2021-03-06  54

Comparison of Various Delay Methods (reproduced)

(1) RISC_SLEP_A_bit (n) - Accuracy Withnin ~ 13ns When N> 20. - Limitation: n

(2) "Bank3Safe" - Accuracy WITHIN BANK3 WS, ~ 100NS (Byte Access) - Usage Example: Void Foo (Void) {Volatile Unsigned Int * PTRDELAY = (unsigned int *) Bank3Safe;.. (Void) * PTRDELAY; / * DW Access = ~ 400ns (4 * 100) delay * /.

(3) UTIL_xxx_timer2_end () - accuracy is similar to risc_sleep_a_bit (), but intended for delays greater than ~ 1us - usage example:. (Please reference SERVO_delay_n_ms () in servos.c or VFD_schedule_state_change () in microvfd.c)

(4) "GLBTIMER" - Accuracy Withnin ~ 200ms - ~ 500ms Depending on Frequency of "Glbtimer" Checks.

NOTE: PURE "for" Loops Are Not Reliable Delay Methods Because of Cache Hit / Miss Inconsistencies.

转载请注明原文地址:https://www.9cbs.com/read-117995.html

New Post(0)