Tasks running on STM32WB
Hi
I try to use task on the STM32WB5MMG mcu.
My task check if a queue is not empty, if not empty then copy the item on its top and send its message by the BLE. The task handler is:
void ble_tx_messages_queue_handler_task()
{
queue_element *element;
CircularQueue_Init( &usb_sub_packets_queue , queue_buffer , QUEUE_SIZE , sizeof(queue_element) , CIRCULAR_QUEUE_NO_FLAG );
while(1)
{
if( CircularQueue_Empty(&usb_sub_packets_queue) == FALSE )
{
element = (queue_element *)CircularQueue_Sense( &usb_sub_packets_queue , (uint16_t *)sizeof(queue_element) );
CircularQueue_Remove( &usb_sub_packets_queue , (uint16_t *)sizeof(queue_element) );
TxNotification.Custom_Evt_Opcode = CUSTOM_STM_USB_TO_BLE_READ_EVT;
TxNotification.DataTransfered.Length=SizeUsb_To_Ble=element->data_length;
TxNotification.DataTransfered.pPayload=element->data_pointer;
Custom_STM_App_Notification(&TxNotification);
}
}
}
when this endless loop is running the BLE does not receive nor transmit data, what can be wrong with it ?
