AnsweredAssumed Answered

Communication error using UART between 2 BF537 boards

Question asked by sweet7kytty on May 28, 2012
Latest reply on May 29, 2012 by Prashant

Hello!

My name is Cristina and I have a problem when I try to connect and transmit data between two BF537 boards, using UART.

        The aim was to introduce the use of communication channels to transmit and receive data. I try to combine  “Talkthrough” example from BF537 with  UART. I used two boards, one for transmission( here, I put the samples received from the microphone into the tx_buffer used but UART so I can send them to the other board) and one for reception ( here I took the data from rx_buffer of UART and put it into iChannel0LeftOut and iChannel0RightOut so I can hear the sound obtained).

   First of all, I tested that  the data transmission between two Blackfins is working ( I attached the code in lab1.zip) and it does.

  After this, I included the part of Talkthrough and tried to send only the first 8 MSB of the samples :

Reduce the buffer to 8 bits: tx_buffer[0] = (char)(iChannel0LeftIn>>16);

Expand the buffer back to 24 bits: iChannel0RightOut = (int)(rx_buffer[1]<<16);

            The bit reduction should make the data transmission between the Blackfins work because it reduces the audio buffer that come from the microphone  (24-bit) into the size that would fit the UART (8-bit). Then it needs to be expanded back to 24 bits. The part that got shifted to the right by 16 bits is lost.

              

           Unfortunately , this part did not work and I can't figure out why ( The code is in lab2.zip, test7_t - is the transmitter code and test7_r is the receiver code). If anyone could help me with this problem I would be very grateful.

                                                                             Thanks in advance,

                                                                                             Cristina

Attachments

Outcomes