Anyone who used FreeRTOS before can suggest me a good documentation for it
Anyone who used FreeRTOS before can suggest me a good documentation for it
10 Replies
specially for those basic apis
download the freertos book from freertos.org
It has a complete breakdown of all the features and helps yiu get started from scratch. That way you will be able to use it it in many contexts.
Yu can also check the official FreeRTOS website's API reference page. Its easy to quickly look up individual functions and examples
There are even some demo projects provided in FreeRTOS, they will show how the basic APIs like task creation, delays, and how semaphores work in real applications
also atomic keywords provides thread safety in FreeRTOS too or we have to use MUTEX?
mutual exclusion isn’t really the same as atomicity. You woll use atomic keywords when you want an operation to be done all at once or none at all. Something like a database transaction. And you will use mutexes when you need to share but only one user of the resource at a time
I know that but atomicity can prevent the abnormal behaviour of a variable if multiple task want to access it
like prevent context switching in between an operation of a atomic variable
When when you want atomicity for a single variable or one flag you can use the atomic keywords. context switching really applies when you have a longer operation that you dont want interrupted. Whereas atomic is for simpler data types