AnsweredAssumed Answered

STM32CubeMX 4.7.0 FreeRTOS osMessageCreate bug

Question asked by djdy.lq on Apr 30, 2015
Latest reply on Apr 5, 2017 by Ivan Kucherov
osMessageQId osMessageCreate (const osMessageQDef_t *queue_def, osThreadId thread_id)
{
  (void) thread_id;
  return xQueueCreate(queue_def->queue_sz, queue_def->item_sz);
  //return xQueueCreate(queue_def->queue_sz, (uint32_t) sizeof(queue_def->item_sz));   //-------------->Bug
}

if you want use a queue and the size larger than 4 bytes, osMessageCreate always give you a 4bytes queue. because sizeof(queue_def->item_sz) always return 4.

Outcomes