This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

rs485 half duplex on dsp28335

hi

i have tried to have serial communication (RS485 half duplex) on DSP28335 ,I have used max485 and one of my GPIO pin as direction control.I have tied

DE and RE pin together .in software when ever i want to receive data i make RE pin low and after receiving data i  make DE pin high.i disable fifo and i use interrupt service routine for receive and transmit data.my problem is:when the first packet receive and after that when i transmit my first packet then i could not have any receive .I have checked the gpio that control the direction ,it works well but after one receive i could not have any receive.

in my code if i do not change the gpio that control  the direction pin of max485, my dsp can receive all packages of data and continue receiving and also send the data,but my sending data cant be received in the other side because of direction pin ,and if i change the direction after reviving packet for send data and after that again change direction for receive i could not receive any data anymore.

pleas help me ,thank you very much

  • Marjan,

    I did not use max485 but let me try to help you.

    May be the other device did not receive the data correctly from F28335 and hence did not send the data to F28335 device in turn (Not sure about your application protocol). Did you make sure that the DE is pulled low after the entire data and stop bits are sent out? You can use TXEMPTY flag to know the status of TXSHF in your TX ISR (to pull DE low once the data is completely sent out).

    OR May be there is a receive error - Did you check if there is a framing error/break-detect error preventing further data to be received?

    Thanks and regards,
    Vamsi