modbus: add DE/nRE gpios properties to samples and test
Add DE/nRE gpios properties to samples and test. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
c96aeff785
commit
d0ff35b88d
5 changed files with 18 additions and 8 deletions
|
@ -19,12 +19,15 @@ RTU client example is running on an evaluation board and communicates
|
|||
with another board that has been prepared according to the description
|
||||
`modbus-rtu-server-sample`.
|
||||
|
||||
In addition to the evaluation board, an USB to RS-485 bus adapter and
|
||||
a RS-485 shield are required. Shield converts the UART TX, RX signals to
|
||||
RS-485 and does not need a specific overlay, an Arduino header compatible
|
||||
shield like `joy-it RS-485 shield for Arduino`_ can be used.
|
||||
In addition to the evaluation board a RS-485 shield may be used.
|
||||
The shield converts UART TX, RX signals to RS-485.
|
||||
An Arduino header compatible shield like `joy-it RS-485 shield for Arduino`_
|
||||
can be used. This example uses DE signal, which is controlled by pin D9
|
||||
on the JOY-IT shield. For other shields, ``de-gpios`` property must be adapted
|
||||
or removed in the application overlay file
|
||||
:zephyr_file:`samples/subsys/modbus/rtu_client/app.overlay`
|
||||
|
||||
The A+, B- lines of the RS-485 shield should be connected together.
|
||||
The A+, B- lines of the RS-485 shields should be connected together.
|
||||
|
||||
Alternatively UART RX,TX signals of two boards can be connected crosswise.
|
||||
|
||||
|
|
|
@ -11,5 +11,6 @@
|
|||
compatible = "zephyr,modbus-serial";
|
||||
label = "MODBUS";
|
||||
status = "okay";
|
||||
de-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */
|
||||
};
|
||||
};
|
||||
|
|
|
@ -19,9 +19,12 @@ Additionally the board should have three LEDs.
|
|||
RTU server example is running on an evaluation board. Client is running
|
||||
on a PC or laptop.
|
||||
In addition to the evaluation board, an USB to RS-485 bus adapter and
|
||||
a RS-485 shield are required. Shield converts the UART TX, RX signals to
|
||||
RS-485 and does not need a specific overlay, an Arduino header compatible
|
||||
shield like `joy-it RS-485 shield for Arduino`_ can be used.
|
||||
a RS-485 shield are required. The shield converts UART TX, RX signals to RS-485.
|
||||
An Arduino header compatible shield like `joy-it RS-485 shield for Arduino`_
|
||||
can be used. This example uses DE signal, which is controlled by pin D9
|
||||
on the JOY-IT shield. For other shields, ``de-gpios`` property must be adapted
|
||||
or removed in the application overlay file
|
||||
:zephyr_file:`samples/subsys/modbus/rtu_server/app.overlay`
|
||||
|
||||
The USB to RS-485 adapter connects to the USB port of a computer.
|
||||
The two A+, B- lines should be connected to the RS-485 shield.
|
||||
|
|
|
@ -11,5 +11,6 @@
|
|||
compatible = "zephyr,modbus-serial";
|
||||
label = "MODBUS";
|
||||
status = "okay";
|
||||
de-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */
|
||||
};
|
||||
};
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
compatible = "zephyr,modbus-serial";
|
||||
label = "MODBUS";
|
||||
status = "okay";
|
||||
de-gpios = <&gpiob 22 GPIO_ACTIVE_LOW>; /* red LED */
|
||||
re-gpios = <&gpioe 26 GPIO_ACTIVE_LOW>; /* green LED */
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue