2025-03-07 5:02 AM - last edited on 2025-03-07 5:07 AM by mƎALLEm
A new question moved from this post.
I have the opposite issue with STM32CubeIDe v1.18 / MX v6.14.0, I want my semaphore initial state to be depleted, but that is not applied to my code:
/* creation of DebugUartStringReadySem */
DebugUartStringReadySemHandle = osSemaphoreNew(1, 1, &DebugUartStringReadySem_attributes);
My .ioc file seems ok:
rtos.0.binarySems.0=allocationType,Dynamic;controlBlockName,NULL;initialState,Depleted;name,DebugUartStringReadySem
2025-03-09 12:15 PM
Hi Marcos,
Random user here... I'm able to reproduce your error. I have a starter project for TouchGFX on the STM32U5 using FreeRTOS, so I added two semaphores, one that starts available, one that starts depleted.
Here's the code that CubeMX generated:
void MX_FREERTOS_Init(void) {
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* USER CODE BEGIN RTOS_MUTEX */
/* add mutexes, ... */
/* USER CODE END RTOS_MUTEX */
/* creation of sem_available */
sem_availableHandle = osSemaphoreNew(1, 1, &sem_available_attributes);
/* creation of sem_depleted */
sem_depletedHandle = osSemaphoreNew(1, 1, &sem_depleted_attributes);
Clearly, that's not correct. ST, please verify and correct this issue. (I'm using CubeIDE 1.18.0, CubeMX 6.14.0, STM32Cube FW_U5 v1.7.0.)
Dana M.
2025-03-10 6:38 AM
Hello @MarcosOrzari
Thank you for posting!
Could you provide the name of the MCU where you encountered the issue?
KR,
Souhaib
2025-03-11 6:26 AM
Sure, it's the STM32U585VITx.