2022-05-13 07:12 AM
Project MX created without RTOS generate this main part
MX_TouchGFX_Init();
MX_RTC_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Init code for STM32_WPAN */
MX_APPE_Init();
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
MX_APPE_Process();
MX_TouchGFX_Process();
/* USER CODE BEGIN 3 */
if((HAL_GPIO_ReadPin(TOUCH_IRQ_GPIO_Port,TOUCH_IRQ_Pin) == GPIO_PIN_RESET ||
i2cRXbuff[0]!=0) && TouchDELAY==0)
if (HAL_I2C_Master_Transmit(&hi2c1, 0x5c, (uint8_t *)"\340", 1, 1) == HAL_OK)
{
TouchDELAY=14;
HAL_I2C_Master_Receive_IT(&hi2c1, 0x5c, i2cRXbuff, 5);
}
}
/* USER CODE END 3 */
If i comment RTC and APPE = TouchgfX works.
If TouchGFX commented BLE works.
Is BLE RTOS compliant? Or how add (move) TouchGFX_Process into sequencer?
Solved! Go to Solution.
2022-05-25 08:28 AM
Fine i make more tests and firstly i use TGFX 4.17 and BLE 1.12.x stack.
Second testing latest 4.19.1 and 1.13.x and code without LPM works normal.
Your example why in ISR VSYNC change PRIO repeatly?
How to setup LPM enable after som time and wake on touch detected ...
2022-05-18 06:01 AM
Hello,
If you disable low power mode (see #define CFG_LPM_SUPPORTED in app_conf.h file) your code should works. If not, you should create a task which call TouchGFX_Process in order to use sequencer.
Some examples of STM32CubeWB package running with FreeRTOS instead of sequencer.
Maybe the following documentation can help you:
Operating Systems | TouchGFX Documentation
Best Regards
2022-05-18 07:06 AM
Hi your define is ok , but i need create code switching LPM inapp.
Too ofcourse i read one example P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_HeartRateFreeRTOS/
and i see here zero usable information...
2022-05-18 10:25 PM
2022-05-25 05:06 AM
Hello,
In order to add TouchGFX_Process into sequencer follows these steps:
while (1)
{
/* USER CODE END WHILE */
MX_APPE_Process();
//MX_TouchGFX_Process();
/* USER CODE BEGIN 3 */
}
typedef enum
{
CFG_FIRST_TASK_ID_WITH_NO_HCICMD = CFG_LAST_TASK_ID_WITH_HCICMD - 1, /**< Shall be FIRST in the list */
CFG_TASK_SYSTEM_HCI_ASYNCH_EVT_ID,
/* USER CODE BEGIN CFG_Task_Id_With_NO_HCI_Cmd_t */
CFG_TASK_SYSTEM_GFX_ID,
/* USER CODE END CFG_Task_Id_With_NO_HCI_Cmd_t */
CFG_LAST_TASK_ID_WITH_NO_HCICMD /**< Shall be LAST in the list */
} CFG_Task_Id_With_NO_HCI_Cmd_t;
/* USER CODE BEGIN APPE_Init_2 */
UTIL_LPM_SetStopMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE);
UTIL_SEQ_RegTask(1<< CFG_TASK_SYSTEM_GFX_ID, UTIL_SEQ_RFU, touchgfx_taskEntry);
/* USER CODE END APPE_Init_2 */
/*
* Signal that a VSYNC has occurred. Should make the vsync queue/mutex available.
*
* Note This function is called from an ISR, and should (depending on OS) trigger a
* scheduling.
*/
void OSWrappers::signalVSync()
{
vsync_sem = 1;
UTIL_SEQ_SetTask(1<<CFG_TASK_SYSTEM_GFX_ID, CFG_SCH_PRIO_0);
}
Best Regards
2022-05-25 08:28 AM
Fine i make more tests and firstly i use TGFX 4.17 and BLE 1.12.x stack.
Second testing latest 4.19.1 and 1.13.x and code without LPM works normal.
Your example why in ISR VSYNC change PRIO repeatly?
How to setup LPM enable after som time and wake on touch detected ...
2022-06-01 08:29 AM
Hello,
The SetTask function allows to start the execution of a task and not to change a priority.
The sequencer allows to go in low power mode when there is nothing to do. To wake up from low power mode, you can use an EXTI.
Best Regards