This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Coprocessor code and uarte device driver related issues

Hi

I'm working on adding software flow control in coprocessor code,

1.CONFIG_UART_ASYNC_API and UARTE_INTERRUPT_DRIVEN ,What's the difference between the two macro definitions,UARTE_INTERRUPT_DRIVEN macro is used in coprocessor code,I read some other questions, which are recommended CONFIG_UART_ASYNC_API.

2.Through the data manual of 52833 Uarte related chapters,the RXD.MAXCNT register must be set to RXD.MAXCNT > 4,But I found that RXD.MAXCNT is assigned to 1,Through this function nrf_uarte_rx_buffer_set,Is there any reason for this.

3.Through the data manual of 52833 Uart related chapters,The UART receiver chain implements a FIFO capable of storing six incoming RXD bytes before data is overwritten. Will this FIFO still work in uarte and can it be configured.

There have been some introductions in this issue, but I want to know more clearly

I'm not very good at English. I hope I can speak it clearly.

thank

  • Hi

    Are the size of RX FIFO and the working mode of trigger flow control configurable?

    If it cannot be configured, it is impossible to control the transmission and stop of the host by software flow control

    Thank you for your answer

    Ethan

  • Hi Ethan

    No, the size of the RX FIFO is fixed. The hardware flow control method is not really configurable (other than being able to turn it on and off), but it is possible to implement different kinds of flow control in software, or as a combination of hardware and software using the PPI, timers, GPIOTE etc. 

    Whether or not a particular flow control scheme can be implemented depends on the requirements. Reception is not really a problem if you size the RX buffers correctly, since the nRF should be able to receive continuously when utilizing double buffering, but the question is how the host should tell the nRF device to stop transmitting if the host is unable to receive any more data. 

    If you have a particular scheme in mind maybe you can share the details, and I will try to think of some way this can be done using the UARTE peripheral. 

    Best regards
    Torbjørn

  • Hi

    The host side is the arm cortex A53 core CPU, which runs the Linux system and has a fast processing speed. I don't think it will cause data loss.

    Thank

    Ethan

  • Hi

    I found that there is a GPIO between 52833 and the host. I can configure GPIO as RTS to start flow control.That should solve my problem.

    Is there a way to configure GPIO into an RTS via software.

    Thank 

    Ethan

  • Hi

    I have successfully configured the RTS through the device tree.It meets my current job needs

    Thank you for your answer

    Ethan

Related