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, 1'm using the RTX51Tiny and am trying to implement a "mailbox"-like function to allow tasks to intercommunicate. The core structure of my program looks like this: //startup.a51 has been modified for //small reentrant stack //prototype void WriteMailBox(unsigned char NewData) small reentrant; unsigned char ReadMailBox(void); //mailbox variable unsigned char MailBox; //accesor function to mailbox void WriteMailbox(unsigned char NewData) reentrant { MailBox = NewData; } unsigned char ReadMailBox(void) { return(MailBox); } The problem arises when I try to call the WriteMailbox function in an interrupt service routine. The mailbox is not updated when the isr exits- this shows when another function calls ReadMailBox and the data dosn't match. I'd appreciate any form of help/pointer/comment. Thanks in advance!