2024-11-18 11:31 PM
Hello,
I am working with [STM32 MCU model, e.g., STM32U5G9ZJT6Q], and I downloaded code from GitHub (link:
While running the project, the code gets stuck in the tx_application_define() function, specifically in the while(1) loop after the USB initialization MX_USBX_Device_Init().
Here is the relevant portion of the function:
VOID tx_application_define (VOID *first_unused_memory)
{
UINT status = TX_SUCCESS;
VOID *memory_ptr;
if (tx_byte_pool_create( &tx_app_byte_pool, "Tx App memory pool", tx_byte_pool_buffer, TX_APP_MEM_POOL_SIZE) != TX_SUCCESS)
{
while(1);
}
memory_ptr = (VOID *)&tx_app_byte_pool;
status = App_ThreadX_Init(memory_ptr);
if (status != TX_SUCCESS)
{
while(1);
}
if (tx_byte_pool_create(&ux_device_app_byte_pool, "Ux App memory pool", ux_device_byte_pool_buffer, UX_DEVICE_APP_MEM_POOL_SIZE) != TX_SUCCESS)
{
while(1);
}
memory_ptr = (VOID *)&ux_device_app_byte_pool;
status = MX_USBX_Device_Init(memory_ptr);
if (status != UX_SUCCESS)
{
while(1); // Getting stuck here
}
}