wfi

wfi

RISC-V Assembly Reference

lyszt.net covers wfi and other RISC-V instructions in more detail.

Description

Pauses the hart until work arrives. In wfi, execution stops until an interrupt becomes pending, and the interrupt then proceeds through its normal handling. Idle loops use it to wait without burning power.