This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how can i initialize two hardware uart peripherals at the same time.?

i have initialized a uart then i changed its rx and tx pins. now i want to initialize two uarts. i found the function to do this. app_uart_init.but i dont know how to pass these two arguments in this function. app_uart_buffers_t * p_buffers, uint16_t * p_uart_uid how can i do this.?

Parents
  • The internal hardware that Nordic is wrapping around only supports a single USART. Therefore, the SDK also cannot support multiple concurrent USARTs.

    You could probably implement a software based USART if you really need two USARTs on your project.

    Or, if you know you won't be using both concurrently, you could software select which IO pins the hardware is connected to at any given time.

    I highly encourage you too look at the source code for the app_uart_init() and related functions. They're very basic wrappers around the hardware control registers if memory serves.

Reply
  • The internal hardware that Nordic is wrapping around only supports a single USART. Therefore, the SDK also cannot support multiple concurrent USARTs.

    You could probably implement a software based USART if you really need two USARTs on your project.

    Or, if you know you won't be using both concurrently, you could software select which IO pins the hardware is connected to at any given time.

    I highly encourage you too look at the source code for the app_uart_init() and related functions. They're very basic wrappers around the hardware control registers if memory serves.

Children
Related