Continuation of thread 22624....application of mailbox

hey guys,
after a lot of guidance & iterations, i a code that typecast the data as pointer and pass it via mailbox.
all was well upto one year. but yesterday, while testing, i found out that i receive a 0x00 from uart, which i dnt get into my rx_buf.

Just wanted to bring into notice this cautionary remark.

Parents
  • after a lot of guidance & iterations, i implemented a code that typecast the data (received on uart) as pointer and pass it via mailbox.
    all was well upto one year. but yesterday, while testing, i found out that i receive a 0x00 from uart, which i dnt get into my rx_buf. typecasting 0x00 to a pointer results to a NULL POINTER.

    Just wanted to bring into notice this cautionary remark.

    The implemented code, (now requires modification):

    if ((tmp == UART_IIR_INTID_RDA))       // Receive Data Available or Character time-out
            {
                    data = UART_ReceiveByte(DISPLAY_PORT_UART);
    
                    if (isr_mbx_check (&MailDisplay) != 0)
                            isr_mbx_send(&MailDisplay, (void *)data);
            }
    

Reply
  • after a lot of guidance & iterations, i implemented a code that typecast the data (received on uart) as pointer and pass it via mailbox.
    all was well upto one year. but yesterday, while testing, i found out that i receive a 0x00 from uart, which i dnt get into my rx_buf. typecasting 0x00 to a pointer results to a NULL POINTER.

    Just wanted to bring into notice this cautionary remark.

    The implemented code, (now requires modification):

    if ((tmp == UART_IIR_INTID_RDA))       // Receive Data Available or Character time-out
            {
                    data = UART_ReceiveByte(DISPLAY_PORT_UART);
    
                    if (isr_mbx_check (&MailDisplay) != 0)
                            isr_mbx_send(&MailDisplay, (void *)data);
            }
    

Children
More questions in this forum