2025-07-30 8:24 AM
Greetings,
I have a question about the touchsensing module. I am using a stm32u585rit6 mcu in a custom-made board and making a project using azure rtos. I needed to add touchsensing. I watched the app_azure_rtos_config.h and noticed that there is static memory allocation via threadX memory pools (#define TOUCHSENSING_APP_MEM_POOL_SIZE 5000). Then, at the app_azure_rtos.c file there is the following:
__ALIGN_BEGIN static UCHAR tsc_byte_pool_buffer[TOUCHSENSING_APP_MEM_POOL_SIZE] __ALIGN_END;
static TX_BYTE_POOL tsc_app_byte_pool;
if (tx_byte_pool_create(&tsc_app_byte_pool, "TOUCHSENSING App memory pool", tsc_byte_pool_buffer, TOUCHSENSING_APP_MEM_POOL_SIZE) != TX_SUCCESS)
{
/* USER CODE BEGIN TOUCHSENSING_Byte_Pool_Error */
/* USER CODE END TOUCHSENSING_Byte_Pool_Error */
}
else
{
/* USER CODE BEGIN TOUCHSENSING_Byte_Pool_Success */
/* USER CODE END TOUCHSENSING_Byte_Pool_Success */
memory_ptr = (VOID *)&tsc_app_byte_pool;
status = MX_TOUCHSENSING_Init(memory_ptr);
if (status != TSL_STATUS_OK)
{
/* USER CODE BEGIN MX_TOUCHSENSING_Init_Error */
while(1)
{
}
/* USER CODE END MX_TOUCHSENSING_Init_Error */
}
/* USER CODE BEGIN MX_TOUCHSENSING_Init */
/* USER CODE END MX_TOUCHSENSING_Init */
}
What is the purpose of this memory pool? Is there any thread related to touchsensing running?
Thank you!