nrf51822_aqi_sensor_test/README.md

1.2 KiB

NRF51822 AQI Sensor Test Program

*** NOTE: THIS APPLICATION IS FOR _xxAC VERSION ONLY NOW, DUE TO LACK OF SRAM ***

Work in progress:

  • LEDs and buttons
  • Power management
  • FreeRTOS
  • BLE API
  • Sensors

How to compile?

  • Edit Makefile and replace SDK_ROOT to your SDK installation directory.
  • Run make

How to flash?

  • Use OpenOCD:
openocd -f { YOUR_DEBUGGER_CONFIG } -f target/nrf51.cfg
  • If you are not using ST-LINKV2 nor CMSIS-DAP, try the following:
openocd { YOUR_DEBUGGER_CONFIG } -c 'set WORKAREASIZE 0' -f target/nrf51.cfg

Due to incompatible flash algorithm issue.

What if...?

  • My device is an _xxAC device(with 32KB RAM):
    • Replace linker script with nrf51_xxac.ld and re-compile.
    • Do nothing, if the program compiles for 16KB variant, it will run on 32KB devices without any problems.
  • Hardfault when using logger API:
    • Blame Nordic, they don't know how to write reentrant code.
    • Use SEGGER RTT logger API.

Boards supported:

  • Waveshare BLE-400 board, w/ NRF51822 module
  • Some strange AQI sensor board.

DFU support:

Currently there are NO DFU methods, DO NOT flash it without a debugger.