sys_mutex is created as recursive and try give ( ? ) as regular.
And unprotect ( L91-L95 ) correctly like this -
uint8_t
lwgsm_sys_unprotect(void) {
return xSemaphoreGiveRecursive(sys_mutex);
}
https://www.freertos.org/a00123.html
<This macro must also not be used on semaphores created using xSemaphoreCreateRecursiveMutex().>
I want to express my gratitude for your work and point out ( unfortunately ) an error - https://github.com/MaJerle/lwgsm/blob/433e80a49f1951c25466ab3e7f18b7c3471f5df5/lwgsm/src/system/lwgsm_sys_freeRTOS.c#L51-L56
sys_mutex is created as recursive and try give ( ? ) as regular.
And unprotect ( L91-L95 ) correctly like this -
uint8_t lwgsm_sys_unprotect(void) { return xSemaphoreGiveRecursive(sys_mutex); } https://www.freertos.org/a00123.html <This macro must also not be used on semaphores created using xSemaphoreCreateRecursiveMutex().>