Skip to main content
Associate III
April 22, 2024
Solved

struck in wait_for_transfer_completion() when I enable freeRTOS. for AEK_AUD_C1D9031.

shiva_shankar_e_0-1713787970729.png

I debug up to hear and the flow of the code is blocked in this function,(after adding freeRTOS) in  the project. i don't know what is the error. i had used the low level API which is avaliable in the document. 

shiva_shankar_e_1-1713788885119.png

the flow is like this in the main function. at AEK_903D_Init(). it is blocked. and not coming out of that API. please help me out.

This topic has been closed for replies.
Max VIZZINI
Max VIZZINIBest answer
ST Technical Moderator
April 22, 2024

Hi,

As I have already stated, the code has NOT be written from freeRTOS therefore it requires modification.

In particular all osalThreadDelay() are not working under freeRTOS. They have to be substituted with:

 

vTaskDelay () specifies a wake time relative to the time at which the function is called

OR

vTaskDelayUntil () specifies the absolute (exact) time at which it wishes to unblock

 

Example code:

TickType_t xLastWakeTime = xTaskGetTickCount();

vTaskDelayUntil( &xLastWakeTime, 200 );

where 200 are in milliseconds.

 

Best Regards,

AutoDevKit Team

1 reply

Max VIZZINI
Max VIZZINIBest answer
ST Technical Moderator
April 22, 2024

Hi,

As I have already stated, the code has NOT be written from freeRTOS therefore it requires modification.

In particular all osalThreadDelay() are not working under freeRTOS. They have to be substituted with:

 

vTaskDelay () specifies a wake time relative to the time at which the function is called

OR

vTaskDelayUntil () specifies the absolute (exact) time at which it wishes to unblock

 

Example code:

TickType_t xLastWakeTime = xTaskGetTickCount();

vTaskDelayUntil( &xLastWakeTime, 200 );

where 200 are in milliseconds.

 

Best Regards,

AutoDevKit Team