Zephyr modbus rtu server device tree configuration

Hi,

I'm trying to use the samples/subsys/modbus/rtu_server/ sample. We use the st3485eb as rs485 driver. The problem is that I don't receive any data.

I'm converting our product from the nordic propritary code to zephyr. The nordic code works perfectly on the setup so it is not a hardware problem. The problem is in the configuration of the uart1 rx and tx lines. The configuration is below. The rx is on gpio0 bit 4 and the tx is on gpio0 bit 5, but it seems that at run time other port or bit values are used. Can you help me with the configuration?

&uart1 {
  status = "okay";
  compatible = "nordic,nrf-uarte";
  pinctrl-0 = <&uart1_default>;
  pinctrl-1 = <&uart1_sleep>;
  pinctrl-names = "default", "sleep";

  current-speed = <9600>;
  /delete-property/ hw-flow-control;

  modbus0 {
    compatible = "zephyr,modbus-serial";
    status = "okay";
        de-gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
        re-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
  };
};

&uart1_default {
  group1 {
    psels = <NRF_PSEL(UART_RX, 0, 4)>;
    bias-pull-up;
  };

  group2 {
    psels = <NRF_PSEL(UART_TX, 0, 5)>;
  };
};

&uart1_sleep {
  group1 {
    psels = <NRF_PSEL(UART_RX, 0, 4)>;
    bias-pull-up;
  };

  group2 {
    psels = <NRF_PSEL(UART_TX, 0, 5)>;
  };
};
Related