Page 1 of 1
FreeRTOS Queue in __NOINIT
Posted: Fri Nov 12, 2021 12:17 am
by urbanze
Hello Guys! How can I use FreeRTOS Queue inside __NOINIT section?
Im building ring buffer with Queue and want to keep values after software restart, but how to tell to 'xQueueCreate()' to not "reinit" or not "fill with zeros"?
Just put __NOINIT_ATTR QueueHandle_t queue; not work (maybe because queueCreate()) .
Re: FreeRTOS Queue in __NOINIT
Posted: Tue Feb 01, 2022 12:15 am
by urbanze
Any one can help me? I need queue inside rtc_ram (NOINIT) to create temp buffers
Re: FreeRTOS Queue in __NOINIT
Posted: Tue Feb 01, 2022 1:20 am
by ESP_Sprite
Not sure if that's possible... if I recall my FreeRTOS internals correctly, queues have things like pointers to other FreeRTOS structures inside. Even if you find a way to simply blindly restore the memory used, those pointers may not be valid after you've restarted your program.
Re: FreeRTOS Queue in __NOINIT
Posted: Wed Feb 02, 2022 1:44 am
by urbanze
ESP_Sprite wrote: ↑Tue Feb 01, 2022 1:20 am
Not sure if that's possible... if I recall my FreeRTOS internals correctly, queues have things like pointers to other FreeRTOS structures inside. Even if you find a way to simply blindly restore the memory used, those pointers may not be valid after you've restarted your program.
Thanks Sprite! Im going to create a ring buffer class and check if it works, instead of using Queues.