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

Multiple serial "ports" on nRF51822, e.g., using app_uart module from SDK with UIDs?

Folks, I'd like to use the single UART peripheral in the nRF51822 in interleaved fashion to support two serial "ports", e.g., sets of GPIO pins dedicated to separate serial channels.

Is the version of the app_uart module in SDK 4.4.2 (because I have "C0" chips right now) which assigns UIDs designed for this purpose? I infer that it is from the SDK documentation, but could clearly be wrong here :)

If so, is there a state machine diagram, etc., for this scenario? For example, do I call app_uart_init (the version that issues UIDs repeatedly) to assign all the ports I want? But then how do I switch between them? Or do I bracket each port's usage of the peripheral with an app_uart_init/app_uart_close pair? If so, what happens when I open a specific port the second time? Do I supply the former UID and it gets reused? Or do I set the UID parameter to 0 and it gets a new value (which seems to be useless then)?

Haven't been able to answer these questions myself from the SDK docs and haven't found an example use of the app_uart module with UIDs in sample code. Am I missing something?

TIA,

Mike

Parents Reply Children
No Data
Related