As per my project requirement, I am evaluating smartfusion device with RTX in A2F-EVAL-KIT. I see Keil RTX has something called mailbox, which i am particularly interested in. I tried to create and build program using mailbox as per below link In simulated HW env things worked out great. http://www.keil.com/support/man/docs/rlarm/rlarm_ar_mbx_using.htm
But when i use the same source to build program in eval board, It is not working as expected from simulated env.
__task void send_task (void) { /* This task will send a message. */ U32 *mptr;
os_tsk_create (rec_task, 0); os_mbx_init (MsgBox, sizeof(MsgBox)); mptr = _alloc_box (mpool); /* Allocate a memory for the message */ mptr[0] = 0x3215fedc; /* Set the message content. */ mptr[1] = 0x00000015; os_mbx_send (MsgBox, mptr, 0xffff); /* Send a message to a 'MsgBox' */ os_tsk_delete_self (); }
os_mbx_send in above sniffet gets blocked [Goes to sleep] for ever. I know if i pass argument 0xffff to os_mbx_send it is suppose to wait indefinitely. But i see the same behaviour in other timeout values e.g 3 (clock ticks). Since this is the first insertion made to mailbox as per mailbox demo program in above link, it shouldn't matter. i dont get it why there is different behaviour in simulated Hw/Actual Hw (Eval board).
Is this a bug in Keil MDK (RTX) ?
Any help appreciated ...
I understand your concern. I also tried in reverse order but getting into same problem finally [GOING TO SLEEP FOR EVER while performing os_mbx_send, Blocking tsk switching].
os_mbx_init (MsgBox, sizeof(MsgBox)); os_tsk_create (rec_task, 0);