delay()

Waiting for time by polling.

Waiting for time by polling.

void delay(uint32_t ms)

The program waits for a given period of time in ms.

The time is measured by the TickTimer count. When waiting for a long period of time, the CPU clock is decreased and polling is performed.

circle-info

Every 5ms after calling delay(), TWELITE microcontroller performs internal watchdog processing.

For example, if you execute while(1) delay(1);, the watchdog processing is not performed because 5ms does not elapse inside delay(), and the reset is executed after a certain time.

circle-exclamation

最終更新