lovehedy24 / nRF52832_pesky

Examples of programming nRF52832 + MPU9250 + BMP280 dev board from https://www.tindie.com/products/onehorse/nrf52832-development-board/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nRF52832_pesky

Programming nRF52832 + MPU9250 + BMP280 dev board from https://www.tindie.com/products/onehorse/nrf52832-development-board/ with nRF52 SDK, GCC and JLink.

Here is what you can do with Invensense Motion Driver SDK 6.12:

md612 2

Repository contains several examples adapted from official nRF5 SDK along with extended code with Invensense's Motion Driver 6.12. Example folders can contain readme with additional description and video or screenshot of result, also it contains hex subfolder with ready to flash hex file. Below you can find setup process based on simplest blinky example.

List of adapted projects

BLE

Invensense Motion Driver

Bosch Sensortec BMP280 Driver

Peripherals

Segger RTTT

What you will need

  1. nRF5 SDK - (all code adapted for SDK 12.0.0)
  2. ARM GCC Toolchain - (I do not use Eclipse yet, just plain GCC, so you could skip part about Eclipse configuration. Also, please, read "How to use it" section before following the tutorial as you need to clone this repo to empty folder, before unpacking SDK there)
  3. JLink from SEGGER (software + device) - I'm using EDU version and have no plans to make it to production
  4. Command Line Tools from nRF - already contains JLink software, so could skip 3. Or if you already installed latest JLink software - you can safely skip it during installation.
  5. MSYS2 - (I use Windows as development environment)
  • .bash_profile - you should add JLink, GCC and Command Line Tools to your PATH, like below
PATH="/f/Projects/ARM/gcc-arm-none-eabi-7-2017-q4-major-win32/bin:/c/Program Files (x86)/SEGGER/JLink_V622f:/c/Program Files (x86)/Nordic Semiconductor/nrf5x/bin:${PATH}"

Targets

All standard targets supported, among them:

make - compiles code and produces hex and bin files

make clean - removes folder with compiled stuff

make flash - compiles and flashes hex to board.

make flash_softdevice - flashes softdevice hex to board. Available only in s132\armgcc\Makefile.

How to use it

Please review Makefile before executing any command and make sure that you understand what you are doing.

All commands below executed in mingw64 shell from msys2.

  1. Clone repository to your empty nRF5 SDK folder:

    mkdir nRF5_SDK_12.0.0_12f24da
    cd nRF5_SDK_12.0.0_12f24da
    git clone https://github.com/e27182/nRF52832_pesky projects
    
  2. Unpack SDK to the folder, and configure GCC toolchain.

  3. Connect your board to JLink.

  4. Make and flash. To compile only run make, to compile and flash run make flash.

    cd projects\peripheral\blinky\pesky\blank\armgcc
    make flash
    

If you wish to use example with SoftDevice s132, you should ensure that you use correct version of soft device. You can flash it with next command:

cd projects\peripheral\blinky\pesky\s132\armgcc
make flash_softdevice
make flash

Finally you should see something like that:

image

Updates

16.01.2018
  Update readme with new goals
  Started updating SDK to newer version
  Investigating moving from modified eMD6.12 to driver provided with Thingy 52
  
19.03.2017
  BLE HID Joystick example added (beta)
  Refactored logging to support UART or RTT, configured with defines in Makefile
  Fixed issue: when board disconnected from J-Link\UART it wont start - added small sleep after TWI initialization

09.02.2017
  Bosch Sensortec BMP280 Driver - peripheral example

30.01.2017
  BLE HID Mouse + MD 6.12 example - board as a bluetooth mouse
  
25.10.2016
  BLE HID Mouse example added
  BLE UART example added
  Hex files added for each example

24.10.2016
  Extracted common parts of code into separate folders
  Added Readme.md to uart and md6.12 examples

01.10.2016
  Added UART example
  Added MotionDriver 6.12 adapted example (preliminary version, but working)
    Known issues:
      - could not use NRF_LOG via UART and at the same time use that UART directly
      - need to fix orientation (fixed 30.01.2017)
      - saving sensor calibration values to flash not implemented (commented)

27.09.2016
  Added interrupt example with code to enable pins 9, 10 as ordinary GPIO.
  Added MPU9250 example

13.09.2016
  Added TWI example
  Modified RTT example with timestamping using app_timer

12.09.2016
  Initial commit (blinky)
  Added SEGGER RTT example

TODO

  1. Update Nordic Semi SDK to newest version
  2. Investigate updating eMD6.12 to eMD provided by NordicSemi with Thingy 52
  3. Power-tuning - now I see max 15mA, but, may be, we can do even better?
  4. Add DFU support - could be hard due to limited RAM
  5. Add altimeter data for 10DOF - could be hard due to limited RAM

KNOWN ISSUES

  1. Windows 10\Edimax BT adapter - both mouse and joystick are unstable, quickly disconnects, lags, etc

Just add 3.1cm antenna to your board, it should solve the issue.

About

Examples of programming nRF52832 + MPU9250 + BMP280 dev board from https://www.tindie.com/products/onehorse/nrf52832-development-board/

License:MIT License


Languages

Language:C 87.1%Language:Makefile 12.9%Language:Shell 0.0%