FreeModbus_Slave-Master-RTT-STM32 icon indicating copy to clipboard operation
FreeModbus_Slave-Master-RTT-STM32 copied to clipboard

Pin Connection

Open gourav1996 opened this issue 7 years ago • 3 comments

Where to connect DE and RE Pin of rs485 converter to stm32f4. And How to configure it?

Thank you.

gourav1996 avatar Nov 27 '18 10:11 gourav1996

https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32/blob/master/FreeModbus/port/rtt/portserial.c#L131

see MODBUS_SLAVE_RT_CONTROL_PIN_INDEX definition

armink avatar Nov 27 '18 11:11 armink

Thank you for your replay. Just few more things, I want to get data of a meter from holding register value 40002, it's slave id is 121, and it's baudrate is 9600. Could you please suggest me where to define these?

Thank you.

gourav1996 avatar Nov 27 '18 13:11 gourav1996

baudrate can be changed by eMBMasterInit: https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32/blob/master/APP/src/app_task.c#L94

the slave id and register value's change, please see eMBMasterReqReadHoldingRegister demo on app_task.c

armink avatar Nov 27 '18 14:11 armink