I'm having difficulty sending a message while within my ADC interrupt. I can send a message just fine when I'm in a thread using the same mailbox. However, within the interrupt, osMessagePut returns osErrorParameter. When stepping through the code, I can see that it returns that if (((P_MCB)queue_id)->cb_type != MCB). In the debugger, I can clearly see that queue_id->cb_type == 1, which equals MCB when I look up the definition of MCB. I'm not sure what's going on here as RTX is compiled as a library so I can't see exactly what's going on. Any suggestions? Thanks!
The most likely cause is that your timeout is not equal to 0. IF you are sending from an ISR, the timeout value must be 0 or osErrorParameter will be returned.
Thanks! Might help if I read the documentation as it is clearly written there. Haha.