2021-03-22 1:00 AM
I tried to debug the code by changing the "CFG_DEBUGGER_SUPPORTED" to 1 , but still we are facing the issues, RTOS tasks are not executing as expected. We found some task in ble_app.c with priority of "osPriorityNone" which is 0. Does this example code has any issue?
2021-03-25 5:45 AM
hi, @SMane.2 (Community Member)
In BLE_HeartRateFreeRTOS example code GPIO Pins( PB5 for LED1, PB0 for LED2 and PB1 for LED3) are not initialized as GPIO output mode.
GPIO_InitTypeDef GPIO_InitStruct = {0};
/*Configure GPIO pins : LD2_Pin LD3_Pin LD1_Pin */
GPIO_InitStruct.Pin = LED1_PIN|LED2_PIN|LED3_PIN;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
HAL_GPIO_WritePin(GPIOB, LED1_PIN|LED2_PIN|LED3_PIN, GPIO_PIN_RESET);
2021-03-26 12:46 AM
Thanks,@Aishwarya
I already added this things in the MX_GPIO_Init() function, but still it was not working. It was going in task only single time. Now I changed "CFG_LPM_SUPPORTED" to 0. So after disabling the LOW Power Mode, now its executing all task properly. Is low power mode making any problem to RTOS task? How can I optimize power? and implement sleep modes with BLE & RTOS both?
2021-04-05 7:13 AM
1
2021-10-06 9:15 AM
I am finding the same issue, did anyone find a solution to this problem?
2021-10-07 3:41 AM
hi @Community member After disabling the LOW Power Mode, the problem resolved(CFG_LPM_SUPPORTED = 0). If you want low power mode enabled(CFG_LPM_SUPPORTED = 1) you can change this "configEXPECTED_IDLE_TIME_BEFORE_SLEEP" parameter, On code regeneration it will be 2. You can increase to 10 to 30 Ticks as per your requirement. In FreeRTOS.h file you will find this parameter
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.