2017-07-10 02:07 AM
Hi, My question is i want to communicate through uart between stm32f030 board and inverter ,I am using rs485 converter to TTL board.communication has done through modbus protocol.Driver enable pin is high data will transmit and when pin is low data will receive, I am unable to write code in receiving mode using modbus protocol , I have attached file ,so please help me.
2017-07-13 12:19 AM
I would set the direction of the RS485 to receive unless your UART is transmitting and make sure it stays in the transmitting mode until the end of the stop bit of your transmitted byte or until the end of your modbus packet, whichever is longer. I am not all that great at modbus over RS485 but I am working on similar code myself.
boB