This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CMSIS KEIL RTOS - Mail queue vs Message queue

Dear all,

I am using Keil Microvision IDE v5.16 and CMSIS Keil RTX RTOS. Our microcontroller is STM32F4xx. In the CMSIS RTOS API, message queue and mail queue inter-thread communication mechanisms are mentioned. Even after reading the documentation, we are still confused of its differences / benefits of one over other / usage scenarios of both.

Only difference we feel are:-

1. In message queue, 32 bit integer or a pointer value is being transferred. Message queue make use of Memory pool APIs to allocate and free memory inside message queue.

2. In mail queue, instead of using memory pool APIs, memory blocks can be created directly using mail APIs.

Both message queue and mail queue seems to have queueing property. But in mail queue, we didn't find any error code corresponding to mail queue full or mail queue empty state while trying to put a mail to the queue.

Can anyone differentiate mail queue and message queue, its benefits and usage scenario in detail as CMSIS Keil RTX documentation / CMSIS RTOS API documentation seems to create severe confusion in developers regarding the same. Also it is very difficult to simulate an exact feasibility study for this selection as only in our final application actual factors can be simulated such as CPU load, OS scheduling times etc.

Is it possible to mix and use mail queue and message queue in a single application?

Thank you,
Lullaby Dayal