We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi All,
I am porting the project from CMSIS RTOS1 to RTOS2.
I am little confused on assigning the static memory for RTOS2 queue.
Below is the RTOS1 Method:
m_Keil_Msg_Def.pool = &m_Keil_Msg[i][0]; (uint32_t m_Keil_Msg [50] [4400]) from this pool one of the block is assigned m_Keil_Msg_Def.queue_sz = m_Number_Of_Packets + 4; (m_Number_Of_Packets+4 will be less than or equal to 4400) m_Keil_Msg_ID = osMessageCreate(&m_Keil_Msg_Def, NULL);
Now how can I convert it to RTOS 2
I tried below one but it failed :
m_Keil_Msg_Attr.mq_mem = &m_Keil_Msg[i][0]; m_Keil_Msg_Attr.mq_size = (m_Number_Of_Packets + 4) * sizeof(uint32_t); m_Keil_Msg_ID = osMessageQueueNew (m_Number_Of_Packets + 4 , sizeof(uint32_t), &m_Keil_Msg_Attr);
The above issue is resolved.
Thank for letting us know. Are you able to share the solution you found?
I followed the below method:
m_Keil_Msg_Attr.mq_mem = &m_Keil_Msg[i][0]; (uint32_t m_Keil_Msg [50] [4400]) from this pool one of the block is assignedm_Keil_Msg_Attr.mq_size = 4400 * sizeof(uint32_t); ( The pool size is 4400 * Sizeof(uint32_t) as m_Keil_Msg is declared as uint32_t)m_Keil_Msg_ID = osMessageQueueNew (m_Number_Of_Packets + 4 , sizeof(uint32_t), &m_Keil_Msg_Attr);
Thank you for sharing :)