This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

Working UART Switching between two devices project

The nRF51822 only has one UART and my app needed two. One for a GPS receiver and one for a simple terminal command line interface. The UART RX is interrupt driven, but TX is only polled.

It is tested on the nRF51822-EK using Keil MDK. Unzip the project in any directory and build. I've copied the "source" and "include" directories from the C:\Keil\ARM\Device\Nordic\nrf51822 directory into my own svn repository.

The attached project does the following:

  1. defaults to GPS receiver port on power-up
  2. Using GPIOTE, any key entry from the terminal port causes an interrupt which switches from GPS gpio pins to the terminal interface.
  3. Hitting the "enter" key brings up a >> prompt.
  4. Entering the "q" command returns it back to the GPS gpio pins

Hope this is useful to someone.

test.zip

Related