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:
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.
- Blinky (detailed description below)
- Interrupts
- TWI
- UART
- nRF5 SDK - (all code adapted for SDK 12.0.0)
- 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)
- JLink from SEGGER (software + device) - I'm using EDU version and have no plans to make it to production
- 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.
- 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}"
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.
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.
-
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
-
Unpack SDK to the folder, and configure GCC toolchain.
-
Connect your board to JLink.
-
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:
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
- Update Nordic Semi SDK to newest version
- Investigate updating eMD6.12 to eMD provided by NordicSemi with Thingy 52
- Power-tuning - now I see max 15mA, but, may be, we can do even better?
- Add DFU support - could be hard due to limited RAM
- Add altimeter data for 10DOF - could be hard due to limited RAM
- 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.