Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Create a periodic thread to execute a task every 1 second.
void periodic_task(void *arg1, void *arg2, void *arg3)
{
while(1) {
printk("Periodic task running\n");
k_sleep(K_SECONDS(1));
}
}
K_THREAD_DEFINE(periodic_thread, 1024, periodic_task, NULL, NULL, NULL, 7, 0, 0);Zephyr RTOS is a scalable, open-source real-time operating system designed for resource-constrained embedded devices. It provides a small, configurable kernel, drivers, and networking stacks to enable IoT, wearable, and sensor-based applications with predictable timing and low memory footprint.
Origin & Creator
Initially developed by Wind River and now governed by the Linux Foundation, Zephyr was created to provide a lightweight, open-source RTOS for embedded devices and IoT applications.
Industrial Note
Critical for embedded developers who require a deterministic, low-memory RTOS for safety-critical, battery-powered, or connected devices, enabling rapid development and robust device behavior.