I have used vsi interface in the past but recently when trying to use it again I have had a weird problem.
It works when called from main but does not work when called from a thread.
I am using FVP_Corstone_SSE-300_Ethos-U55 from avh-fvp 11.31.28
I am using vsi audio.
I have removed any audio server from the Python to have the simplest possible thing.
I have enabled DEBUG log in the python.
When I initialize the vStream interface from main, I can see DEBUG messages from Python.
When I initialize from a thread : nothing.
I have attempted a simpler thing : just writing to a register with AudioIn->CONTROL = 0U;
When I do it from main I see the debug messages from Python.
When I do it from a thread : nothing.
My thread is created using CMSIS RTOS API using following attributes:
const osThreadAttr_t app_main_attr = {
.name = "app_main",
.stack_size = 4096,
.priority = osPriorityNormal
};
The thread is:
void app_main (void *argument)
{
printf("Started\n");
AudioIn->CONTROL = 0U; // To debug
stream_configure_and_start();
}
The print is here to confirm the thread is started and running. I see the print in the console.
The OS is started with:
printf("Hello, World!\n");
osStatus_t err = osKernelInitialize();
if (err != osOK) {
CMSISSTREAM_LOG_ERR("Kernel initialization failed\n");
goto error;
}
osThreadNew(app_main, NULL, &app_main_attr); // Create application main thread
printf("Start kernel\n");
// Hand control to the RTOS scheduler.
osKernelStart();
When I do AudioIn->CONTROL = 0U; in main before starting the RTOS, I can see the debug message in Python. The wrRegs python function is called.
In summary, I can't make vsi/vstream work when started from a thread.
I have used vsi interface in the past but recently when trying to use it again I have had a weird problem.
It works when called from main but does not work when called from a thread.
I am using FVP_Corstone_SSE-300_Ethos-U55 from avh-fvp 11.31.28
I am using vsi audio.
I have removed any audio server from the Python to have the simplest possible thing.
I have enabled DEBUG log in the python.
When I initialize the vStream interface from main, I can see DEBUG messages from Python.
When I initialize from a thread : nothing.
I have attempted a simpler thing : just writing to a register with
AudioIn->CONTROL = 0U;When I do it from main I see the debug messages from Python.
When I do it from a thread : nothing.
My thread is created using CMSIS RTOS API using following attributes:
The thread is:
The print is here to confirm the thread is started and running. I see the print in the console.
The OS is started with:
When I do
AudioIn->CONTROL = 0U;in main before starting the RTOS, I can see the debug message in Python. ThewrRegspython function is called.In summary, I can't make vsi/vstream work when started from a thread.