Skip to content

NordicPlayground/nrf52-drv-gpio-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nrf52-drv-gpio-example

Description

This is a gpio driver example supporting the following features:

  • Configuring a pin or group of pins as input pin(s).

  • Configuring a pin or group of pins as output pin(s).

  • Getting the logical level an input pin or group of input pins.

  • Setting the logical level an output pin or group of output pins.

  • Sensing pin(s) using interrupts and the low-power PORT-event.

  • Sensing pin(s) using interrupts and the high-accuracy IN-event.

  • Toggling of pin(s) without involving the CPU.

  • Disconnecting a pin or group of pins.

Follow these steps to run the example:

  1. Extract the 12.3.0 version of the SDK.

  2. Enter the nRF5_SDK_12.3.0_d7731ad\examples\peripheral directory.

  3. Clone the repo: git clone https://github.com/NordicPlayground/nrf52-drv-gpio-example.git

  4. Enter the nRF5_SDK_12.3.0_d7731ad\examples\peripheral\nrf52-drv-gpio-example\pca10040\arm5_no_packs directory

  5. Open the drv_gpio_example.uvprojx Keil project file.

  6. Build the project.

  7. Select and configure the debugger.

  8. Press the LOAD button.

  9. All four LEDs should now blink 4 times.

  10. Press one button at a time to observe the behavior of the example.

  11. Press all four buttons simultaneously to proceed to the next example.

  12. Repeat from step 9 until the board does not respond to button presses anymore, which means the program has run to the end.

Note
Power-cycle the board to run all examples again.

Requirements

  • nRF5 SDK version 12.3.0

  • nRF52DK

The project may need modifications to work with later versions or other boards.

To compile it, clone the repository in the /nRF5_SDK_12.3.0/examples/peripheral directory.

About this project

This application is one of several applications that has been built by the support team at Nordic Semiconductor, as a demo of some particular feature or use case. It has not necessarily been thoroughly tested, so there might be unknown issues. It is hence provided as-is, without any warranty.

However, in the hope that it still may be useful also for others than the ones we initially wrote it for, we’ve chosen to distribute it here on GitHub.

The application is built to be used with the official nRF5 SDK that can be downloaded from developer.nordicsemi.com

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published