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

RTOS-2 API call osMessageQueueGet() corrupts thread stack

Hi,

I'm using Keil RTX5 (5.5.2) over RTOS-2 API. I'm trying to send a simple struct of data (8 bytes) from one thread to another:

Sending data (passing a pointer to queue) from Thread A:

Receiving data from Thread B:

What I'm getting out of this simplified function is:

It seems the local copy of the extEntry pointer is getting overwritten during the call for reason I don't understand. Is this a bug in RTX or the RTOS-2 API or have I done some obvious mistake? I have no similar issues if the size of the struct is max. 4 bytes.

Here are the pool and queue initializations:

Environment details:

  • IDE: ARM/Keil µVision5 (V5.34.0.0)
  • Compiler: ARM Compiler V6.16
  • Target: LPC55S28

0