About FreeRTOS
Documentation
Security
Partners
Community
English
Download
GitHub
DOCUMENTATION
Overview
FreeRTOS quick start
Beginners guide
Overview
RTOS fundamentals
FreeRTOS kernel quick start guide
Build your first project
FreeRTOS libraries and 3rd party tools
FreeRTOS plus AWS solutions
Join the FreeRTOS community
Kernel
About the FreeRTOS kernel
FreeRTOS kernel
Quality management
Download FreeRTOS
DownloadFreeRTOS
Licensing
Kernel features
FreeRTOS Developer docs
Tasks and co-routines
Tasks and co-routines
Tasks overview
Task states
Task priorities
Task scheduling
Implementing a task
Co-routine overview
Co-routine states
Implementing a co-routine
Co-routine priorities
Scheduling co-routines
Limitations and restrictions
Co-routine example
Standard demo examples
Idle task
Thread local storage pointers
Queues mutexes and semaphores
Queues
Binary semaphores
Counting semaphores
Mutexes
Recursive mutexes
Direct to task notifications
Task notifications
As binary semaphore
As counting semaphore
As event group
As mailbox
Inter Task Communication
Stream and message buffers
RTOS stream and message buffers
Stream buffer example
Message buffer example
Software timers
Software timers
Timer service daemon task
Timer daemon configuration
One shot vs auto load
Resetting a timer
Event groups
Lower power support
Run time statistics
RTOS trace feature
Memory management
Memory management
Stack usage and stack overflow checking
Static vs Dynamic memory allocation
Static allocation demo
Blocking on multiple RTOS objects
Deferred interrupt handling
Hook functions
Symmetric multiprocessing introduction
Supported devices
Supported devices
FreeRTOS porting guide
Customization
Official vs 3rd party
Demos
Demo overview
Supported demos
Emulation and simulation
Emulation and simulation
Modifying demos
API references
Task creation
TaskHandle
xTaskCreate
xTaskCreateStatic
vTaskDelete
Task control
Task control
vTaskDelay
vTaskDelayUntil
xTaskDelayUntil
uxTaskPriorityGet
vTaskPrioritySet
vTaskSuspend
vTaskResume
xTaskResumeFromISR
xTaskAbortDelay
uxTaskPriorityGetFromISR
uxTaskBasePriorityGet
uxTaskBasePriorityGetFromISR
Task utilities
Task utilities
uxTaskGetSystemState
vTaskGetInfo
xTaskGetApplicationTaskTag
uxTaskGetStackHighWaterMark
xTaskCallApplicationTaskHook
vTaskSetApplicationTag
vTaskSetThreadLocalStoragePointer
pvTaskGetThreadLocalStoragePointer
vTaskSetTimeOutState
xTaskCheckForTimeOut
eTaskConfirmSleepModeStatus
RTOS kernel control
Kernel control
taskENTER CRITICAL taskEXIT CRITICAL
taskENTER CRITICAL FROM ISR taskEXIT CRITICAL FROM ISR
vTaskStartScheduler
vTaskEndScheduler
vTaskSuspendAll
xTaskResumeAll
vTaskStepTick
xTaskCatchUpTicks
Direct to task notifications
RTOS task notifications
xTaskNotifyGive
vTaskNotifyGiveFromISR
ulTaskNotifyTake
xTaskNotify
xTaskNotifyAndQuery
xTaskNotifyAndQueryFromISR
xTaskNotifyFromISR
xTaskNotifyWait
xTaskNotifyStateClear
ulTasknotifyValueClear
Queues
QueueManagement
xQueueCreate
xQueueCreateStatic
xQueueSend
xQueueSendFromISR
xQueueSendToBack
xQueueSendToBackFromISR
xQueueSendToFront
xQueueSendToFrontFromISR
xQueueReceive
xQueueReceiveFromISR
xQueueOverwrite
xQueueOverwriteFromISR
xQueuePeek
xQueuePeekFromISR
vQueueAddToRegistry
vQueueUnregisterQueue
pcQueueGetName
xQueueGetStaticBuffers
Queue sets
RTOS queue sets
xQueueCreateSet
xQueueCreateSetStatic
xQueueAddToSet
xQueueRemoveFromSet
xQueueSelectFromSet
xQueueSelectFromSetFromISR
Stream buffers
RTOS stream buffer API
xStreamBufferCreate
xStreamBufferCreateStatic
xStreamBufferSend
xStreamBufferSendFromISR
xStreamBufferReceive
xStreamBufferReceiveFromISR
vStreamBufferDelete
xStreamBufferBytesAvailable
xStreamBufferSpacesAvailable
xStreamBufferSetTriggerLevel
xStreamBufferReset
xStreamBufferIsEmpty
xStreamBufferIsFull
xStreamBufferResetFromISR
xStreamBufferGetStaticBuffers
uxStreamBufferGetStreamBufferNotificationIndex
vStreamBufferSetStreamBufferNotificationIndex
xStreamBatchingBufferCreate
xStreamBatchingBufferCreateStatic
Message buffers
RTOS message buffer API
xMessageBufferCreate
xMessageBufferCreateStatic
xMessageBufferSend
xMessageBufferSendFromISR
xMessageBufferReceive
xMessageBufferReceiveFromISR
vMessageBufferDelete
xMessageBufferSpacesAvailable
xMessageBufferReset
xMessageBufferIsEmpty
xMessageBufferIsFull
xMessageBufferResetFromISR
xMessageBufferGetStaticBuffers
Semaphore and Mutexes
Semaphores
xSemaphoreCreateBinary
xSemaphoreCreateBinaryStatic
vSemaphoreCreateBinary
xSemaphoreCreateCounting
xSemaphoreCreateCountingStatic
xSemaphoreCreateMutex
xSemaphoreCreateMutexStatic
xSemaphoreCreateRecursiveMutex
xSemaphoreCreateRecursiveMutexStatic
xSemaphoreGetMutexHolder
uxSemaphoreGetCount
xSemaphoreTake
xSemaphoreTakeFromISR
xSemaphoreTakeRecursive
xSemaphoreGive
xSemaphoreGiveRecursive
xSemaphoreGiveFromISR
vSemaphoreDelete
Software timers
FreeRTOS Software Timer API Functions
xTimerCreate
xTimerIsTimerActive
xTimerStart
xTimerStop
xTimerChangePeriod
xTimerDelete
xTimerReset
xTimerStartFromISR
xTimerStopFromISR
xTimerChangePeriodFromISR
xTimerResetFromISR
pvTimerGetTimerID
vTimerSetReloadMode
vTimerSetTimerID
xTimerPendFunctionCall
xTimerPendFunctionCallFromISR
pcTimerGetName
xTimerGetPeriod
xTimerGetExpiryTime
xTimerCreateStatic
xTimerGetReloadMode
Event groups or flags
Event groups
xEventGroupCreate
xEventGroupCreateStatic
vEventGroupDelete
xEventGroupWaitBits
xEventGroupSetBits
xEventGroupSetBitsFromISR
xEventGroupClearBits
xEventGroupClearBitsFromISR
xEventGroupGetBits
xEventGroupGetBitsFromISR
xEventGroupSync
xEventGroupGetStaticBuffer
FreeRTOS MPU specific
FreeRTOS MPU specific
xTaskCreateRestricted
xTaskCreateRestrictedStatic
vTaskAllocateMPURegions
portSWITCH TO USER MODE
Co-routines
Co-routine API
xCoRoutineCreate
crDELAY
crQUEUE SEND
crQUEUE RECEIVE
crQUEUE SEND FROM ISR
crQUEUE RECEIVE FROM ISR
vCoRoutineSchedule
RTOS implementation tutorial
RTOS implementation
Building blocks
Building blocks
C development tools
The RTOS tick
GCC signal attribute
GCC naked attributes
FreeRTOS tick code
The AVR context
Saving the RTOS task context
Restoring the context
Tick Resolution
Detailed example
Putting it all together
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
Coding guidelines
Source code organization
FreeRTOS Coding Standard and Style Guide
Books and manual
RTOS book
Code examples
Zip files
Libraries
Library overview
All libraries
LTS libraries
LTS libraries
More about LTS
Licensing
FreeRTOS plus
Introduction
FreeRTOS plus TCP
FreeRTOS Plus TCP
Networking basics
Networking basics
Ethernet addressing
MTU
Internet protocol
IP address
ARP
Subnet
Router
UDP
TCP
MSS
Port number
Sockets
Binding
Client and servers
Static IP address
DHCP (IPv4)
DHCPv6
Name resolution
DNS
mDNS
LLMNR
NetBIOS
ND
Endian
ICMP
ICMPv6
RA
Multiple interface
Multiple interfaces
IPv6 functionality
IPv6 multi functions
Tutorial
TCP networking tutorial
Source code organization
Including in a project
Initialization
Creating TCP sockets
Sending TCP data
Receiving TCP data
Closing a TCP socket
Creating a UDP socket
Sending UDP data
Sending UDP data zero copy
Receiving UDP data
Receiving UDP data zero copy
Initialising the TCP/IP Stack
Receiving Data Using a TCP Socket (zero copy interface)
Sending Data Using a TCP Socket (zero copy interface)
Buffer management
Configuration
Configuration examples
Trace macros
API reference
FreeRTOS plus TCP APIs
FreeRTOS_socket
FreeRTOS_bind
FreeRTOS_connect
FreeRTOS_listen
FreeRTOS_accept
FreeRTOS_send
FreeRTOS_sendto
FreeRTOS_recv
FreeRTOS_recvfrom
FreeRTOS_setsockopt
FreeRTOS_shutdown
FreeRTOS_closesocket
FreeRTOS_select
FreeRTOS_CreateSocketSet
FreeRTOS_FD_SET
FreeRTOS_FD_CLR
FreeRTOS_FD_ISSET
FreeRTOS_gethostbyname
FreeRTOS_inet_ntoa
FreeRTOS_inet_addr_quick
FreeRTOS_inet_addr
htons ntohs htonl ntohl
FreeRTOS_outstanding
FreeRTOS_recvcount
FreeRTOS_issocketconnected
FreeRTOS_GetLocalAddress
FreeRTOS_GetRemoteAddress
FreeRTOS_maywrite
FreeRTOS_IPInit
FreeRTOS_IPInit_Multi
FreeRTOS_GetAddressConfiguration
FreeRTOS_GetUDPPayloadBuffer
FreeRTOS_ReleaseUDPPayloadBuffer
FreeRTOS_SendPingRequest
FreeRTOS_GetMACAddress
FreeRTOS_GetIPAddress
FreeRTOS_GetIPType
FreeRTOS_SetGatewayAddress
FreeRTOS_GetDNSServerAddress
FreeRTOS_GetNetmask
FreeRTOS_OutputARPRequest
FreeRTOS_IsNetworkUp
FreeRTOS_AllEndPointsUp
FreeRTOS_IsEndPointUp
FreeRTOS_SetAddressConfiguration
FreeRTOS_SetEndPointConfiguration
FreeRTOS_GetGatewayAddress
FreeRTOS_SetIPAddress
FreeRTOS_SetNetmask
FreeRTOS_SignalSocket
FreeRTOS_FillEndPoint
FreeRTOS_FillEndPoint_IPv6
eApplicationProcessCustomFrameHook
pcApplicationHostnameHook
vApplicationIPNetworkEventHook
vApplicationIPNetworkEventHook_Multi
vApplicationPingReplyHook
xApplicationDHCPHook
xApplicationDNSQueryHook
ulApplicationGetNextSequenceNumber
xApplicationGetRandomNumber
xApplicationDHCPHook_Multi
xApplicationDNSQueryHook_Multi
FreeRTOS_getaddrinfo
FreeRTOS_getaddrinfo_a
FreeRTOS_rx_size
FreeRTOS_gethostbyname_a
Porting
FreeRTOS TCP Porting
Embedded Compiler Porting
Embedded Ethernet Porting
Porting API
Network interface functions
FreeRTOS_AddNetworkInterface
pxGetNetworkBufferWithDescriptor
vReleaseNetworkBufferAndDescriptor
pucGetNetworkBuffer
vReleaseNetworkBuffer
eConsiderFrameForProcessing
xSendEventStructToIPTask
FreeRTOS_FirstEndpoint
FreeRTOS_MatchingEndpoint
FreeRTOS_NextEndpoint
Demos
TCP FAT demo projects
Basic file use
Basic stdio API test
Creating a disk
File system CLI
FTP server
HTTP web server
FreeRTOS plus TCP licensing
FreeRTOS plus CLI
FreeRTOS plus CLI
Implementing a command
Command parameters
Registering a command
Calling the interpreter
A FreeRTOS plus CLI task
Buffer management
Demos
FreeRTOS plus IO
FreeRTOS Plus IO
Quick examples
API references
FreeRTOS IO API Functions
FreeRTOS open
FreeRTOS read
FreeRTOS write
FreeRTOS ioctl
Transfer modes
Polled Transfer Mode
Zero Copy Transfer Mode
Circular Buffer Transfer Mode
Character Queue Transfer Mode
Demos
NXP LPC1769 Demo Description
FreeRTOS Plus IO License
FreeRTOS Plus IO Configuration
backoff algorithm
FreeRTOS plus Trace
Tracealyzer™
Percepio View for FreeRTOS
FreeRTOS-Plus-Trace and FreeRTOS-Plus-CLI Demo
FreeRTOS core
Introduction
coreMQTT
coreMQTT
MQTT terminology
Demos
coreMQTT demo
coreMQTT demo LTS
Mutual authentication
Keep Alive demo
coreMQTT agent
coreMQTT agent
coreMQTT agent demo
coreMQTT agent API reference
coreHTTP
coreHTTP
coreHTTP terminology
coreHTTP demos
coreHTTP demo
Mutual authentication
Basic S3 upload demo
Basic S3 download demo
Multithreaded demo
coreSNTP
coreSNTP
coreSNTP terminology
Setting up an NTP server
coreSNTP demo
coreSNTP API reference
Transport Interface
Transport interface
TLS introduction
TLS terminology
X509 certificates
coreJSON
coreJSON
coreJSON terminology
corePKCS11
corePKCS11
PKCS11 functions
corePKCS11 demos
Mutual authentication demo
Management and RNG demo
Mechanisms and Digests demo
Objects demo
Sign and verify demo
Cellular interface
Cellular interface
Porting guide
Cellular interface demo
ZTP demo
Cellular interface API reference
Logging
coreMQTT File Streams
coreMQTT File Streams
coreMQTT agent API reference
coreSNTP API reference
Cellular interface API reference
AWS libraries
Introduction
AWS IoT OTA
AWS IoT OTA
OTA terminology
MQTT demo
HTTP demo
AWS IoT Device Shadow
AWS IoT device shadow
Design for named shadow support
Shadow terminology
Device shadow demo
AWS IoT Device Shadow Library
AWS IoT Jobs
AWS IoT jobs
Jobs terminology
Jobs demo
AWS IoT Jobs Client Library
AWS IoT Device Defender
AWS IoT device defender
Device defender demo
Demo with MQTT agent
AWS IoT Device Defender Client Library
AWS IoT Fleet Provisioning
AWS IoT fleet provisioning
Fleet provisioning terminology
Fleet provisioning demo
AWS IoT Fleet Provisioning Library
AWS Signature Version 4
AWS signature version 4
SigV4 terminology
HTTP S3 download demo
AWS SigV4 Library
AWS reference integrations
AWS IoT Device Shadow Library
AWS IoT Jobs Client Library
AWS IoT Device Defender Client Library
AWS IoT Fleet Provisioning Library
AWS SigV4 Library
FreeRTOS labs
Introduction
LoRaWAN
LoRaWAN library
LoRaWAN API reference
LoRaWAN demo
FreeRTOS plus POSIX
Introduction
API Reference
API Reference
errno.h
fcntl.h
mqueue.h
pthread.h
sched.h
semaphore.h
signal.h
sys/types.h
time.h
unistd.h
FreeRTOS+POSIX Demo
FreeRTOS plus FAT
FreeRTOS plus FAT
Source code organization
Configuration
Standard API errno values
Standard File System API
FreeRTOS MCUBoot
Task pool
Task pool library
Task pool demo
Logging
Modular over the air updates
Over the air updates
Demos
OTA (Using Simple OTA Orchestrator)
OTA (Using OTA Agent Orchestrator)
Featured integrations
Featured integrations
Espressif ESP32 C3
ARM corstone 3xx
NXP i.MX RT1060
ST Microelectronics STM32U5
STM32 Expresslink integration
Roadmap and release note
Roadmap
Release notes
Release history
FreeRTOS V8
FreeRTOS V9
FreeRTOS V10
FreeRTOS V10.3.0
FreeRTOS V10.4.x
FreeRTOS V10.4.5
FreeRTOS V10.4.6
FreeRTOS V10.5.0
Kernel
FreeRTOS MPU specific
Updated Jun 2025
FreeRTOS-MPU Specific Functions
Modules
xTaskCreateRestricted()
vTaskAllocateMPURegions()
portSWITCH_TO_USER_MODE()
On this page
Modules
Related links
Why use FreeRTOS