uart_line_ctrl_set Function not implemented

Hi,

I'm using the bare hci_uart example and try to rise the RTS line manually. Therefore I use the API

int err = uart_line_ctrl_set(hci_uart_dev, UART_LINE_CTRL_RTS, 1);
and added 
CONFIG_UART_LINE_CTRL=y
in proj.conf. The resulting error code is ENOSYS (88), "Function not implemented". Am I missing some more config values? 
Regards,
Oliver
Parents Reply Children
  • Hi Maria,

    I'm using nRF Connect SDK 2.1.2 on a nRF52840DK. The software is basing on hci_uart. In main.c in function hci_uart_init I added uart_line_ctrl_set like following:

    static int hci_uart_init(const struct device *unused) {
      LOG_DBG("hci_uart_init");
    
      if (!device_is_ready(hci_uart_dev)) {
        LOG_ERR("HCI UART %s is not ready", hci_uart_dev->name);
        return -EINVAL;
      }
    
      uart_irq_rx_disable(hci_uart_dev);
      uart_irq_tx_disable(hci_uart_dev);
    
      uart_irq_callback_set(hci_uart_dev, bt_uart_isr);
    
      uart_irq_rx_enable(hci_uart_dev);
    
      // Signaling
      int err = uart_line_ctrl_set(hci_uart_dev, UART_LINE_CTRL_RTS, 1);
      LOG_DBG("uart_line_ctrl_set result %i", err);
    
      return 0;
    }
    

    CTS is generally working in the context of the application but I want CTS to be set right after reset until the software is completely initialized.

    Thanks and greetz!
    Oliver

  • Hello,

    I am going on vacation for a weekl so one of my team mates will take over this ticket on Monday.

    Kind Regards,
    Maria

  • Thanks Maria,

    I solved it. It's somehow awkward... I expected to see the RTS signal right after the reset and didn't realize that Zephyr needs several hundred ms to reach the init function. In the end it was an incorrect setting of the oscilloscope. Sorry for bothering you.

    Regards,
    Oliver

Related