FreeRTOS Queue in __NOINIT

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

FreeRTOS Queue in __NOINIT

Postby urbanze » Fri Nov 12, 2021 12:17 am

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()) .

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: FreeRTOS Queue in __NOINIT

Postby urbanze » Tue Feb 01, 2022 12:15 am

Any one can help me? I need queue inside rtc_ram (NOINIT) to create temp buffers

ESP_Sprite
Posts: 9746
Joined: Thu Nov 26, 2015 4:08 am

Re: FreeRTOS Queue in __NOINIT

Postby ESP_Sprite » 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.

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: FreeRTOS Queue in __NOINIT

Postby urbanze » Wed Feb 02, 2022 1:44 am

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.

Who is online

Users browsing this forum: No registered users and 82 guests