while 1
your_function();
end
The () is not necessary as there are no arguments, but I think they make the code easier to read.
There may be a better way, but it depends on the hardware. For example you might associate the function with a timer (see doc timer), or with a hardware interrupt.